From d04a6678dcf6187082c8852bde556bc882ee7f8b Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:00:39 -0400 Subject: [PATCH 01/42] Updated TC_2-3 test scripts to VS Documents (#35555) --- .../suites/certification/Test_TC_S_2_3.yaml | 117 ++++++++++-------- 1 file changed, 62 insertions(+), 55 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 1e66f4c803834d..b3498affd8fd20 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -239,7 +239,8 @@ tests: - label: "Step 2: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to - 1000 (1s) and a set of extension fields appropriate to AC1." + 1,000(1s) and a set of extension fields appropriate to produce a + device state that will be referred as AC1 in further steps." PICS: S.S.C00.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: @@ -278,9 +279,10 @@ tests: - label: "Step 2: TH sends a AddScene command to DUT with the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to - 1000 (1s) and a set of extension fields appropriate to AC1." + 1,000(1s) and a set of extension fields appropriate to produce a + device state that will be referred as AC1 in further steps." verification: | - ./chip-tool scenesmanagement add-scene 0x0101 0x01 1000 "scene name" '[{"clusterID": "0x0006", "attributeValueList":[{"attributeID": "0x0000", "ValueUnsigned8": "0x01"}, ]}, {"clusterID": "0x0008", "attributeValueList":[{"attributeID": "0x0000", "ValueUnsigned8": "0x64"}, ]}]' 1 1 + ./chip-tool scenesmanagement add-scene 0x0101 0x01 1000 "scene name" '[{"clusterID": "0x0008", "attributeValueList":[{"attributeID": "0x0000", "valueUnsigned8": "0x64"}, ]}]' 1 1 Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to 257 and the SceneID field set to 0x01 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: @@ -350,35 +352,24 @@ tests: Verify DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 1000 and a set of extension fields appropriate to AC1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: - - NOTE: The values below are expected to match the values from the specific AC tested - - [1708071897.294470][7731:7733] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 - [1708071897.294486][7731:7733] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 - [1708071897.294520][7731:7733] CHIP:TOO: ViewSceneResponse: { - [1708071897.294527][7731:7733] CHIP:TOO: status: 0 - [1708071897.294530][7731:7733] CHIP:TOO: groupID: 257 - [1708071897.294533][7731:7733] CHIP:TOO: sceneID: 1 - [1708071897.294536][7731:7733] CHIP:TOO: transitionTime: 1000 - [1708071897.294540][7731:7733] CHIP:TOO: sceneName: scene name - [1708071897.294554][7731:7733] CHIP:TOO: extensionFieldSets: 2 entries - [1708071897.294569][7731:7733] CHIP:TOO: [1]: { - [1708071897.294574][7731:7733] CHIP:TOO: ClusterID: 6 - [1708071897.294580][7731:7733] CHIP:TOO: AttributeValueList: 1 entries - [1708071897.294589][7731:7733] CHIP:TOO: [1]: { - [1708071897.294593][7731:7733] CHIP:TOO: AttributeID: 0 - [1708071897.294596][7731:7733] CHIP:TOO: ValueUnsigned8: 1 - [1708071897.294599][7731:7733] CHIP:TOO: } - [1708071897.294603][7731:7733] CHIP:TOO: } - [1708071897.294611][7731:7733] CHIP:TOO: [2]: { - [1708071897.294615][7731:7733] CHIP:TOO: ClusterID: 8 - [1708071897.294621][7731:7733] CHIP:TOO: AttributeValueList: 1 entries - [1708071897.294628][7731:7733] CHIP:TOO: [1]: { - [1708071897.294633][7731:7733] CHIP:TOO: AttributeID: 0 - [1708071897.294636][7731:7733] CHIP:TOO: ValueUnsigned8: 100 - [1708071897.294639][7731:7733] CHIP:TOO: } - [1708071897.294643][7731:7733] CHIP:TOO: } - [1708071897.294647][7731:7733] CHIP:TOO: } + [1722518510.318] [187478:187480] [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 + [1722518510.318] [187478:187480] [TOO] Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 + [1722518510.318] [187478:187480] [TOO] ViewSceneResponse: { + [1722518510.318] [187478:187480] [TOO] status: 0 + [1722518510.318] [187478:187480] [TOO] groupID: 257 + [1722518510.318] [187478:187480] [TOO] sceneID: 1 + [1722518510.318] [187478:187480] [TOO] transitionTime: 1000 + [1722518510.318] [187478:187480] [TOO] sceneName: scene name + [1722518510.318] [187478:187480] [TOO] extensionFieldSets: 1 entries + [1722518510.318] [187478:187480] [TOO] [1]: { + [1722518510.318] [187478:187480] [TOO] ClusterID: 8 + [1722518510.318] [187478:187480] [TOO] AttributeValueList: 1 entries + [1722518510.318] [187478:187480] [TOO] [1]: { + [1722518510.318] [187478:187480] [TOO] AttributeID: 0 + [1722518510.318] [187478:187480] [TOO] ValueUnsigned8: 100 + [1722518510.318] [187478:187480] [TOO] } + [1722518510.318] [187478:187480] [TOO] } + [1722518510.318] [187478:187480] [TOO] } cluster: "LogCommands" command: "UserPrompt" arguments: @@ -433,7 +424,14 @@ tests: "Step 5a: TH configures AC2 on DUT for all implemented application clusters supporting scenesmanagement." verification: | - Is DUT configured with AC2? + ./chip-tool levelcontrol move-to-level-with-on-off 200 0 0 0 1 1 + + DUT is configured with AC2 for application clusters which is implemented, supporting scenes and different from AC1 + + [1705040820.918043][6555:6557] CHIP:DMG: StatusIB = + [1705040820.918056][6555:6557] CHIP:DMG: { + [1705040820.918068][6555:6557] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040820.918080][6555:6557] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -479,7 +477,16 @@ tests: - label: "Verify DUT returns to AC1." verification: | - Is DUT configured with AC1? + Read CurrentLevel attribute from level control cluster + + ./chip-tool levelcontrol read current-level 1 1 + + Verify CurrentLevel attribute value on TH(chip-tool) + + [1708072116.730389][7757:7759] CHIP:DMG: } + [1708072116.730518][7757:7759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0000 DataVersion: 2359286215 + [1708072116.730552][7757:7759] CHIP:TOO: CurrentLevel: 100 + cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -528,8 +535,9 @@ tests: field set to G1, the SceneID field set to 0x03, the TransitionTime field set to G1 and a set of extension fields appropriate to AC1." verification: | - ./chip-tool scenesmanagement add-scene 0x0101 0x03 1 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4002", "ValueUnsigned8": "0x01"}]}]' 0xffffffffffff0101 1 - Note: As this is a multicast command, no log is expected. + ./chip-tool scenesmanagement add-scene 0x0101 0x03 1000 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4002", "valueUnsigned8": "0x01"}]}]' 0xffffffffffff0101 1 + + There is no Status response since this was a groupcast cluster: "LogCommands" command: "UserPrompt" PICS: S.S.C00.Rsp && PICS_SKIP_SAMPLE_APP @@ -589,25 +597,24 @@ tests: NOTE: The values below are expected to match the values from the specific AC tested - [1707285444.028460][13682:13684] CHIP:DMG: }, - [1707285444.028553][13682:13684] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 - [1707285444.028579][13682:13684] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 - [1707285444.028670][13682:13684] CHIP:TOO: ViewSceneResponse: { - [1707285444.028685][13682:13684] CHIP:TOO: status: 0 - [1707285444.028696][13682:13684] CHIP:TOO: groupID: 257 - [1707285444.028706][13682:13684] CHIP:TOO: sceneID: 3 - [1707285444.028717][13682:13684] CHIP:TOO: transitionTime: 1 - [1707285444.028728][13682:13684] CHIP:TOO: sceneName: scene name - [1707285444.028766][13682:13684] CHIP:TOO: extensionFieldSets: 1 entries - [1707285444.028814][13682:13684] CHIP:TOO: [1]: { - [1707285444.028828][13682:13684] CHIP:TOO: ClusterID: 768 - [1707285444.028853][13682:13684] CHIP:TOO: AttributeValueList: 1 entries - [1707285444.028882][13682:13684] CHIP:TOO: [1]: { - [1707285444.028896][13682:13684] CHIP:TOO: AttributeID: 16386 - [1707285444.028913][13682:13684] CHIP:TOO: ValueUnsigned16: 1 - [1707285444.028925][13682:13684] CHIP:TOO: } - [1707285444.028937][13682:13684] CHIP:TOO: } - [1707285444.028950][13682:13684] CHIP:TOO: } + [1720504218.414] [3432:3434] [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 + [1720504218.414] [3432:3434] [TOO] Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 + [1720504218.414] [3432:3434] [TOO] ViewSceneResponse: { + [1720504218.414] [3432:3434] [TOO] status: 0 + [1720504218.414] [3432:3434] [TOO] groupID: 257 + [1720504218.414] [3432:3434] [TOO] sceneID: 3 + [1720504218.414] [3432:3434] [TOO] transitionTime: 1000 + [1720504218.414] [3432:3434] [TOO] sceneName: scene name + [1720504218.414] [3432:3434] [TOO] extensionFieldSets: 1 entries + [1720504218.414] [3432:3434] [TOO] [1]: { + [1720504218.414] [3432:3434] [TOO] ClusterID: 768 + [1720504218.414] [3432:3434] [TOO] AttributeValueList: 1 entries + [1720504218.414] [3432:3434] [TOO] [1]: { + [1720504218.414] [3432:3434] [TOO] AttributeID: 16386 + [1720504218.415] [3432:3434] [TOO] ValueUnsigned8: 1 + [1720504218.415] [3432:3434] [TOO] } + [1720504218.415] [3432:3434] [TOO] } + [1720504218.415] [3432:3434] [TOO] } cluster: "LogCommands" command: "UserPrompt" arguments: From 21d69a898bcb4bffa44a3ecdd527b033dc2db648 Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Thu, 12 Sep 2024 23:46:41 +0300 Subject: [PATCH 02/42] [Telink] Update Docker image (Zephyr update) (#35503) --- integrations/docker/images/base/chip-build/version | 2 +- integrations/docker/images/stage-2/chip-build-telink/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 6ee6f069675a0c..ab4dc8eb78bdf3 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -75 : remove workaround for bloaty build, workaround involved cloning and installing abseil +76 : [Telink] Update Docker image (Zephyr update) diff --git a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile index e9c3da681291cc..348d6989d57d9f 100644 --- a/integrations/docker/images/stage-2/chip-build-telink/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-telink/Dockerfile @@ -18,7 +18,7 @@ RUN set -x \ && : # last line # Setup Zephyr -ARG ZEPHYR_REVISION=446337fb7b31cd9751720a57d0add62da89c962a +ARG ZEPHYR_REVISION=9ea364fd3b48c97f7cea6d69935f1fa630e30fb7 WORKDIR /opt/telink/zephyrproject RUN set -x \ && python3 -m pip install --break-system-packages -U --no-cache-dir west \ From 396f7f5c2f38684f73d2ee9a4f2b34385e00081c Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:51:51 +0100 Subject: [PATCH 03/42] Added missing "is_commissioning=True" to step 1 in all DEM, EEVSE and EWATERHTR test scripts (#35560) * Added missing "is_commissioning=True" to step 1 in all DEM, EEVSE and EWATERHTR test cases. * Added missing EEVSE_2.3 --- src/python_testing/TC_DEM_2_10.py | 3 ++- src/python_testing/TC_DEM_2_2.py | 3 ++- src/python_testing/TC_DEM_2_3.py | 3 ++- src/python_testing/TC_DEM_2_4.py | 3 ++- src/python_testing/TC_DEM_2_5.py | 3 ++- src/python_testing/TC_DEM_2_6.py | 3 ++- src/python_testing/TC_DEM_2_7.py | 3 ++- src/python_testing/TC_DEM_2_8.py | 3 ++- src/python_testing/TC_DEM_2_9.py | 3 ++- src/python_testing/TC_EEVSE_2_2.py | 3 ++- src/python_testing/TC_EEVSE_2_3.py | 3 ++- src/python_testing/TC_EEVSE_2_4.py | 3 ++- src/python_testing/TC_EEVSE_2_5.py | 3 ++- src/python_testing/TC_EEVSE_2_6.py | 3 ++- src/python_testing/TC_EWATERHTR_2_1.py | 3 ++- src/python_testing/TC_EWATERHTR_2_2.py | 3 ++- src/python_testing/TC_EWATERHTR_2_3.py | 3 ++- 17 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/python_testing/TC_DEM_2_10.py b/src/python_testing/TC_DEM_2_10.py index eb983a16e07401..fb837adf5750e9 100644 --- a/src/python_testing/TC_DEM_2_10.py +++ b/src/python_testing/TC_DEM_2_10.py @@ -61,7 +61,8 @@ def pics_TC_DEM_2_10(self): def steps_TC_DEM_2_10(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the FeatureMap", "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_2.py b/src/python_testing/TC_DEM_2_2.py index 3175508d056cb5..b180da13d2a7b4 100644 --- a/src/python_testing/TC_DEM_2_2.py +++ b/src/python_testing/TC_DEM_2_2.py @@ -61,7 +61,8 @@ def pics_TC_DEM_2_2(self): def steps_TC_DEM_2_2(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify PowerAdjustment is supported."), TestStep("3", "Set up a subscription to all DeviceEnergyManagement cluster events"), diff --git a/src/python_testing/TC_DEM_2_3.py b/src/python_testing/TC_DEM_2_3.py index d462c390596449..69b44cc730e439 100644 --- a/src/python_testing/TC_DEM_2_3.py +++ b/src/python_testing/TC_DEM_2_3.py @@ -54,7 +54,8 @@ def pics_TC_DEM_2_3(self): def steps_TC_DEM_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify StartTimeAdjustment feature is supported on the cluster. Verify PowerForecastReporting or StateForecastReporting feature is supported on the cluster."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_4.py b/src/python_testing/TC_DEM_2_4.py index 734712099e8798..d611172cb93235 100644 --- a/src/python_testing/TC_DEM_2_4.py +++ b/src/python_testing/TC_DEM_2_4.py @@ -55,7 +55,8 @@ def pics_TC_DEM_2_4(self): def steps_TC_DEM_2_4(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify Pausable feature is supported on the cluster. Verify PowerForecastReporting or StateForecastReporting feature is supported on the cluster."), TestStep("3", "Set up a subscription to all DeviceEnergyManagement cluster events"), diff --git a/src/python_testing/TC_DEM_2_5.py b/src/python_testing/TC_DEM_2_5.py index 38bac00f32cfdf..0a5547fd4af428 100644 --- a/src/python_testing/TC_DEM_2_5.py +++ b/src/python_testing/TC_DEM_2_5.py @@ -59,7 +59,8 @@ def pics_TC_DEM_2_5(self): def steps_TC_DEM_2_5(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ForecastAdjustment feature is supported on the cluster. Verify PowerForecastReporting feature is supported on the cluster. Verify StateForecastReporting feature is not supported on the cluster."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_6.py b/src/python_testing/TC_DEM_2_6.py index c05a80c6c3909a..012ff88d26337e 100644 --- a/src/python_testing/TC_DEM_2_6.py +++ b/src/python_testing/TC_DEM_2_6.py @@ -59,7 +59,8 @@ def pics_TC_DEM_2_6(self): def steps_TC_DEM_2_6(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ForecastAdjustment feature is supported on the cluster. Verify StateForecastReporting feature is supported on the cluster. Verify PowerForecastReporting feature is not supported on the cluster."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_7.py b/src/python_testing/TC_DEM_2_7.py index b45643868a6e71..b693f6e6464654 100644 --- a/src/python_testing/TC_DEM_2_7.py +++ b/src/python_testing/TC_DEM_2_7.py @@ -59,7 +59,8 @@ def pics_TC_DEM_2_7(self): def steps_TC_DEM_2_7(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ConstraintBasedAdjustment feature is supported on the cluster. Verify PowerForecastReporting feature is supported on the cluster. Verify StateForecastReporting feature is not supported on the cluster."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_8.py b/src/python_testing/TC_DEM_2_8.py index 1b1a2a31537098..a54baca2e2df6b 100644 --- a/src/python_testing/TC_DEM_2_8.py +++ b/src/python_testing/TC_DEM_2_8.py @@ -59,7 +59,8 @@ def pics_TC_DEM_2_8(self): def steps_TC_DEM_2_8(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ConstraintBasedAdjustment feature is supported on the cluster. Verify StateForecastReporting feature is supported on the cluster. Verify PowerForecastReporting feature is not supported on the cluster."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_DEM_2_9.py b/src/python_testing/TC_DEM_2_9.py index 3acc4b7a517ece..935a04064d9ed6 100644 --- a/src/python_testing/TC_DEM_2_9.py +++ b/src/python_testing/TC_DEM_2_9.py @@ -58,7 +58,8 @@ def pics_TC_DEM_2_9(self): def steps_TC_DEM_2_9(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", "Verify that the DUT response contains the _FeatureMap_ attribute. Verify one of PowerForecastReporting or StateForecastReporting is supported but not both."), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py index b2591fa4a5d206..152f08de269348 100644 --- a/src/python_testing/TC_EEVSE_2_2.py +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -52,7 +52,8 @@ def pics_TC_EEVSE_2_2(self): def steps_TC_EEVSE_2_2(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", diff --git a/src/python_testing/TC_EEVSE_2_3.py b/src/python_testing/TC_EEVSE_2_3.py index 8de0ebef13e8a2..d3c3c46ea2284b 100644 --- a/src/python_testing/TC_EEVSE_2_3.py +++ b/src/python_testing/TC_EEVSE_2_3.py @@ -52,7 +52,8 @@ def pics_TC_EEVSE_2_3(self): def steps_TC_EEVSE_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py index ee8dbae5fa43a2..c7e855bf233e51 100644 --- a/src/python_testing/TC_EEVSE_2_4.py +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -50,7 +50,8 @@ def pics_TC_EEVSE_2_4(self): def steps_TC_EEVSE_2_4(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py index 3096f013dde8af..5e057f78082cf9 100644 --- a/src/python_testing/TC_EEVSE_2_5.py +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -50,7 +50,8 @@ def pics_TC_EEVSE_2_5(self): def steps_TC_EEVSE_2_5(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", diff --git a/src/python_testing/TC_EEVSE_2_6.py b/src/python_testing/TC_EEVSE_2_6.py index 4567f96c3e466a..575d64cd3cbb67 100644 --- a/src/python_testing/TC_EEVSE_2_6.py +++ b/src/python_testing/TC_EEVSE_2_6.py @@ -52,7 +52,8 @@ def pics_TC_EEVSE_2_6(self): def steps_TC_EEVSE_2_6(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "TH reads from the DUT the FeatureMap", "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), TestStep("3", "Set up a subscription to all EnergyEVSE cluster events"), diff --git a/src/python_testing/TC_EWATERHTR_2_1.py b/src/python_testing/TC_EWATERHTR_2_1.py index df5d2821ece9e4..9d520f165d7aca 100644 --- a/src/python_testing/TC_EWATERHTR_2_1.py +++ b/src/python_testing/TC_EWATERHTR_2_1.py @@ -50,7 +50,8 @@ def pics_TC_EWATERHTR_2_1(self): def steps_TC_EWATERHTR_2_1(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)."), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test).", + is_commissioning=True), TestStep("2", "TH reads from the DUT the FeatureMap attribute.", "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), TestStep("3", "TH reads from the DUT the HeaterTypes attribute.", diff --git a/src/python_testing/TC_EWATERHTR_2_2.py b/src/python_testing/TC_EWATERHTR_2_2.py index 8c96e52d4524c8..49c0fdc2deeb30 100644 --- a/src/python_testing/TC_EWATERHTR_2_2.py +++ b/src/python_testing/TC_EWATERHTR_2_2.py @@ -52,7 +52,8 @@ def pics_TC_EWATERHTR_2_2(self): def steps_TC_EWATERHTR_2_2(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "Set up a subscription to all WaterHeaterManagement cluster events"), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), diff --git a/src/python_testing/TC_EWATERHTR_2_3.py b/src/python_testing/TC_EWATERHTR_2_3.py index e39257134b3db5..f502dfac182bce 100644 --- a/src/python_testing/TC_EWATERHTR_2_3.py +++ b/src/python_testing/TC_EWATERHTR_2_3.py @@ -49,7 +49,8 @@ def pics_TC_EWATERHTR_2_3(self): def steps_TC_EWATERHTR_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)", + is_commissioning=True), TestStep("2", "Set up a subscription to all WaterHeaterManagement cluster events"), TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", "Value has to be 1 (True)"), From 4a47e5965e519e5734878a38d3a95253209c099c Mon Sep 17 00:00:00 2001 From: bhmanda-silabs <107180296+bhmanda-silabs@users.noreply.github.com> Date: Fri, 13 Sep 2024 02:26:46 +0530 Subject: [PATCH 04/42] [Silabs] Added new wifi BRD2605A board support in matter (#35225) * Added new wifi BRD2605A board support in matter * Moved si91x support files to common place for brd4338a and brd2605a boards * Updating matter_support pointer * Updated matter_support pointer to latest main * Added the default setting chip_device_platform to SiWx917 into build_for_wifi_gnfile.gn * added brd2605a in efr32.py and targets.py --- .github/workflows/examples-efr32.yaml | 18 +++++++++++++++ .../silabs/build_for_wifi_gnfile.gn | 1 + .../silabs/build_for_wifi_gnfile.gn | 1 + .../lock-app/silabs/build_for_wifi_gnfile.gn | 1 + .../silabs/build_for_wifi_gnfile.gn | 1 + .../silabs/build_for_wifi_gnfile.gn | 1 + scripts/build/build/targets.py | 1 + scripts/build/builders/efr32.py | 3 +++ .../build/testdata/all_targets_linux_x64.txt | 2 +- scripts/examples/gn_silabs_example.sh | 3 +-- .../platformAbstraction/WiseMcuSpam.cpp | 19 +++++++++++----- third_party/silabs/SiWx917_sdk.gni | 22 +++++++++---------- third_party/silabs/matter_support | 2 +- third_party/silabs/silabs_board.gni | 2 +- 14 files changed, 56 insertions(+), 21 deletions(-) diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index c236b4ca3db4c3..9e3adbd459befe 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -128,6 +128,24 @@ jobs: /tmp/bloat_reports/ - name: Clean out build output run: rm -rf ./out + - name: Build BRD2605A WiFi Soc variants + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target efr32-brd2605a-light-skip-rps-generation \ + --target efr32-brd2605a-lock-skip-rps-generation \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare bloat report for brd2605a lock app + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD2605a lock-app \ + out/efr32-brd2605a-lock-skip-rps-generation/matter-silabs-lock-example.out \ + /tmp/bloat_reports/ + - name: Clean out build output + run: rm -rf ./out - name: Build EFR32 with WiFi NCP run: | ./scripts/run_in_build_env.sh \ diff --git a/examples/light-switch-app/silabs/build_for_wifi_gnfile.gn b/examples/light-switch-app/silabs/build_for_wifi_gnfile.gn index d391814190d09f..1d6a71e88dd16f 100644 --- a/examples/light-switch-app/silabs/build_for_wifi_gnfile.gn +++ b/examples/light-switch-app/silabs/build_for_wifi_gnfile.gn @@ -24,5 +24,6 @@ default_args = { target_cpu = "arm" target_os = "freertos" chip_enable_wifi = true + chip_device_platform = "SiWx917" import("//build_for_wifi_args.gni") } diff --git a/examples/lighting-app/silabs/build_for_wifi_gnfile.gn b/examples/lighting-app/silabs/build_for_wifi_gnfile.gn index d391814190d09f..1d6a71e88dd16f 100644 --- a/examples/lighting-app/silabs/build_for_wifi_gnfile.gn +++ b/examples/lighting-app/silabs/build_for_wifi_gnfile.gn @@ -24,5 +24,6 @@ default_args = { target_cpu = "arm" target_os = "freertos" chip_enable_wifi = true + chip_device_platform = "SiWx917" import("//build_for_wifi_args.gni") } diff --git a/examples/lock-app/silabs/build_for_wifi_gnfile.gn b/examples/lock-app/silabs/build_for_wifi_gnfile.gn index d391814190d09f..1d6a71e88dd16f 100644 --- a/examples/lock-app/silabs/build_for_wifi_gnfile.gn +++ b/examples/lock-app/silabs/build_for_wifi_gnfile.gn @@ -24,5 +24,6 @@ default_args = { target_cpu = "arm" target_os = "freertos" chip_enable_wifi = true + chip_device_platform = "SiWx917" import("//build_for_wifi_args.gni") } diff --git a/examples/thermostat/silabs/build_for_wifi_gnfile.gn b/examples/thermostat/silabs/build_for_wifi_gnfile.gn index d391814190d09f..1d6a71e88dd16f 100644 --- a/examples/thermostat/silabs/build_for_wifi_gnfile.gn +++ b/examples/thermostat/silabs/build_for_wifi_gnfile.gn @@ -24,5 +24,6 @@ default_args = { target_cpu = "arm" target_os = "freertos" chip_enable_wifi = true + chip_device_platform = "SiWx917" import("//build_for_wifi_args.gni") } diff --git a/examples/window-app/silabs/build_for_wifi_gnfile.gn b/examples/window-app/silabs/build_for_wifi_gnfile.gn index d391814190d09f..1d6a71e88dd16f 100644 --- a/examples/window-app/silabs/build_for_wifi_gnfile.gn +++ b/examples/window-app/silabs/build_for_wifi_gnfile.gn @@ -24,5 +24,6 @@ default_args = { target_cpu = "arm" target_os = "freertos" chip_enable_wifi = true + chip_device_platform = "SiWx917" import("//build_for_wifi_args.gni") } diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 4c90164b2d1c12..d0a7e384ee4c77 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -253,6 +253,7 @@ def BuildEfr32Target(): TargetPart('brd4186c', board=Efr32Board.BRD4186C), TargetPart('brd2703a', board=Efr32Board.BRD2703A), TargetPart('brd4338a', board=Efr32Board.BRD4338A, enable_wifi=True, enable_917_soc=True), + TargetPart('brd2605a', board=Efr32Board.BRD2605A, enable_wifi=True, enable_917_soc=True), ]) # apps diff --git a/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index 6545f75b55da6b..3c15cd4ccec452 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -104,6 +104,7 @@ class Efr32Board(Enum): BRD4186C = 10 BRD4338A = 11 BRD2703A = 12 + BRD2605A = 13 def GnArgName(self): if self == Efr32Board.BRD2704B: @@ -130,6 +131,8 @@ def GnArgName(self): return 'BRD4338A' elif self == Efr32Board.BRD2703A: return 'BRD2703A' + elif self == Efr32Board.BRD2605A: + return 'BRD2605A' else: raise Exception('Unknown board #: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index df54baa2ffec81..d7a834dfc431c2 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -5,7 +5,7 @@ bouffalolab-{bl602dk,bl704ldk,bl706dk,bl602-night-light,bl706-night-light,bl602- cc32xx-{lock,air-purifier} ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat} -efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] +efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang] diff --git a/scripts/examples/gn_silabs_example.sh b/scripts/examples/gn_silabs_example.sh index 55154782119992..45779260b241b0 100755 --- a/scripts/examples/gn_silabs_example.sh +++ b/scripts/examples/gn_silabs_example.sh @@ -297,10 +297,9 @@ else fi # 917 exception. TODO find a more generic way - if [ "$SILABS_BOARD" == "BRD4338A" ]; then + if [ "$SILABS_BOARD" == "BRD4338A" ] || [ "$SILABS_BOARD" == "BRD2605A" ]; then echo "Compiling for 917 WiFi SOC" USE_WIFI=true - optArgs+="chip_device_platform =\"SiWx917\" is_debug=false " fi if [ "$USE_GIT_SHA_FOR_VERSION" == true ]; then diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index 053b30cc8619f4..a99ac5ea2908f9 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -23,8 +23,10 @@ #include +#include #if SILABS_LOG_ENABLED #include "silabs_utils.h" + #endif // SILABS_LOG_ENABLED // TODO add includes ? @@ -49,6 +51,14 @@ void soc_pll_config(void); #if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL #include "uart.h" #endif +// TODO Remove this when SI91X-16606 is addressed +#ifdef SI917_DEVKIT +#define SL_LED_COUNT 1 +uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LEDB_PIN }; +#else +#define SL_LED_COUNT SL_SI91x_LED_COUNT +uint8_t ledPinArray[SL_LED_COUNT] = { SL_LED_LED0_PIN, SL_LED_LED1_PIN }; +#endif namespace chip { namespace DeviceLayer { @@ -100,9 +110,8 @@ void SilabsPlatform::InitLed(void) CHIP_ERROR SilabsPlatform::SetLed(bool state, uint8_t led) { - // TODO add range check - (state) ? sl_si91x_led_set(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN) - : sl_si91x_led_clear(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN); + VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT); + (state) ? sl_si91x_led_set(ledPinArray[led]) : sl_si91x_led_clear(ledPinArray[led]); return CHIP_NO_ERROR; } @@ -114,8 +123,8 @@ bool SilabsPlatform::GetLedState(uint8_t led) CHIP_ERROR SilabsPlatform::ToggleLed(uint8_t led) { - // TODO add range check - sl_si91x_led_toggle(led ? SL_LED_LED1_PIN : SL_LED_LED0_PIN); + VerifyOrReturnError(led < SL_LED_COUNT, CHIP_ERROR_INVALID_ARGUMENT); + sl_si91x_led_toggle(ledPinArray[led]); return CHIP_NO_ERROR; } #endif // ENABLE_WSTK_LEDS diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 3c5d8817b2d217..a19b82d94f7fa5 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -60,8 +60,8 @@ template("siwx917_sdk") { "${efr32_sdk_root}/platform/emdrv/nvm3/inc", "${efr32_sdk_root}/platform/emdrv/common/inc", "${efr32_sdk_root}/platform/service/device_init/inc", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/config", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/config", "${chip_root}/src/platform/silabs/rs911x", @@ -131,7 +131,7 @@ template("siwx917_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/inc", "${efr32_sdk_root}/platform/service/sleeptimer/config", "${efr32_sdk_root}/platform/service/sleeptimer/src", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/inc", + "${sdk_support_root}/matter/si91x/support/inc", "${efr32_sdk_root}/platform/service/iostream/inc", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/inc", @@ -684,11 +684,11 @@ template("siwx917_sdk") { "${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/timers.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_event_handler.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_button_instances.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_led_instances.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_ulp_timer_init.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/hal/rsi_hal_mcu_m4.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_event_handler.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_button_instances.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_led_instances.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_ulp_timer_init.c", + "${sdk_support_root}/matter/si91x/support/hal/rsi_hal_mcu_m4.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/button/src/sl_si91x_button.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/hardware_drivers/led/src/sl_si91x_led.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_nvm3_hal_flash.c", @@ -706,7 +706,7 @@ template("siwx917_sdk") { # STARTUP FILES "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream.c", "${efr32_sdk_root}/platform/service/iostream/src/sl_iostream_rtt.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/support/src/startup_common_RS1xxxx.c", + "${sdk_support_root}/matter/si91x/support/src/startup_common_RS1xxxx.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/nvm3/src/sl_si91x_common_flash_intf.c", # OTA @@ -758,8 +758,8 @@ template("siwx917_sdk") { if (chip_enable_icd_server) { sources += [ - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_handler.c", - "${sdk_support_root}/matter/si91x/siwx917/BRD4338A/autogen/sl_si91x_power_manager_wakeup_handler.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_power_manager_handler.c", + "${sdk_support_root}/matter/si91x/siwx917/${silabs_board}/autogen/sl_si91x_power_manager_wakeup_handler.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/sl_si91x_m4_ps.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/power_manager/src/sl_si91x_power_manager.c", "${wifi_sdk_root}/components/device/silabs/si91x/mcu/drivers/service/power_manager/src/sli_si91x_power_manager.c", diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index e313f2dc9663da..c3e993cea4aad3 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit e313f2dc9663da1ee4488eceba17dbff038f6a63 +Subproject commit c3e993cea4aad32adc178fe487afb66822f0b42d diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 087ccc9d892916..7e4f3fff9bf567 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -62,7 +62,7 @@ if (silabs_board == "") { assert(silabs_board != "", "silabs_board must be specified") # Si917 WIFI board ---------- -if (silabs_board == "BRD4338A") { +if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") { silabs_family = "SiWx917-common" silabs_mcu = "SiWG917M111MGTBA" wifi_soc = true From 3299927890c152de8b1fa5c1197ed95df1e09cd3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 12 Sep 2024 17:04:23 -0400 Subject: [PATCH 05/42] Fix the commandFields type on MTRDevice invoke methods. (#35556) The "id" was a copy/paste error. For the public API we can't do much about that, but internally we can sanity-check and use the right type. --- src/darwin/Framework/CHIP/MTRDevice.mm | 17 ++++++++++++++++- src/darwin/Framework/CHIP/MTRDevice_Concrete.mm | 2 +- src/darwin/Framework/CHIP/MTRDevice_XPC.mm | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index a0f985bb4ac1f1..cb0d402dd5dc44 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -1313,6 +1313,21 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID // here for now. // TODO: https://github.com/project-chip/connectedhomeip/issues/24563 + if (![commandFields isKindOfClass:NSDictionary.class]) { + MTR_LOG_ERROR("%@ invokeCommandWithEndpointID passed a commandFields (%@) that is not a data-value NSDictionary object", + self, commandFields); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]); + return; + } + + MTRDeviceDataValueDictionary fieldsDataValue = commandFields; + if (fieldsDataValue[MTRTypeKey] != MTRStructureValueType) { + MTR_LOG_ERROR("%@ invokeCommandWithEndpointID passed a commandFields (%@) that is not a structure-typed data-value object", + self, commandFields); + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]); + return; + } + [self _invokeCommandWithEndpointID:endpointID clusterID:clusterID commandID:commandID @@ -1328,7 +1343,7 @@ - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID - commandFields:(id)commandFields + commandFields:(MTRDeviceDataValueDictionary)commandFields expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index a70e4953fbd24d..28c198bd941861 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -2966,7 +2966,7 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID - commandFields:(id)commandFields + commandFields:(MTRDeviceDataValueDictionary)commandFields expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index 794696f4a98c99..18764080cbab32 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -234,7 +234,7 @@ - (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)di - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID - commandFields:(id)commandFields + commandFields:(MTRDeviceDataValueDictionary)commandFields expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout From f36ffd6df572e2cedcb13740983cafaf2465b638 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 12 Sep 2024 17:57:08 -0400 Subject: [PATCH 06/42] cleanup cmake data model build rules / remove ARG_INCLUDE_SERVER (#35542) * Separate out the cmake logic a bit. Still somewhat broken through as the codegen data model is not built * Fix build and remove INCLUDE_SERVER cmake argument --- config/openiotsdk/cmake/chip.cmake | 1 - .../air-purifier-app/ameba/chip_main.cmake | 1 - .../telink/CMakeLists.txt | 1 - .../all-clusters-app/ameba/chip_main.cmake | 1 - examples/all-clusters-app/mbed/CMakeLists.txt | 1 - .../nrfconnect/CMakeLists.txt | 1 - .../nxp/zephyr/CMakeLists.txt | 1 - .../all-clusters-app/telink/CMakeLists.txt | 1 - .../ameba/chip_main.cmake | 1 - .../mbed/CMakeLists.txt | 1 - .../nrfconnect/CMakeLists.txt | 1 - .../telink/CMakeLists.txt | 1 - examples/bridge-app/telink/CMakeLists.txt | 1 - examples/chef/ameba/chip_main.cmake | 1 - examples/chef/nrfconnect/CMakeLists.txt | 1 - examples/chef/telink/CMakeLists.txt | 1 - .../contact-sensor-app/telink/CMakeLists.txt | 1 - .../nxp/zephyr/CMakeLists.txt | 1 - .../light-switch-app/ameba/chip_main.cmake | 1 - .../nrfconnect/CMakeLists.txt | 1 - .../light-switch-app/telink/CMakeLists.txt | 1 - examples/lighting-app/ameba/chip_main.cmake | 1 - examples/lighting-app/mbed/CMakeLists.txt | 1 - .../lighting-app/nrfconnect/CMakeLists.txt | 1 - examples/lighting-app/telink/CMakeLists.txt | 1 - .../lit-icd-app/nrfconnect/CMakeLists.txt | 1 - examples/lock-app/mbed/CMakeLists.txt | 1 - examples/lock-app/nrfconnect/CMakeLists.txt | 1 - examples/lock-app/telink/CMakeLists.txt | 1 - .../ota-requestor-app/ameba/chip_main.cmake | 1 - .../ota-requestor-app/mbed/CMakeLists.txt | 1 - .../ota-requestor-app/telink/CMakeLists.txt | 1 - examples/pump-app/nrfconnect/CMakeLists.txt | 1 - examples/pump-app/telink/CMakeLists.txt | 1 - .../nrfconnect/CMakeLists.txt | 1 - .../pump-controller-app/telink/CMakeLists.txt | 1 - .../smoke-co-alarm-app/telink/CMakeLists.txt | 1 - .../telink/CMakeLists.txt | 1 - examples/thermostat/nxp/zephyr/CMakeLists.txt | 1 - examples/thermostat/telink/CMakeLists.txt | 1 - examples/window-app/nrfconnect/CMakeLists.txt | 1 - examples/window-app/telink/CMakeLists.txt | 1 - src/app/chip_data_model.cmake | 57 ++++++++++++------- 43 files changed, 35 insertions(+), 64 deletions(-) diff --git a/config/openiotsdk/cmake/chip.cmake b/config/openiotsdk/cmake/chip.cmake index a0eef560f926a9..fb1386e45d5dc6 100644 --- a/config/openiotsdk/cmake/chip.cmake +++ b/config/openiotsdk/cmake/chip.cmake @@ -74,7 +74,6 @@ function(chip_add_data_model target scope model_name) include(${CHIP_ROOT}/src/app/chip_data_model.cmake) chip_configure_data_model(${target} SCOPE ${scope} - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${model_name}-common/${model_name}-app.zap ) endfunction() diff --git a/examples/air-purifier-app/ameba/chip_main.cmake b/examples/air-purifier-app/ameba/chip_main.cmake index c2a8d0e928fa0c..22a325bf6eddec 100755 --- a/examples/air-purifier-app/ameba/chip_main.cmake +++ b/examples/air-purifier-app/ameba/chip_main.cmake @@ -162,7 +162,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../air-purifier-common/air-purifier-app.zap ) diff --git a/examples/air-quality-sensor-app/telink/CMakeLists.txt b/examples/air-quality-sensor-app/telink/CMakeLists.txt index 4d34c74fcdba68..0cde6d4eb3f84a 100644 --- a/examples/air-quality-sensor-app/telink/CMakeLists.txt +++ b/examples/air-quality-sensor-app/telink/CMakeLists.txt @@ -53,7 +53,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../air-quality-sensor-common/air-quality-sensor-app.zap ) diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 363b01e05ac2de..852673d07dd20c 100644 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -212,7 +212,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../all-clusters-common/all-clusters-app.zap ) diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index b2e54ed28a78d6..ea1ce468b53852 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -87,7 +87,6 @@ target_sources(${APP_TARGET} PRIVATE ) chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-app.zap ) diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index bed8169e40bd92..adfc76c299eb09 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -77,7 +77,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap ) diff --git a/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt b/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt index 2fa2d558a2724a..e5b9dff398abc7 100644 --- a/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt +++ b/examples/all-clusters-app/nxp/zephyr/CMakeLists.txt @@ -82,7 +82,6 @@ if(CONFIG_CHIP_OTA_REQUESTOR) endif() chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap ) diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 1eba5072690a6d..ddec4db229adc6 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -76,7 +76,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap ) diff --git a/examples/all-clusters-minimal-app/ameba/chip_main.cmake b/examples/all-clusters-minimal-app/ameba/chip_main.cmake index e8fa8393ddeb1c..a2d1e364d63ee9 100755 --- a/examples/all-clusters-minimal-app/ameba/chip_main.cmake +++ b/examples/all-clusters-minimal-app/ameba/chip_main.cmake @@ -147,7 +147,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../all-clusters-common/all-clusters-minimal-app.zap ) diff --git a/examples/all-clusters-minimal-app/mbed/CMakeLists.txt b/examples/all-clusters-minimal-app/mbed/CMakeLists.txt index e50fcef67663f8..d90c3faaa496b3 100644 --- a/examples/all-clusters-minimal-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/mbed/CMakeLists.txt @@ -65,7 +65,6 @@ target_sources(${APP_TARGET} PRIVATE ) chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-minimal-app.zap ) diff --git a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt index 08feb83a62a40b..d18fb15d33dd1a 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/nrfconnect/CMakeLists.txt @@ -55,7 +55,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-minimal-app.zap ) diff --git a/examples/all-clusters-minimal-app/telink/CMakeLists.txt b/examples/all-clusters-minimal-app/telink/CMakeLists.txt index 3cfcc56d36783c..a9da3ae4331a15 100644 --- a/examples/all-clusters-minimal-app/telink/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/telink/CMakeLists.txt @@ -55,7 +55,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-minimal-app.zap ) diff --git a/examples/bridge-app/telink/CMakeLists.txt b/examples/bridge-app/telink/CMakeLists.txt index 1da3944812e014..f2e80864d46e01 100644 --- a/examples/bridge-app/telink/CMakeLists.txt +++ b/examples/bridge-app/telink/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../bridge-common/bridge-app.zap ) diff --git a/examples/chef/ameba/chip_main.cmake b/examples/chef/ameba/chip_main.cmake index df9f7fedd10ecc..87c8aa158db8bb 100755 --- a/examples/chef/ameba/chip_main.cmake +++ b/examples/chef/ameba/chip_main.cmake @@ -51,7 +51,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../devices/${SAMPLE_NAME}.zap ) diff --git a/examples/chef/nrfconnect/CMakeLists.txt b/examples/chef/nrfconnect/CMakeLists.txt index 081c510435c1e6..13ddc003e3b878 100644 --- a/examples/chef/nrfconnect/CMakeLists.txt +++ b/examples/chef/nrfconnect/CMakeLists.txt @@ -106,7 +106,6 @@ target_sources(app PRIVATE message(STATUS ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CHEF}/devices/${CONFIG_CHEF_DEVICE_TYPE}.zap ) diff --git a/examples/chef/telink/CMakeLists.txt b/examples/chef/telink/CMakeLists.txt index 3c6b352e55b873..364725c34383fc 100755 --- a/examples/chef/telink/CMakeLists.txt +++ b/examples/chef/telink/CMakeLists.txt @@ -77,7 +77,6 @@ target_sources(app PRIVATE message(STATUS ${CHEF}/devices/${SAMPLE_NAME}.zap) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap ) diff --git a/examples/contact-sensor-app/telink/CMakeLists.txt b/examples/contact-sensor-app/telink/CMakeLists.txt index fb8098b36fdbee..47ec8757942519 100755 --- a/examples/contact-sensor-app/telink/CMakeLists.txt +++ b/examples/contact-sensor-app/telink/CMakeLists.txt @@ -51,7 +51,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../contact-sensor-common/contact-sensor-app.zap ) diff --git a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt index f7b32881ada959..9103b6a5567102 100644 --- a/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt +++ b/examples/laundry-washer-app/nxp/zephyr/CMakeLists.txt @@ -84,7 +84,6 @@ if(CONFIG_CHIP_OTA_REQUESTOR) endif() chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/../../laundry-washer-app/nxp/zap/laundry-washer-app.zap ) diff --git a/examples/light-switch-app/ameba/chip_main.cmake b/examples/light-switch-app/ameba/chip_main.cmake index 75e0d0116425fe..629c423c0fe5ec 100755 --- a/examples/light-switch-app/ameba/chip_main.cmake +++ b/examples/light-switch-app/ameba/chip_main.cmake @@ -173,7 +173,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../light-switch-common/light-switch-app.zap ) diff --git a/examples/light-switch-app/nrfconnect/CMakeLists.txt b/examples/light-switch-app/nrfconnect/CMakeLists.txt index 48329e053be562..3eec4764d96ec9 100644 --- a/examples/light-switch-app/nrfconnect/CMakeLists.txt +++ b/examples/light-switch-app/nrfconnect/CMakeLists.txt @@ -64,6 +64,5 @@ if(CONFIG_MCUMGR_TRANSPORT_BT) endif() chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../light-switch-common/light-switch-app.zap ) diff --git a/examples/light-switch-app/telink/CMakeLists.txt b/examples/light-switch-app/telink/CMakeLists.txt index 7b98b235ea66e1..660769df9a59c4 100755 --- a/examples/light-switch-app/telink/CMakeLists.txt +++ b/examples/light-switch-app/telink/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../light-switch-common/light-switch-app.zap ) diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 3165047d3955be..11590553cf327d 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -166,7 +166,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../lighting-common/lighting-app.zap ) diff --git a/examples/lighting-app/mbed/CMakeLists.txt b/examples/lighting-app/mbed/CMakeLists.txt index abe63789638f23..69456ae04664dd 100644 --- a/examples/lighting-app/mbed/CMakeLists.txt +++ b/examples/lighting-app/mbed/CMakeLists.txt @@ -62,7 +62,6 @@ target_sources(${APP_TARGET} PRIVATE ) chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lighting-common/lighting-app.zap ) diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index 5b2647894e9ffb..59bf2f26bed466 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -55,7 +55,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/PWMDevice.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lighting-common/lighting-app.zap ) diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 056f6d4173c49a..9e29436a05f5fa 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lighting-common/lighting-app.zap ) diff --git a/examples/lit-icd-app/nrfconnect/CMakeLists.txt b/examples/lit-icd-app/nrfconnect/CMakeLists.txt index 36133c49ec12d1..a624da1b22fef0 100644 --- a/examples/lit-icd-app/nrfconnect/CMakeLists.txt +++ b/examples/lit-icd-app/nrfconnect/CMakeLists.txt @@ -50,7 +50,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lit-icd-common/lit-icd-server-app.zap ) diff --git a/examples/lock-app/mbed/CMakeLists.txt b/examples/lock-app/mbed/CMakeLists.txt index 29cb86631ab749..5d9a5f5554c8d4 100644 --- a/examples/lock-app/mbed/CMakeLists.txt +++ b/examples/lock-app/mbed/CMakeLists.txt @@ -62,7 +62,6 @@ target_sources(${APP_TARGET} PRIVATE ) chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lock-common/lock-app.zap ) diff --git a/examples/lock-app/nrfconnect/CMakeLists.txt b/examples/lock-app/nrfconnect/CMakeLists.txt index 6c92305f378dec..27ed04aceb4e01 100644 --- a/examples/lock-app/nrfconnect/CMakeLists.txt +++ b/examples/lock-app/nrfconnect/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lock-common/lock-app.zap ) diff --git a/examples/lock-app/telink/CMakeLists.txt b/examples/lock-app/telink/CMakeLists.txt index ee3b67b82eb15d..b2598b171f7712 100755 --- a/examples/lock-app/telink/CMakeLists.txt +++ b/examples/lock-app/telink/CMakeLists.txt @@ -53,7 +53,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lock-common/lock-app.zap ) diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index 1a418260dbb294..28b2fb5d20431d 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -39,7 +39,6 @@ add_library( ) chip_configure_data_model(chip_main - INCLUDE_SERVER ZAP_FILE ${matter_example_path}/../ota-requestor-common/ota-requestor-app.zap ) diff --git a/examples/ota-requestor-app/mbed/CMakeLists.txt b/examples/ota-requestor-app/mbed/CMakeLists.txt index d377b0ee60b6b3..3bb074ea49e213 100644 --- a/examples/ota-requestor-app/mbed/CMakeLists.txt +++ b/examples/ota-requestor-app/mbed/CMakeLists.txt @@ -60,7 +60,6 @@ target_sources(${APP_TARGET} PRIVATE ) chip_configure_data_model(${APP_TARGET} - INCLUDE_SERVER ZAP_FILE ${CHIP_ROOT}/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap ) diff --git a/examples/ota-requestor-app/telink/CMakeLists.txt b/examples/ota-requestor-app/telink/CMakeLists.txt index 62ed3c85deb51a..c4ac02600cb1ef 100644 --- a/examples/ota-requestor-app/telink/CMakeLists.txt +++ b/examples/ota-requestor-app/telink/CMakeLists.txt @@ -51,7 +51,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../ota-requestor-common/ota-requestor-app.zap ) diff --git a/examples/pump-app/nrfconnect/CMakeLists.txt b/examples/pump-app/nrfconnect/CMakeLists.txt index b599faaa1dd863..476494c4c07056 100644 --- a/examples/pump-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-app/nrfconnect/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-common/pump-app.zap ) diff --git a/examples/pump-app/telink/CMakeLists.txt b/examples/pump-app/telink/CMakeLists.txt index 79334332003646..707abb6ee26def 100755 --- a/examples/pump-app/telink/CMakeLists.txt +++ b/examples/pump-app/telink/CMakeLists.txt @@ -50,7 +50,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-common/pump-app.zap ) diff --git a/examples/pump-controller-app/nrfconnect/CMakeLists.txt b/examples/pump-controller-app/nrfconnect/CMakeLists.txt index 98d43aefafeb71..8eea9be7dac58d 100644 --- a/examples/pump-controller-app/nrfconnect/CMakeLists.txt +++ b/examples/pump-controller-app/nrfconnect/CMakeLists.txt @@ -52,7 +52,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-controller-common/pump-controller-app.zap ) diff --git a/examples/pump-controller-app/telink/CMakeLists.txt b/examples/pump-controller-app/telink/CMakeLists.txt index 3aeb7775e0555f..4b54bd87242b9a 100755 --- a/examples/pump-controller-app/telink/CMakeLists.txt +++ b/examples/pump-controller-app/telink/CMakeLists.txt @@ -50,7 +50,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-controller-common/pump-controller-app.zap ) diff --git a/examples/smoke-co-alarm-app/telink/CMakeLists.txt b/examples/smoke-co-alarm-app/telink/CMakeLists.txt index 768123896dc3e2..2f5690fb4f0576 100755 --- a/examples/smoke-co-alarm-app/telink/CMakeLists.txt +++ b/examples/smoke-co-alarm-app/telink/CMakeLists.txt @@ -51,7 +51,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../smoke-co-alarm-common/smoke-co-alarm-app.zap ) diff --git a/examples/temperature-measurement-app/telink/CMakeLists.txt b/examples/temperature-measurement-app/telink/CMakeLists.txt index 7089f7ca50fb0b..a271abf295765b 100644 --- a/examples/temperature-measurement-app/telink/CMakeLists.txt +++ b/examples/temperature-measurement-app/telink/CMakeLists.txt @@ -53,7 +53,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../temperature-measurement-common/temperature-measurement.zap ) diff --git a/examples/thermostat/nxp/zephyr/CMakeLists.txt b/examples/thermostat/nxp/zephyr/CMakeLists.txt index 2b0fb87a55e7f9..b478cfff9f2566 100644 --- a/examples/thermostat/nxp/zephyr/CMakeLists.txt +++ b/examples/thermostat/nxp/zephyr/CMakeLists.txt @@ -84,7 +84,6 @@ if(CONFIG_CHIP_OTA_REQUESTOR) endif() chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/../../thermostat/nxp/zap/thermostat_matter_wifi.zap ) diff --git a/examples/thermostat/telink/CMakeLists.txt b/examples/thermostat/telink/CMakeLists.txt index 74a2565ba4a60e..166d8b8189a8e8 100755 --- a/examples/thermostat/telink/CMakeLists.txt +++ b/examples/thermostat/telink/CMakeLists.txt @@ -53,7 +53,6 @@ target_sources(app PRIVATE ${TELINK_COMMON}/zephyr_ext/zephyr_ws2812.c) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../thermostat-common/thermostat.zap ) diff --git a/examples/window-app/nrfconnect/CMakeLists.txt b/examples/window-app/nrfconnect/CMakeLists.txt index e6f7ebca632047..7418f7054649ef 100644 --- a/examples/window-app/nrfconnect/CMakeLists.txt +++ b/examples/window-app/nrfconnect/CMakeLists.txt @@ -55,7 +55,6 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/PWMDevice.cpp) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${WIN_APP_COMMON_DIR}/window-app.zap ) diff --git a/examples/window-app/telink/CMakeLists.txt b/examples/window-app/telink/CMakeLists.txt index a5ff986798de1e..1a7a4611c81d9f 100644 --- a/examples/window-app/telink/CMakeLists.txt +++ b/examples/window-app/telink/CMakeLists.txt @@ -53,7 +53,6 @@ target_sources(app PRIVATE ) chip_configure_data_model(app - INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../common/window-app.zap ) diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake index 499bf100256546..e2d05adb01e4a1 100644 --- a/src/app/chip_data_model.cmake +++ b/src/app/chip_data_model.cmake @@ -60,7 +60,6 @@ endfunction() # Available options are: # SCOPE CMake scope keyword that defines the scope of included sources. # The default is PRIVATE scope. -# INCLUDE_SERVER Include source files from src/app/server directory. # ZAP_FILE Path to the ZAP file, used to determine the list of clusters # supported by the application. # IDL .matter IDL file to use for codegen. Inferred from ZAP_FILE @@ -71,27 +70,26 @@ endfunction() # function(chip_configure_data_model APP_TARGET) set(SCOPE PRIVATE) - cmake_parse_arguments(ARG "INCLUDE_SERVER" "SCOPE;ZAP_FILE;IDL" "EXTERNAL_CLUSTERS" ${ARGN}) + cmake_parse_arguments(ARG "" "SCOPE;ZAP_FILE;IDL" "EXTERNAL_CLUSTERS" ${ARGN}) if(ARG_SCOPE) set(SCOPE ${ARG_SCOPE}) endif() - if(ARG_INCLUDE_SERVER) - target_sources(${APP_TARGET} ${SCOPE} - ${CHIP_APP_BASE_DIR}/server/AclStorage.cpp - ${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp - ${CHIP_APP_BASE_DIR}/server/CommissioningWindowManager.cpp - ${CHIP_APP_BASE_DIR}/server/Dnssd.cpp - ${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp - ${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp - ${CHIP_APP_BASE_DIR}/server/Server.cpp - ) + # CMAKE data model auto-includes the server side implementation + target_sources(${APP_TARGET} ${SCOPE} + ${CHIP_APP_BASE_DIR}/server/AclStorage.cpp + ${CHIP_APP_BASE_DIR}/server/DefaultAclStorage.cpp + ${CHIP_APP_BASE_DIR}/server/CommissioningWindowManager.cpp + ${CHIP_APP_BASE_DIR}/server/Dnssd.cpp + ${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp + ${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp + ${CHIP_APP_BASE_DIR}/server/Server.cpp + ) - target_compile_options(${APP_TARGET} ${SCOPE} - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" - ) - endif() + target_compile_options(${APP_TARGET} ${SCOPE} + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" + ) if(ARG_ZAP_FILE) chip_configure_zap_file(${APP_TARGET} ${ARG_ZAP_FILE} "${ARG_EXTERNAL_CLUSTERS}") @@ -119,6 +117,27 @@ function(chip_configure_data_model APP_TARGET) set(APP_GEN_FILES) endif() + # These are: + # //src/app/icd/server:notfier + # //src/app/icd/server:monitoring-table + # //src/app/icd/server:configuration-data + # + # TODO: ideally we would avoid duplication and would link gn-built items. In this case + # it may be slightly harder because these are source_sets rather than libraries. + target_sources(${APP_TARGET} ${SCOPE} + ${CHIP_APP_BASE_DIR}/icd/server/ICDMonitoringTable.cpp + ${CHIP_APP_BASE_DIR}/icd/server/ICDNotifier.cpp + ${CHIP_APP_BASE_DIR}/icd/server/ICDConfigurationData.cpp + ) + + # This is: + # //src/app/common:cluster-objects + # + # TODO: ideally we would avoid duplication and would link gn-built items + target_sources(${APP_TARGET} ${SCOPE} + ${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp + ) + chip_zapgen(${APP_TARGET}-zapgen INPUT "${ARG_ZAP_FILE}" GENERATOR "app-templates" @@ -133,18 +152,12 @@ function(chip_configure_data_model APP_TARGET) target_include_directories(${APP_TARGET} ${SCOPE} "${APP_TEMPLATES_GEN_DIR}") add_dependencies(${APP_TARGET} ${APP_TARGET}-zapgen) - # TODO: source for codedgen_data_model ??? - target_sources(${APP_TARGET} ${SCOPE} ${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp - ${CHIP_APP_BASE_DIR}/../../zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp ${CHIP_APP_BASE_DIR}/reporting/reporting.cpp ${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp ${CHIP_APP_BASE_DIR}/util/attribute-table.cpp ${CHIP_APP_BASE_DIR}/util/binding-table.cpp - ${CHIP_APP_BASE_DIR}/icd/server/ICDMonitoringTable.cpp - ${CHIP_APP_BASE_DIR}/icd/server/ICDNotifier.cpp - ${CHIP_APP_BASE_DIR}/icd/server/ICDConfigurationData.cpp ${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp ${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp ${CHIP_APP_BASE_DIR}/util/ember-global-attribute-access-interface.cpp From a192ec64e50961c030063357ad37f44f59e0ae5f Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:56:22 +0200 Subject: [PATCH 07/42] shutting down Applications (#35561) --- examples/all-clusters-app/linux/fuzzing-main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/all-clusters-app/linux/fuzzing-main.cpp b/examples/all-clusters-app/linux/fuzzing-main.cpp index 4fe21865727371..793a70a6a9fa3e 100644 --- a/examples/all-clusters-app/linux/fuzzing-main.cpp +++ b/examples/all-clusters-app/linux/fuzzing-main.cpp @@ -31,6 +31,7 @@ LinuxCommissionableDataProvider gCommissionableDataProvider; void CleanShutdown() { + ApplicationShutdown(); Server::GetInstance().Shutdown(); PlatformMgr().Shutdown(); // TODO: We don't Platform::MemoryShutdown because ~CASESessionManager calls From 64a79189f7725145e96e25a3594e137877456075 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 12 Sep 2024 17:57:56 -0700 Subject: [PATCH 08/42] Show connect to bridge info to console (#35564) --- .../commands/interactive/InteractiveCommands.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/fabric-admin/commands/interactive/InteractiveCommands.cpp b/examples/fabric-admin/commands/interactive/InteractiveCommands.cpp index aabcb09f2314b2..47947bb5a86151 100644 --- a/examples/fabric-admin/commands/interactive/InteractiveCommands.cpp +++ b/examples/fabric-admin/commands/interactive/InteractiveCommands.cpp @@ -119,11 +119,13 @@ void AttemptRpcClientConnect(System::Layer * systemLayer, void * appState) { if (StartRpcClient() == CHIP_NO_ERROR) { - ChipLogProgress(NotSpecified, "Connected to Fabric-Bridge"); + // print to console + fprintf(stderr, "Connected to Fabric-Bridge\n"); } else { - ChipLogError(NotSpecified, "Failed to connect to Fabric-Bridge, retry in %d seconds....", kRetryIntervalS); + // print to console + fprintf(stderr, "Failed to connect to Fabric-Bridge, retry in %d seconds....\n", kRetryIntervalS); systemLayer->StartTimer(System::Clock::Seconds16(kRetryIntervalS), AttemptRpcClientConnect, nullptr); } } From 85d115887b798d0f1a47dcebbfdb59adfcdd4845 Mon Sep 17 00:00:00 2001 From: Grant Erickson Date: Thu, 12 Sep 2024 20:36:51 -0700 Subject: [PATCH 09/42] Make command line usage of `run_zaptool.sh` more easily discoverable (#35546). (#35548) * Formalize command line option and argument processing. * Add support '-h' for usage in addition to '--help'. * Change shebang from '/bin/bash' to '/usr/bin/env bash'. * Update the file copyright header. --- scripts/tools/zap/run_zaptool.sh | 65 ++++++++++++++++++++++++++++---- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/scripts/tools/zap/run_zaptool.sh b/scripts/tools/zap/run_zaptool.sh index 2895ef4e718d10..4caf9d5610076f 100755 --- a/scripts/tools/zap/run_zaptool.sh +++ b/scripts/tools/zap/run_zaptool.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/usr/bin/env bash # -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2021-2024 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. @@ -16,20 +16,71 @@ # limitations under the License. # +ZAP_FILE="" + function _get_fullpath() { cd "$(dirname "$1")" >/dev/null && echo "$PWD/$(basename "$1")" } -set -e +function _print_usage() { + local name="$(basename "${0}")" + local status="${1}" + + echo "Usage: $name [ option ... ] [ ]" + + if [ "$status" -ne 0 ]; then + echo "Try '$name -h' for more information." + fi -[[ "$1" == "--help" ]] && { - echo "Usage: $0 [ZAP-file-path]" >&2 - exit 0 + if [ "$status" -ne 1 ]; then + echo "" + echo "ZAP Tool Wrapper" + echo "" + echo " General Options:" + echo "" + echo " -h, --help Display this help, then exit." + echo "" + fi + + exit "$status" } +# Main + +set -e + +# Command Line Option Parsing + +while [ "${#}" -gt 0 ]; do + + case "${1}" in + + -h | --help) + _print_usage 0 + ;; + + -*) + echo "ERROR: Unknown or invalid option: '${1}'" >&2 + _print_usage 1 + ;; + + *) + if [ -z "$ZAP_FILE" ]; then + ZAP_FILE="${1}" + shift 1 + else + echo "ERROR: Unexpected argument: '${1}'" >&2 + _print_usage 1 + fi + ;; + + esac + +done + SCRIPT_PATH="$(_get_fullpath "$0")" CHIP_ROOT="${SCRIPT_PATH%/scripts/tools/zap/run_zaptool.sh}" -[[ -n "$1" ]] && ZAP_ARGS="-i \"$(_get_fullpath "$1")\"" || ZAP_ARGS="" +[[ -n "${ZAP_FILE}" ]] && ZAP_ARGS="-i \"$(_get_fullpath "$ZAP_FILE")\"" || ZAP_ARGS="" if [[ -z "$ZAP_INSTALL_PATH" && -n "$PW_ZAP_CIPD_INSTALL_DIR" ]]; then ZAP_INSTALL_PATH="$PW_ZAP_CIPD_INSTALL_DIR" From 7a54490fc3e37a67692073922ec7ee6f15c48473 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 13 Sep 2024 12:15:21 +0530 Subject: [PATCH 10/42] [ESP32] Use the nvs generator from pypi instead from IDF_PATH (#35553) --- scripts/setup/requirements.esp32.txt | 1 + scripts/tools/generate_esp32_chip_factory_bin.py | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index b2584bbac08803..63ec11c1c452b6 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -14,3 +14,4 @@ python-socketio<5 itsdangerous<2.1 ; python_version < "3.11" esp_idf_monitor==1.1.1 esp-idf-kconfig==1.2.0 +esp_idf_nvs_partition_gen==0.1.2 diff --git a/scripts/tools/generate_esp32_chip_factory_bin.py b/scripts/tools/generate_esp32_chip_factory_bin.py index ef23dc61b337ef..dade2ff82463d8 100755 --- a/scripts/tools/generate_esp32_chip_factory_bin.py +++ b/scripts/tools/generate_esp32_chip_factory_bin.py @@ -25,6 +25,7 @@ from types import SimpleNamespace import cryptography.x509 +import esp_idf_nvs_partition_gen.nvs_partition_gen as nvs_partition_gen from esp_secure_cert.tlv_format import generate_partition_ds, generate_partition_no_ds, tlv_priv_key_t, tlv_priv_key_type_t CHIP_TOPDIR = os.path.dirname(os.path.realpath(__file__))[:-len(os.path.join('scripts', 'tools'))] @@ -33,15 +34,6 @@ sys.path.insert(0, os.path.join(CHIP_TOPDIR, 'src', 'setup_payload', 'python')) from SetupPayload import CommissioningFlow, SetupPayload # noqa: E402 isort:skip -if os.getenv('IDF_PATH'): - sys.path.insert(0, os.path.join(os.getenv('IDF_PATH'), - 'components', - 'nvs_flash', - 'nvs_partition_generator')) - import nvs_partition_gen -else: - sys.stderr.write("Please set the IDF_PATH environment variable.") - exit(0) INVALID_PASSCODES = [00000000, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, 99999999, 12345678, 87654321] From 491998bb906f4862ae7cac78c7273b0fc89e8617 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Sep 2024 10:14:53 -0400 Subject: [PATCH 11/42] Stop persistent operational browse when all controllers are suspended. (#35541) * Stop persistent operational browse when all controllers are suspended. * Address review comments. --- .../Framework/CHIP/MTRDeviceController.mm | 38 +++++++++++-- .../CHIP/MTRDeviceControllerFactory.mm | 18 +++--- .../MTRDeviceControllerFactory_Internal.h | 2 + .../CHIP/MTRDeviceController_Concrete.mm | 30 ++++++++++ .../Framework/CHIP/MTROperationalBrowser.h | 22 +++++-- .../Framework/CHIP/MTROperationalBrowser.mm | 57 ++++++++++++++----- .../CHIPTests/MTRPerControllerStorageTests.m | 52 ++++++++++++++++- 7 files changed, 185 insertions(+), 34 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index b84505f8185442..04fa9a9bec05e9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -188,10 +188,6 @@ - (instancetype)initForSubclasses:(BOOL)startSuspended _shutdownPending = NO; _assertionLock = OS_UNFAIR_LOCK_INIT; - // All synchronous suspend/resume activity has to be protected by - // @synchronized(self), so that parts of suspend/resume can't - // interleave with each other. Using @synchronized here because - // MTRDevice may call isSuspended. _suspended = startSuspended; _nodeIDToDeviceMap = [NSMapTable strongToWeakObjectsMapTable]; @@ -399,6 +395,11 @@ - (void)suspend { MTR_LOG("%@ suspending", self); + if (![self isRunning]) { + MTR_LOG_ERROR("%@ not running; can't suspend", self); + return; + } + NSArray * devicesToSuspend; { std::lock_guard lock(*self.deviceMapLock); @@ -406,6 +407,11 @@ - (void)suspend // for any given device exactly one of two things is true: // * It is in the snapshot we are creating // * It is created after we have changed our _suspended state. + if (_suspended) { + MTR_LOG("%@ already suspended", self); + return; + } + _suspended = YES; devicesToSuspend = [self.nodeIDToDeviceMap objectEnumerator].allObjects; } @@ -421,12 +427,24 @@ - (void)suspend // * CASE sessions in general. // * Possibly try to see whether we can change our fabric entry to not advertise and restart advertising. [self _notifyDelegatesOfSuspendState]; + + [self _controllerSuspended]; +} + +- (void)_controllerSuspended +{ + // Subclass hook; nothing to do. } - (void)resume { MTR_LOG("%@ resuming", self); + if (![self isRunning]) { + MTR_LOG_ERROR("%@ not running; can't resume", self); + return; + } + NSArray * devicesToResume; { std::lock_guard lock(*self.deviceMapLock); @@ -434,6 +452,11 @@ - (void)resume // for any given device exactly one of two things is true: // * It is in the snapshot we are creating // * It is created after we have changed our _suspended state. + if (!_suspended) { + MTR_LOG("%@ already not suspended", self); + return; + } + _suspended = NO; devicesToResume = [self.nodeIDToDeviceMap objectEnumerator].allObjects; } @@ -444,6 +467,13 @@ - (void)resume } [self _notifyDelegatesOfSuspendState]; + + [self _controllerResumed]; +} + +- (void)_controllerResumed +{ + // Subclass hook; nothing to do. } - (BOOL)matchesPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index 9cd3b62340d20a..e47415880cdb13 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -111,7 +111,7 @@ @implementation MTRDeviceControllerFactory { MTRSessionResumptionStorageBridge * _sessionResumptionStorage; PersistentStorageOperationalKeystore * _keystore; Credentials::PersistentStorageOpCertStore * _opCertStore; - MTROperationalBrowser * _operationalBrowser; + std::unique_ptr _operationalBrowser; // productAttestationAuthorityCertificates and certificationDeclarationCertificates are just copied // from MTRDeviceControllerFactoryParams. @@ -223,6 +223,8 @@ - (instancetype)init _serverEndpointsLock = OS_UNFAIR_LOCK_INIT; _serverEndpoints = [[NSMutableArray alloc] init]; + _operationalBrowser = std::make_unique(self, self->_chipWorkQueue); + return self; } @@ -557,12 +559,6 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * return nil; } - if ([_controllers count] == 0) { - dispatch_sync(_chipWorkQueue, ^{ - self->_operationalBrowser = new MTROperationalBrowser(self, self->_chipWorkQueue); - }); - } - // Add the controller to _controllers now, so if we fail partway through its // startup we will still do the right cleanups. os_unfair_lock_lock(&_controllersLock); @@ -943,9 +939,6 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller // OtaProviderDelegateBridge uses some services provided by the system // state without retaining it. if (_controllers.count == 0) { - delete self->_operationalBrowser; - self->_operationalBrowser = nullptr; - if (_otaProviderDelegateBridge) { _otaProviderDelegateBridge->Shutdown(); _otaProviderDelegateBridge.reset(); @@ -1246,6 +1239,11 @@ - (PersistentStorageDelegate *)storageDelegate return &_groupDataProvider; } +- (MTROperationalBrowser *)operationalBrowser +{ + return _operationalBrowser.get(); +} + @end @interface MTRDummyStorage : NSObject diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h index c35a0b4a1692f0..58592b6ed4b670 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory_Internal.h @@ -30,6 +30,7 @@ #import "MTRDefines_Internal.h" #import "MTRDeviceControllerFactory.h" +#import "MTROperationalBrowser.h" #include #include @@ -108,6 +109,7 @@ MTR_DIRECT_MEMBERS @property (readonly) chip::PersistentStorageDelegate * storageDelegate; @property (readonly) chip::Credentials::GroupDataProvider * groupDataProvider; +@property (readonly, assign) MTROperationalBrowser * operationalBrowser; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index bdcbafae1b6c9d..a73a644b85302a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -330,6 +330,15 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory self.rootPublicKey = nil; _storageBehaviorConfiguration = storageBehaviorConfiguration; + + // We let the operational browser know about ourselves here, because + // after this point we are guaranteed to have shutDownCppController + // called by the factory. + if (!startSuspended) { + dispatch_async(_chipWorkQueue, ^{ + factory.operationalBrowser->ControllerActivated(); + }); + } } return self; } @@ -344,6 +353,22 @@ - (BOOL)isRunning return _cppCommissioner != nullptr; } +- (void)_controllerSuspended +{ + MTRDeviceControllerFactory * factory = _factory; + dispatch_async(_chipWorkQueue, ^{ + factory.operationalBrowser->ControllerDeactivated(); + }); +} + +- (void)_controllerResumed +{ + MTRDeviceControllerFactory * factory = _factory; + dispatch_async(_chipWorkQueue, ^{ + factory.operationalBrowser->ControllerActivated(); + }); +} + - (BOOL)matchesPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate { if (!operationalCertificate || !rootCertificate) { @@ -471,6 +496,11 @@ - (void)shutDownCppController _operationalCredentialsDelegate->SetDeviceCommissioner(nullptr); } } + + if (!self.suspended) { + _factory.operationalBrowser->ControllerDeactivated(); + } + _shutdownPending = NO; } diff --git a/src/darwin/Framework/CHIP/MTROperationalBrowser.h b/src/darwin/Framework/CHIP/MTROperationalBrowser.h index 0cdcbf6d869736..4115f0e887d150 100644 --- a/src/darwin/Framework/CHIP/MTROperationalBrowser.h +++ b/src/darwin/Framework/CHIP/MTROperationalBrowser.h @@ -23,19 +23,29 @@ class MTROperationalBrowser { public: - // Should be created at a point when the factory starts up the event loop, - // and destroyed when the event loop is stopped. + // Should be created at a point when the dispatch queue is available. MTROperationalBrowser(MTRDeviceControllerFactory * aFactory, dispatch_queue_t aQueue); ~MTROperationalBrowser(); + // ControllerActivated should be called, on the Matter queue, when a + // controller is either started in a non-suspended state or stops being + // suspended. + + // ControllerDeactivated should be called, on the Matter queue, when a + // controller is either suspended or shut down while in a non-suspended + // state. + void ControllerActivated(); + void ControllerDeactivated(); + private: static void OnBrowse(DNSServiceRef aServiceRef, DNSServiceFlags aFlags, uint32_t aInterfaceId, DNSServiceErrorType aError, const char * aName, const char * aType, const char * aDomain, void * aContext); - void TryToStartBrowse(); + void EnsureBrowse(); + void StopBrowse(); - MTRDeviceControllerFactory * const mDeviceControllerFactory; + MTRDeviceControllerFactory * const __weak mDeviceControllerFactory; dispatch_queue_t mQueue; DNSServiceRef mBrowseRef; @@ -44,4 +54,8 @@ class MTROperationalBrowser // If mIsDestroying is true, we're in our destructor, shutting things down. bool mIsDestroying = false; + + // Count of controllers that are currently active; we aim to have a browse + // going while this is nonzero; + size_t mActiveControllerCount = 0; }; diff --git a/src/darwin/Framework/CHIP/MTROperationalBrowser.mm b/src/darwin/Framework/CHIP/MTROperationalBrowser.mm index 1ddc7868d88ecc..b5717373ab2933 100644 --- a/src/darwin/Framework/CHIP/MTROperationalBrowser.mm +++ b/src/darwin/Framework/CHIP/MTROperationalBrowser.mm @@ -37,26 +37,49 @@ : mDeviceControllerFactory(aFactory) , mQueue(aQueue) { - // If we fail to start a browse, there's nothing our consumer would do - // differently, so we might as well do this in the constructor. - TryToStartBrowse(); } -void MTROperationalBrowser::TryToStartBrowse() +void MTROperationalBrowser::ControllerActivated() { assertChipStackLockedByCurrentThread(); - ChipLogProgress(Controller, "Trying to start persistent operational browse"); + if (mActiveControllerCount == 0) { + EnsureBrowse(); + } + ++mActiveControllerCount; +} + +void MTROperationalBrowser::ControllerDeactivated() +{ + assertChipStackLockedByCurrentThread(); + + if (mActiveControllerCount == 1) { + StopBrowse(); + } + + --mActiveControllerCount; +} + +void MTROperationalBrowser::EnsureBrowse() +{ + assertChipStackLockedByCurrentThread(); + + if (mInitialized) { + ChipLogProgress(Controller, "%p already has a persistent operational browse running", this); + return; + } + + ChipLogProgress(Controller, "%p trying to start persistent operational browse", this); auto err = DNSServiceCreateConnection(&mBrowseRef); if (err != kDNSServiceErr_NoError) { - ChipLogError(Controller, "Failed to create connection for persistent operational browse: %" PRId32, err); + ChipLogError(Controller, "%p failed to create connection for persistent operational browse: %" PRId32, this, err); return; } err = DNSServiceSetDispatchQueue(mBrowseRef, mQueue); if (err != kDNSServiceErr_NoError) { - ChipLogError(Controller, "Failed to set up dispatch queue properly for persistent operational browse: %" PRId32, err); + ChipLogError(Controller, "%p failed to set up dispatch queue properly for persistent operational browse: %" PRId32, this, err); DNSServiceRefDeallocate(mBrowseRef); return; } @@ -67,11 +90,20 @@ auto browseRef = mBrowseRef; // Mandatory copy because of kDNSServiceFlagsShareConnection. err = DNSServiceBrowse(&browseRef, kDNSServiceFlagsShareConnection, kDNSServiceInterfaceIndexAny, kOperationalType, domain, OnBrowse, this); if (err != kDNSServiceErr_NoError) { - ChipLogError(Controller, "Failed to start persistent operational browse for \"%s\" domain: %" PRId32, StringOrNullMarker(domain), err); + ChipLogError(Controller, "%p failed to start persistent operational browse for \"%s\" domain: %" PRId32, this, StringOrNullMarker(domain), err); } } } +void MTROperationalBrowser::StopBrowse() +{ + ChipLogProgress(Controller, "%p stopping persistent operational browse", this); + if (mInitialized) { + DNSServiceRefDeallocate(mBrowseRef); + mInitialized = false; + } +} + void MTROperationalBrowser::OnBrowse(DNSServiceRef aServiceRef, DNSServiceFlags aFlags, uint32_t aInterfaceId, DNSServiceErrorType aError, const char * aName, const char * aType, const char * aDomain, void * aContext) { @@ -82,14 +114,13 @@ // We only expect to get notified about our type/domain. if (aError != kDNSServiceErr_NoError) { ChipLogError(Controller, "Operational browse failure: %" PRId32, aError); - DNSServiceRefDeallocate(self->mBrowseRef); - self->mInitialized = false; + self->StopBrowse(); // We shouldn't really get callbacks under our destructor, but guard // against it just in case. if (!self->mIsDestroying) { // Try to start a new browse, so we have one going. - self->TryToStartBrowse(); + self->EnsureBrowse(); } return; } @@ -116,7 +147,5 @@ mIsDestroying = true; - if (mInitialized) { - DNSServiceRefDeallocate(mBrowseRef); - } + StopBrowse(); } diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index 48500f2933dcb4..db0a8ab848576c 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -76,6 +76,30 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr @end +@interface MTRPerControllerStorageTestsSuspensionDelegate : NSObject +@property (nonatomic, strong) XCTestExpectation * expectation; +@property (nonatomic, assign) BOOL expectedSuspensionState; +@end + +@implementation MTRPerControllerStorageTestsSuspensionDelegate +- (id)initWithExpectation:(XCTestExpectation *)expectation expectedSuspensionState:(BOOL)expectedSuspensionState +{ + self = [super init]; + if (self) { + _expectation = expectation; + _expectedSuspensionState = expectedSuspensionState; + } + return self; +} + +- (void)controller:(MTRDeviceController *)controller + isSuspended:(BOOL)suspended +{ + XCTAssertEqual(suspended, self.expectedSuspensionState); + [self.expectation fulfill]; +} +@end + @interface MTRPerControllerStorageTestsCertificateIssuer : NSObject - (instancetype)initWithRootCertificate:(MTRCertificateDERBytes)rootCertificate intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate @@ -1713,6 +1737,17 @@ - (void)test013_suspendDevices [becameUnreachableExpectation fulfill]; }; + XCTestExpectation * suspendedExpectation = [self expectationWithDescription:@"Controller has been suspended"]; + __auto_type * suspensionDelegate = [[MTRPerControllerStorageTestsSuspensionDelegate alloc] initWithExpectation:suspendedExpectation expectedSuspensionState:YES]; + [controller addDeviceControllerDelegate:suspensionDelegate queue:queue]; + + XCTestExpectation * browseStoppedExpectation = [self expectationWithDescription:@"Operational browse has stopped"]; + MTRSetLogCallback(MTRLogTypeProgress, ^(MTRLogType type, NSString * moduleName, NSString * message) { + if ([message containsString:@"stopping persistent operational browse"]) { + [browseStoppedExpectation fulfill]; + } + }); + [controller suspend]; XCTAssertTrue(controller.suspended); @@ -1723,7 +1758,7 @@ - (void)test013_suspendDevices [toggle2Expectation fulfill]; }]; - [self waitForExpectations:@[ becameUnreachableExpectation, toggle2Expectation ] timeout:kTimeoutInSeconds]; + [self waitForExpectations:@[ becameUnreachableExpectation, toggle2Expectation, suspendedExpectation, browseStoppedExpectation ] timeout:kTimeoutInSeconds]; XCTestExpectation * newSubscriptionExpectation = [self expectationWithDescription:@"Subscription has been set up again"]; XCTestExpectation * newReachableExpectation = [self expectationWithDescription:@"Device became reachable again"]; @@ -1735,10 +1770,23 @@ - (void)test013_suspendDevices [newSubscriptionExpectation fulfill]; }; + XCTestExpectation * resumedExpectation = [self expectationWithDescription:@"Controller has been resumed"]; + suspensionDelegate.expectation = resumedExpectation; + suspensionDelegate.expectedSuspensionState = NO; + + XCTestExpectation * browseRestartedExpectation = [self expectationWithDescription:@"Operational browse has re-started"]; + MTRSetLogCallback(MTRLogTypeProgress, ^(MTRLogType type, NSString * moduleName, NSString * message) { + if ([message containsString:@"trying to start persistent operational browse"]) { + [browseRestartedExpectation fulfill]; + } + }); + [controller resume]; XCTAssertFalse(controller.suspended); - [self waitForExpectations:@[ newSubscriptionExpectation, newReachableExpectation ] timeout:kSubscriptionTimeoutInSeconds]; + [self waitForExpectations:@[ newSubscriptionExpectation, newReachableExpectation, resumedExpectation, browseRestartedExpectation ] timeout:kSubscriptionTimeoutInSeconds]; + + MTRSetLogCallback(MTRLogTypeProgress, nil); // Test that sending a command works again. Clear the delegate's onReportEnd // first, so reports from the command don't trigger it. From d60a12682609eff520de784a1c2d1549345daaec Mon Sep 17 00:00:00 2001 From: Alex Tsitsiura Date: Fri, 13 Sep 2024 17:17:40 +0300 Subject: [PATCH 12/42] [Telink] Update builds to docker version 76 (#35569) --- .github/workflows/bloat_check.yaml | 2 +- .github/workflows/build.yaml | 10 +++++----- .github/workflows/chef.yaml | 8 ++++---- .github/workflows/doxygen.yaml | 2 +- .github/workflows/examples-ameba.yaml | 2 +- .github/workflows/examples-asr.yaml | 2 +- .github/workflows/examples-bouffalolab.yaml | 2 +- .github/workflows/examples-cc13xx_26xx.yaml | 2 +- .github/workflows/examples-cc32xx.yaml | 2 +- .github/workflows/examples-efr32.yaml | 2 +- .github/workflows/examples-esp32.yaml | 4 ++-- .github/workflows/examples-infineon.yaml | 2 +- .github/workflows/examples-linux-arm.yaml | 2 +- .github/workflows/examples-linux-imx.yaml | 2 +- .github/workflows/examples-linux-standalone.yaml | 2 +- .../workflows/examples-linux-tv-casting-app.yaml | 2 +- .github/workflows/examples-mw320.yaml | 2 +- .github/workflows/examples-nrfconnect.yaml | 2 +- .github/workflows/examples-nuttx.yaml | 2 +- .github/workflows/examples-nxp.yaml | 6 +++--- .github/workflows/examples-openiotsdk.yaml | 2 +- .github/workflows/examples-qpg.yaml | 2 +- .github/workflows/examples-stm32.yaml | 2 +- .github/workflows/examples-telink.yaml | 2 +- .github/workflows/examples-tizen.yaml | 2 +- .github/workflows/full-android.yaml | 2 +- .github/workflows/fuzzing-build.yaml | 2 +- .github/workflows/java-tests.yaml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/minimal-build.yaml | 4 ++-- .github/workflows/qemu.yaml | 2 +- .github/workflows/release_artifacts.yaml | 4 ++-- .github/workflows/smoketest-android.yaml | 2 +- .github/workflows/tests.yaml | 4 ++-- .github/workflows/unit_integration_test.yaml | 2 +- .github/workflows/zap_regeneration.yaml | 2 +- .github/workflows/zap_templates.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 ++-- examples/all-clusters-minimal-app/ameba/README.md | 4 ++-- examples/light-switch-app/ameba/README.md | 4 ++-- examples/lighting-app/ameba/README.md | 4 ++-- examples/ota-requestor-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/README.md | 4 ++-- integrations/cloudbuild/chef.yaml | 8 ++++---- integrations/cloudbuild/smoke-test.yaml | 14 +++++++------- 45 files changed, 73 insertions(+), 73 deletions(-) diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 870c5f379e5eb8..dc9eaa40f7e4ba 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 83ecc7e00a2192..0617b05d657008 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,7 +42,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -138,7 +138,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -283,7 +283,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -346,7 +346,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" @@ -457,7 +457,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/chef.yaml b/.github/workflows/chef.yaml index 642cdb6cf87e92..07f4cac37cc008 100644 --- a/.github/workflows/chef.yaml +++ b/.github/workflows/chef.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 options: --user root steps: @@ -56,7 +56,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:74 + image: ghcr.io/project-chip/chip-build-esp32:76 options: --user root steps: @@ -77,7 +77,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:74 + image: ghcr.io/project-chip/chip-build-nrf-platform:76 options: --user root steps: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:74 + image: ghcr.io/project-chip/chip-build-telink:76 options: --user root steps: diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index d29b620c374165..40bf2b9e8c1c96 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-doxygen:74 + image: ghcr.io/project-chip/chip-build-doxygen:76 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 62a3bf55119b3d..b18f44ec9d9206 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:74 + image: ghcr.io/project-chip/chip-build-ameba:76 options: --user root steps: diff --git a/.github/workflows/examples-asr.yaml b/.github/workflows/examples-asr.yaml index 840811d13daa6a..46881ea4810a33 100644 --- a/.github/workflows/examples-asr.yaml +++ b/.github/workflows/examples-asr.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-asr:74 + image: ghcr.io/project-chip/chip-build-asr:76 options: --user root steps: diff --git a/.github/workflows/examples-bouffalolab.yaml b/.github/workflows/examples-bouffalolab.yaml index af20a4c5b0872f..d3191c598b57a0 100644 --- a/.github/workflows/examples-bouffalolab.yaml +++ b/.github/workflows/examples-bouffalolab.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-bouffalolab:74 + image: ghcr.io/project-chip/chip-build-bouffalolab:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc13xx_26xx.yaml b/.github/workflows/examples-cc13xx_26xx.yaml index 53c813d0b4c433..22a1d727284247 100644 --- a/.github/workflows/examples-cc13xx_26xx.yaml +++ b/.github/workflows/examples-cc13xx_26xx.yaml @@ -45,7 +45,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:74 + image: ghcr.io/project-chip/chip-build-ti:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-cc32xx.yaml b/.github/workflows/examples-cc32xx.yaml index 091a5eeabc4361..c07313f82cb8d8 100644 --- a/.github/workflows/examples-cc32xx.yaml +++ b/.github/workflows/examples-cc32xx.yaml @@ -43,7 +43,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ti:74 + image: ghcr.io/project-chip/chip-build-ti:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 9e3adbd459befe..66b62945978077 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-efr32:74 + image: ghcr.io/project-chip/chip-build-efr32:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 5d84540eda4676..168b84ddc66779 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:74 + image: ghcr.io/project-chip/chip-build-esp32:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -126,7 +126,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32:74 + image: ghcr.io/project-chip/chip-build-esp32:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index 0fcfac2ce7890e..f4547d86a71bcb 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-infineon:74 + image: ghcr.io/project-chip/chip-build-infineon:76 env: # TODO: this should probably be part of the dockerfile itself CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2 diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 41fe2456518850..8ea6b400f23b74 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-crosscompile:74 + image: ghcr.io/project-chip/chip-build-crosscompile:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-imx.yaml b/.github/workflows/examples-linux-imx.yaml index 6ad5f4c9d9c31e..d1224852b734e9 100644 --- a/.github/workflows/examples-linux-imx.yaml +++ b/.github/workflows/examples-linux-imx.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-imx:74 + image: ghcr.io/project-chip/chip-build-imx:76 steps: - name: Checkout diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index aa4051ea308a56..a3ca553632a956 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-tv-casting-app.yaml b/.github/workflows/examples-linux-tv-casting-app.yaml index e2ff0f9f6697da..3159685f8f4704 100644 --- a/.github/workflows/examples-linux-tv-casting-app.yaml +++ b/.github/workflows/examples-linux-tv-casting-app.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 steps: - name: Checkout diff --git a/.github/workflows/examples-mw320.yaml b/.github/workflows/examples-mw320.yaml index 04664c28cf339e..212bebfe3c70b9 100644 --- a/.github/workflows/examples-mw320.yaml +++ b/.github/workflows/examples-mw320.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 13b0ae9c691d7c..c9b16f36072295 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nrf-platform:74 + image: ghcr.io/project-chip/chip-build-nrf-platform:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nuttx.yaml b/.github/workflows/examples-nuttx.yaml index d1bf7594b0a332..2de7f00e13dbd5 100644 --- a/.github/workflows/examples-nuttx.yaml +++ b/.github/workflows/examples-nuttx.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nuttx:74 + image: ghcr.io/project-chip/chip-build-nuttx:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index d09e893f2909dd..c0aee7fc50beff 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-k32w:74 + image: ghcr.io/project-chip/chip-build-k32w:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -204,7 +204,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp:74 + image: ghcr.io/project-chip/chip-build-nxp:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: @@ -266,7 +266,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-nxp-zephyr:74 + image: ghcr.io/project-chip/chip-build-nxp-zephyr:76 steps: - name: Checkout diff --git a/.github/workflows/examples-openiotsdk.yaml b/.github/workflows/examples-openiotsdk.yaml index d85a789a0bcef7..c1bf85860cb65e 100644 --- a/.github/workflows/examples-openiotsdk.yaml +++ b/.github/workflows/examples-openiotsdk.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-openiotsdk:74 + image: ghcr.io/project-chip/chip-build-openiotsdk:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" options: --privileged diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index 18d47cf8ef9937..bd0ef01d7aba60 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -39,7 +39,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-stm32.yaml b/.github/workflows/examples-stm32.yaml index 6c4fa05864efff..291b9264c626da 100644 --- a/.github/workflows/examples-stm32.yaml +++ b/.github/workflows/examples-stm32.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index 904ae98fbcabcc..f67da724ca0764 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-telink:74 + image: ghcr.io/project-chip/chip-build-telink:76 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index f6571342a84618..abec382c564f43 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen:74 + image: ghcr.io/project-chip/chip-build-tizen:76 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 43aee09a821be9..29822767571416 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -38,7 +38,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:74 + image: ghcr.io/project-chip/chip-build-android:76 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/fuzzing-build.yaml b/.github/workflows/fuzzing-build.yaml index d839317bc4248e..19e0bcdd2075ef 100644 --- a/.github/workflows/fuzzing-build.yaml +++ b/.github/workflows/fuzzing-build.yaml @@ -33,7 +33,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/java-tests.yaml b/.github/workflows/java-tests.yaml index a43fdfb7f49d4d..f585829f29f589 100644 --- a/.github/workflows/java-tests.yaml +++ b/.github/workflows/java-tests.yaml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-java:74 + image: ghcr.io/project-chip/chip-build-java:76 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 15004c5aca5037..0bb74745cf96af 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 steps: - name: Checkout diff --git a/.github/workflows/minimal-build.yaml b/.github/workflows/minimal-build.yaml index ade1bd56ea36ff..a3cdc697f9ef3d 100644 --- a/.github/workflows/minimal-build.yaml +++ b/.github/workflows/minimal-build.yaml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:74 + image: ghcr.io/project-chip/chip-build-minimal:76 steps: - name: Checkout @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-minimal:74 + image: ghcr.io/project-chip/chip-build-minimal:76 steps: - name: Checkout diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 7c8564958d1350..446632bb6d1a67 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -40,7 +40,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-esp32-qemu:74 + image: ghcr.io/project-chip/chip-build-esp32-qemu:76 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 9f25dee51324fb..e4fc02b77a2e16 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-esp32:74 + image: ghcr.io/project-chip/chip-build-esp32:76 steps: - name: Checkout @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build-efr32:74 + image: ghcr.io/project-chip/chip-build-efr32:76 steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/smoketest-android.yaml b/.github/workflows/smoketest-android.yaml index 8ac6cd93131617..bac25a017629e5 100644 --- a/.github/workflows/smoketest-android.yaml +++ b/.github/workflows/smoketest-android.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-android:74 + image: ghcr.io/project-chip/chip-build-android:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2c68b91222bf80..65ba9ac4114303 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" @@ -455,7 +455,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 040e50f1535079..db6e8e129b6693 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -39,7 +39,7 @@ jobs: runs-on: ubuntu-latest container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 volumes: - "/:/runner-root-volume" - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index dca68cc94e88ad..4a86caf18301e5 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index 5ed20b29ada3d6..3eb7a5c60fb03c 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: ghcr.io/project-chip/chip-build:74 + image: ghcr.io/project-chip/chip-build:76 defaults: run: shell: sh diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 4251291f486ef4..0569c919fc330e 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index 31969a2196b343..c136008cb18456 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 7d168d3f480d84..d24c9a54906553 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index d94d642dbd3934..810aa6d1d0af5b 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 607a9abd08bee3..b3efb9db0a5b9d 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index da4dd83ca3f31b..acf8c4810bda8a 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:74 + $ docker pull ghcr.io/project-chip/chip-build-ameba:76 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:74 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:76 - Setup build environment: diff --git a/integrations/cloudbuild/chef.yaml b/integrations/cloudbuild/chef.yaml index 7ba0882e0310ac..8931f73d3f7931 100644 --- a/integrations/cloudbuild/chef.yaml +++ b/integrations/cloudbuild/chef.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -23,7 +23,7 @@ steps: - name: pwenv path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -38,7 +38,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index af3ed1f3b4c869..152d8344531b46 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" entrypoint: "bash" args: - "-c" @@ -7,7 +7,7 @@ steps: git config --global --add safe.directory "*" python scripts/checkout_submodules.py --shallow --recursive --platform esp32 nrfconnect silabs linux android id: Submodules - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" # NOTE: silabs boostrap is NOT done with the rest as it requests a conflicting # jinja2 version (asks for 3.1.3 when constraints.txt asks for 3.0.3) env: @@ -24,7 +24,7 @@ steps: path: /pwenv timeout: 900s - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: volumes: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -66,7 +66,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -88,7 +88,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -141,7 +141,7 @@ steps: - name: pwenv path: /pwenv - - name: "ghcr.io/project-chip/chip-build-vscode:74" + - name: "ghcr.io/project-chip/chip-build-vscode:76" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv From 74cba6d98a90caa528362bb017b28472dec5034f Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:20:45 +0300 Subject: [PATCH 13/42] [NXP] Add lock app example (#35536) * [nxp][examples][platform] Add cluster-handling functions & remove RestoreState * Add virtual cluster-handling functions that must be implemented per application based on cluster configuration. * Remove RestoreState as it may read attributes from cluster before the enpoints are initialized. Signed-off-by: Andrei Menzopol * [nxp][examples][common] Implement cluster-handling functions Signed-off-by: Andrei Menzopol * [nxp][platform][mcxw71_k32w1] Add ResetInIdle functions Signed-off-by: Andrei Menzopol * [nxp][platform][common][legacy] Add SetRebootDelaySec function Signed-off-by: Andrei Menzopol * [nxp][platform][mcxw71_k32w1] Platform changes * Add __wrap__calloc_r * Use ProcessSetStateClusterHandler in ButtonManager Signed-off-by: Andrei Menzopol * [nxp] Add initial lock app common files Signed-off-by: marius-alex-tache * [nxp][examples][common][lock-app] LockApp changes needed for KW/MCX * Add cluster-handling functions * Put OnSubscriptionRequested override under define * Call RestoreState in PostAttributeChangeCallback * Call RestoreState in DoorLockClusterInitCallback * Add FSL_OSA_MAIN_FUNC_ENABLE main_task * Update lock-app/nxp/zap/lock-app zap files * Include stdint Signed-off-by: Andrei Menzopol * [nxp][examples][k32w1] Remove cluster attribute and endpoint defines Signed-off-by: Andrei Menzopol * [nxp][examples][mcxw71] Remove cluster attribute and endpoint defines Signed-off-by: Andrei Menzopol * [nxp][platform][common][icd] Do not change publisher-selected maximum interval Our code from OnSubscriptionRequested sets the publisher-selected maximum interval to kSubscriptionMaxIntervalPublisherLimit to 60 mins which is not spec compliant, it should be set to `Idle Mode Duration` as done in the default implementation from src/app/ReadHandler.cpp. Signed-off-by: Andrei Menzopol * [nxp][examples][k32w1] Add LockApp examples Signed-off-by: Andrei Menzopol * [nxp][examples][mcxw71] Add LockApp examples Signed-off-by: Andrei Menzopol * [nxp] Add support for lock app Signed-off-by: marius-alex-tache * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * [nxp] Fix lock app mcxw71 readme files Signed-off-by: marius-alex-tache * Restyled by prettier-markdown * [nxp] Fix a typo for lighting app readme Signed-off-by: marius-alex-tache * [nxp] Add common lock app readme file Signed-off-by: marius-alex-tache * Restyled by prettier-markdown * [nxp][mcxw71] Fix lock app naming Signed-off-by: marius-alex-tache * [nxp] Fix lock app zap files Signed-off-by: marius-alex-tache --------- Signed-off-by: Andrei Menzopol Signed-off-by: marius-alex-tache Co-authored-by: Andrei Menzopol Co-authored-by: Restyled.io --- .github/workflows/examples-nxp.yaml | 14 + .../contact-sensor-app/nxp/common/AppTask.cpp | 25 + .../nxp/common/include/AppTask.h | 4 + .../nxp/k32w1/include/config/AppConfig.h | 2 - .../nxp/mcxw71/include/config/AppConfig.h | 2 - examples/lighting-app/nxp/README.md | 6 +- examples/lighting-app/nxp/common/AppTask.cpp | 25 + .../lighting-app/nxp/common/include/AppTask.h | 4 + .../nxp/k32w1/include/config/AppConfig.h | 2 - .../nxp/mcxw71/include/config/AppConfig.h | 2 - examples/lock-app/nxp/README.md | 133 ++ examples/lock-app/nxp/common/main/AppTask.cpp | 170 ++ .../nxp/common/main/DeviceCallbacks.cpp | 107 ++ .../lock-app/nxp/common/main/ZclCallbacks.cpp | 160 ++ .../nxp/common/main/include/AppEvent.h | 51 + .../nxp/common/main/include/AppTask.h | 59 + .../nxp/common/main/include/DeviceCallbacks.h | 52 + examples/lock-app/nxp/common/main/main.cpp | 55 + examples/lock-app/nxp/k32w1/.gn | 31 + examples/lock-app/nxp/k32w1/BUILD.gn | 276 +++ examples/lock-app/nxp/k32w1/README.md | 165 ++ examples/lock-app/nxp/k32w1/args.gni | 45 + examples/lock-app/nxp/k32w1/build_overrides | 1 + .../nxp/k32w1/include/config/AppConfig.h | 27 + .../k32w1/include/config/CHIPProjectConfig.h | 224 +++ .../nxp/k32w1/third_party/connectedhomeip | 1 + examples/lock-app/nxp/mcxw71/.gn | 31 + examples/lock-app/nxp/mcxw71/BUILD.gn | 276 +++ examples/lock-app/nxp/mcxw71/README.md | 197 ++ examples/lock-app/nxp/mcxw71/args.gni | 45 + examples/lock-app/nxp/mcxw71/build_overrides | 1 + .../nxp/mcxw71/include/config/AppConfig.h | 27 + .../mcxw71/include/config/CHIPProjectConfig.h | 233 +++ .../nxp/mcxw71/third_party/connectedhomeip | 1 + examples/lock-app/nxp/zap/lock-app.matter | 436 ++++- examples/lock-app/nxp/zap/lock-app.zap | 1672 ++++++++++++++--- .../nxp/common/app_task/include/AppTaskBase.h | 7 + .../nxp/common/icd/source/ICDUtil.cpp | 7 +- .../common/ui_feedback/source/LedManager.cpp | 4 +- .../mcxw71_k32w1/app/support/Memconfig.cpp | 5 + .../nxp/mcxw71_k32w1/button/ButtonManager.cpp | 6 +- scripts/build/build/targets.py | 1 + scripts/build/builders/nxp.py | 5 + .../build/testdata/all_targets_linux_x64.txt | 2 +- .../common/legacy/OTAImageProcessorImpl.cpp | 5 + .../nxp/common/legacy/OTAImageProcessorImpl.h | 2 + .../nxp/mcxw71_k32w1/PlatformManagerImpl.cpp | 26 + .../nxp/mcxw71_k32w1/PlatformManagerImpl.h | 3 + 48 files changed, 4371 insertions(+), 264 deletions(-) create mode 100644 examples/lock-app/nxp/README.md create mode 100644 examples/lock-app/nxp/common/main/AppTask.cpp create mode 100644 examples/lock-app/nxp/common/main/DeviceCallbacks.cpp create mode 100644 examples/lock-app/nxp/common/main/ZclCallbacks.cpp create mode 100644 examples/lock-app/nxp/common/main/include/AppEvent.h create mode 100644 examples/lock-app/nxp/common/main/include/AppTask.h create mode 100644 examples/lock-app/nxp/common/main/include/DeviceCallbacks.h create mode 100644 examples/lock-app/nxp/common/main/main.cpp create mode 100644 examples/lock-app/nxp/k32w1/.gn create mode 100644 examples/lock-app/nxp/k32w1/BUILD.gn create mode 100644 examples/lock-app/nxp/k32w1/README.md create mode 100644 examples/lock-app/nxp/k32w1/args.gni create mode 120000 examples/lock-app/nxp/k32w1/build_overrides create mode 100644 examples/lock-app/nxp/k32w1/include/config/AppConfig.h create mode 100644 examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h create mode 120000 examples/lock-app/nxp/k32w1/third_party/connectedhomeip create mode 100644 examples/lock-app/nxp/mcxw71/.gn create mode 100644 examples/lock-app/nxp/mcxw71/BUILD.gn create mode 100644 examples/lock-app/nxp/mcxw71/README.md create mode 100644 examples/lock-app/nxp/mcxw71/args.gni create mode 120000 examples/lock-app/nxp/mcxw71/build_overrides create mode 100644 examples/lock-app/nxp/mcxw71/include/config/AppConfig.h create mode 100644 examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h create mode 120000 examples/lock-app/nxp/mcxw71/third_party/connectedhomeip diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index c0aee7fc50beff..61291fc885e582 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -120,6 +120,7 @@ jobs: ./scripts/build/build_examples.py \ --target nxp-k32w1-freertos-lighting \ --target nxp-k32w1-freertos-contact-sensor-low-power \ + --target nxp-k32w1-freertos-lock-app \ build \ --copy-artifacts-to out/artifacts \ " @@ -135,6 +136,12 @@ jobs: nxp k32w1+release contact \ out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \ /tmp/bloat_reports/ + - name: Get lock app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp k32w1+release lock \ + out/artifacts/nxp-k32w1-freertos-lock-app/chip-k32w1-lock-example.elf \ + /tmp/bloat_reports/ - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} @@ -174,6 +181,7 @@ jobs: ./scripts/build/build_examples.py \ --target nxp-mcxw71-freertos-lighting \ --target nxp-mcxw71-freertos-contact-sensor-low-power \ + --target nxp-mcxw71-freertos-lock-app \ build \ --copy-artifacts-to out/artifacts \ " @@ -189,6 +197,12 @@ jobs: nxp mcxw71+release contact \ out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \ /tmp/bloat_reports/ + - name: Get lock app size stats + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + nxp mcxw71+release lock \ + out/artifacts/nxp-mcxw71-freertos-lock-app/chip-mcxw71-lock-example.elf \ + /tmp/bloat_reports/ - name: Uploading Size Reports uses: ./.github/actions/upload-size-reports if: ${{ !env.ACT }} diff --git a/examples/contact-sensor-app/nxp/common/AppTask.cpp b/examples/contact-sensor-app/nxp/common/AppTask.cpp index f49c603cbb16a6..7539bc61e09a1f 100644 --- a/examples/contact-sensor-app/nxp/common/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/common/AppTask.cpp @@ -22,8 +22,15 @@ #include "PWR_Interface.h" #endif +#include #include +#ifndef APP_DEVICE_TYPE_ENDPOINT +#define APP_DEVICE_TYPE_ENDPOINT 1 +#endif + +using namespace chip::app::Clusters; + void ContactSensorApp::AppTask::PreInitMatterStack() { ChipLogProgress(DeviceLayer, "Welcome to NXP Contact Sensor Demo App"); @@ -47,6 +54,24 @@ ContactSensorApp::AppTask & ContactSensorApp::AppTask::GetDefaultInstance() return sAppTask; } +bool ContactSensorApp::AppTask::CheckStateClusterHandler(void) +{ + bool val = false; + BooleanState::Attributes::StateValue::Get(APP_DEVICE_TYPE_ENDPOINT, &val); + return val; +} + +CHIP_ERROR ContactSensorApp::AppTask::ProcessSetStateClusterHandler(void) +{ + bool val = false; + BooleanState::Attributes::StateValue::Get(APP_DEVICE_TYPE_ENDPOINT, &val); + auto status = BooleanState::Attributes::StateValue::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val); + + VerifyOrReturnError(status == chip::Protocols::InteractionModel::Status::Success, CHIP_ERROR_WRITE_FAILED); + + return CHIP_NO_ERROR; +} + chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask() { return ContactSensorApp::AppTask::GetDefaultInstance(); diff --git a/examples/contact-sensor-app/nxp/common/include/AppTask.h b/examples/contact-sensor-app/nxp/common/include/AppTask.h index 69b3ffc8200804..407572aad254e6 100644 --- a/examples/contact-sensor-app/nxp/common/include/AppTask.h +++ b/examples/contact-sensor-app/nxp/common/include/AppTask.h @@ -28,6 +28,10 @@ namespace ContactSensorApp { class AppTask : public chip::NXP::App::AppTaskFreeRTOS { public: + // AppTaskBase virtual methods + bool CheckStateClusterHandler(void) override; + CHIP_ERROR ProcessSetStateClusterHandler(void) override; + // AppTaskFreeRTOS virtual methods void PreInitMatterStack() override; #if CONFIG_LOW_POWER diff --git a/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h b/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h index 0c8019d8e7e33c..89f4bf9333c4c8 100644 --- a/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h +++ b/examples/contact-sensor-app/nxp/k32w1/include/config/AppConfig.h @@ -18,8 +18,6 @@ #pragma once /* ---- App Config ---- */ -#define APP_DEVICE_TYPE_ENDPOINT 1 -#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::BooleanState::Attributes::StateValue /* ---- Button Manager Config ---- */ #define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 diff --git a/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h b/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h index 0c8019d8e7e33c..89f4bf9333c4c8 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h +++ b/examples/contact-sensor-app/nxp/mcxw71/include/config/AppConfig.h @@ -18,8 +18,6 @@ #pragma once /* ---- App Config ---- */ -#define APP_DEVICE_TYPE_ENDPOINT 1 -#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::BooleanState::Attributes::StateValue /* ---- Button Manager Config ---- */ #define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 diff --git a/examples/lighting-app/nxp/README.md b/examples/lighting-app/nxp/README.md index 67444a99e1bf8d..d611b24c8dff75 100644 --- a/examples/lighting-app/nxp/README.md +++ b/examples/lighting-app/nxp/README.md @@ -119,9 +119,9 @@ where `device` can be one of the [Supported devices](#supported-devices). The application uses an NXP specific data model file: -| path | description | -| ----------------------------- | --------------------------------------- | -| `zap-lit/lighting-on-off.zap` | Data model for On/Off Light device type | +| path | description | +| ------------------------- | --------------------------------------- | +| `zap/lighting-on-off.zap` | Data model for On/Off Light device type | The data model can be changed by simply replacing the gn `deps` statement corresponding to data model target. diff --git a/examples/lighting-app/nxp/common/AppTask.cpp b/examples/lighting-app/nxp/common/AppTask.cpp index 6bca4669760c2a..095afb869b1e15 100644 --- a/examples/lighting-app/nxp/common/AppTask.cpp +++ b/examples/lighting-app/nxp/common/AppTask.cpp @@ -18,8 +18,15 @@ #include "AppTask.h" +#include #include +#ifndef APP_DEVICE_TYPE_ENDPOINT +#define APP_DEVICE_TYPE_ENDPOINT 1 +#endif + +using namespace chip::app::Clusters; + void LightingApp::AppTask::PreInitMatterStack() { ChipLogProgress(DeviceLayer, "Welcome to NXP Lighting Demo App"); @@ -31,6 +38,24 @@ LightingApp::AppTask & LightingApp::AppTask::GetDefaultInstance() return sAppTask; } +bool LightingApp::AppTask::CheckStateClusterHandler(void) +{ + bool val = false; + OnOff::Attributes::OnOff::Get(APP_DEVICE_TYPE_ENDPOINT, &val); + return val; +} + +CHIP_ERROR LightingApp::AppTask::ProcessSetStateClusterHandler(void) +{ + bool val = false; + OnOff::Attributes::OnOff::Get(APP_DEVICE_TYPE_ENDPOINT, &val); + auto status = OnOff::Attributes::OnOff::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val); + + VerifyOrReturnError(status == chip::Protocols::InteractionModel::Status::Success, CHIP_ERROR_WRITE_FAILED); + + return CHIP_NO_ERROR; +} + chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask() { return LightingApp::AppTask::GetDefaultInstance(); diff --git a/examples/lighting-app/nxp/common/include/AppTask.h b/examples/lighting-app/nxp/common/include/AppTask.h index 9f73d340f35957..a98c26a97dbb07 100644 --- a/examples/lighting-app/nxp/common/include/AppTask.h +++ b/examples/lighting-app/nxp/common/include/AppTask.h @@ -28,6 +28,10 @@ namespace LightingApp { class AppTask : public chip::NXP::App::AppTaskFreeRTOS { public: + // AppTaskBase virtual methods + bool CheckStateClusterHandler(void) override; + CHIP_ERROR ProcessSetStateClusterHandler(void) override; + // AppTaskFreeRTOS virtual methods void PreInitMatterStack() override; diff --git a/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h b/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h index 6dcccf749bbebe..89f4bf9333c4c8 100644 --- a/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h +++ b/examples/lighting-app/nxp/k32w1/include/config/AppConfig.h @@ -18,8 +18,6 @@ #pragma once /* ---- App Config ---- */ -#define APP_DEVICE_TYPE_ENDPOINT 1 -#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::OnOff::Attributes::OnOff /* ---- Button Manager Config ---- */ #define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 diff --git a/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h b/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h index 6dcccf749bbebe..89f4bf9333c4c8 100644 --- a/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h +++ b/examples/lighting-app/nxp/mcxw71/include/config/AppConfig.h @@ -18,8 +18,6 @@ #pragma once /* ---- App Config ---- */ -#define APP_DEVICE_TYPE_ENDPOINT 1 -#define APP_CLUSTER_ATTRIBUTE chip::app::Clusters::OnOff::Attributes::OnOff /* ---- Button Manager Config ---- */ #define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 diff --git a/examples/lock-app/nxp/README.md b/examples/lock-app/nxp/README.md new file mode 100644 index 00000000000000..c3cf4c112f8dfd --- /dev/null +++ b/examples/lock-app/nxp/README.md @@ -0,0 +1,133 @@ +# Matter NXP Door Lock Example Application + +This reference application implements an Door Lock device type. It uses board +buttons or `matter-cli` for user input and LEDs for state feedback. You can use +this example as a reference for creating your own application. + +The example is based on: + +- [Matter](https://github.com/project-chip/connectedhomeip) +- [NXP github SDK](https://github.com/nxp-mcuxpresso/mcux-sdk) + +- [Matter NXP Door Lock Example Application](#matter-nxp-door-lock-example-application) + - [Supported devices](#supported-devices) + - [Introduction](#introduction) + - [Device UI](#device-ui) + - [Prerequisites for building](#prerequisites-for-building) + - [Building](#building) + - [Data model](#data-model) + - [Manufacturing data](#manufacturing-data) + - [Flashing and debugging](#flashing-and-debugging) + +## Supported devices + +- [k32w1](k32w1/README.md) +- [mcxw71](mcxw71/README.md) + +## Introduction + +The application showcases a door lock device that communicates with clients over +a low-power, 802.15.4 Thread network. + +It can be commissioned into an existing Matter network using a controller such +as `chip-tool`. + +This example implements a `User-Intent Commissioning Flow`, meaning the user has +to press a button in order for the device to be ready for commissioning. The +initial commissioning is done through `ble-thread` pairing method. + +The Thread network dataset will be transferred on the device using a secure +session over Bluetooth LE. In order to start the commissioning process, the user +must enable BLE advertising on the device manually. To pair successfully, the +commissioner must know the commissioning information corresponding to the +device: setup passcode and discriminator. This data is usually encoded within a +QR code or printed to the UART console. + +## Device UI + +The example application provides a simple UI that depicts the state of the +device and offers basic user control. This UI is implemented via the +general-purpose LEDs and buttons built in the evaluation boards. Please see each +supported device readme file for details. + +## Prerequisites for building + +In order to build the example, it is recommended to use a Linux distribution. +Please visit the supported Operating Systems list in +[BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites). + +- Make sure that below prerequisites are correctly installed (as described in + [BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites)) + +``` +sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev +``` + +- Step 1: checkout NXP specific submodules only + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive + ``` + +- Step 2: activate local environment + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh + ``` + + If the script says the environment is out of date, you can update it by + running the following command: + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh + ``` + +- Step 3: Init NXP SDK(s) + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common + ``` + +Note: By default, `update_nxp_sdk.py` will try to initialize all NXP SDKs. +Please run the script with arg `--help` to view all available options. + +## Building + +There are two options for building this reference app: + +- Using `build_examples.py` framework. +- Manually generating `ninja` files using `gn`. + +For manual generation and building, please see the specific readme file for your +device. + +A list of all available contact sensor targets can be viewed in the following +table: + +| target name | description | +| ---------------------------- | ---------------- | +| nxp-device-freertos-lock-app | Default lock app | + +where `device` can be one of the [Supported devices](#supported-devices). + +### Data model + +The application uses an NXP specific data model file: + +| path | description | +| ------------------ | ------------------------------------ | +| `zap/lock-app.zap` | Data model for Door Lock device type | + +The data model can be changed by simply replacing the gn `deps` statement +corresponding to data model target. + +### Manufacturing data + +Use `chip_with_factory_data=1` in the gn build command to enable factory data. + +For a full guide on manufacturing flow, please see +[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md). + +## Flashing and debugging + +Please see the device specific readme file. diff --git a/examples/lock-app/nxp/common/main/AppTask.cpp b/examples/lock-app/nxp/common/main/AppTask.cpp new file mode 100644 index 00000000000000..26a385ec0b2c97 --- /dev/null +++ b/examples/lock-app/nxp/common/main/AppTask.cpp @@ -0,0 +1,170 @@ +/* + * + * Copyright (c) 2021-2023 Project CHIP Authors + * Copyright (c) 2021 Google LLC. + * Copyright 2023-2024 NXP + * All rights reserved. + * + * 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. + */ + +#include "AppTask.h" +#include "CHIPDeviceManager.h" +#include "LockManager.h" +#include +#include +#include +#include +#include + +#if !CHIP_CONFIG_ENABLE_ICD_SERVER +#include "ICDUtil.h" +#endif + +#ifdef ENABLE_CHIP_SHELL +#include +#include +using namespace chip::Shell; +#define MATTER_CLI_LOG(message) (streamer_printf(streamer_get(), message)) +#endif /* ENABLE_CHIP_SHELL */ + +#ifndef APP_DEVICE_TYPE_ENDPOINT +#define APP_DEVICE_TYPE_ENDPOINT 1 +#endif + +using namespace chip; +using namespace ::chip::DeviceLayer; +using namespace chip::app::Clusters; +using namespace chip::app::DataModel; +using namespace chip::Protocols::InteractionModel; + +#ifdef ENABLE_CHIP_SHELL + +static CHIP_ERROR cliDoorLock(int argc, char * argv[]) +{ + bool inputErr = false; + if ((argc != 1) && (argc != 2)) + { + inputErr = true; + goto exit; + } + + if (!strcmp(argv[0], "open")) + { + ChipLogDetail(Shell, "Door : Set to %s state", argv[0]); + DoorLockServer::Instance().SetDoorState(1, DoorStateEnum::kDoorOpen); + } + else if (!strcmp(argv[0], "closed")) + { + ChipLogDetail(Shell, "Door : Set to %s state", argv[0]); + DoorLockServer::Instance().SetDoorState(1, DoorStateEnum::kDoorClosed); + } + else if (!strcmp(argv[0], "jammedalarm")) + { + ChipLogDetail(Shell, "Send out Lock Jammed Alarm..."); + DoorLockServer::Instance().SendLockAlarmEvent(1, AlarmCodeEnum::kLockJammed); + } + else if (!strcmp(argv[0], "locked")) + { + ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]); + DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kManual, NullNullable, NullNullable, + NullNullable, NullNullable); + } + else if (!strcmp(argv[0], "unlocked")) + { + ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]); + DoorLockServer::Instance().SetLockState(1, DlLockState::kUnlocked, OperationSourceEnum::kManual, NullNullable, NullNullable, + NullNullable, NullNullable); + } + else if (!strcmp(argv[0], "unlatched")) + { + ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]); + DoorLockServer::Instance().SetLockState(1, DlLockState::kUnlatched, OperationSourceEnum::kManual, NullNullable, + NullNullable, NullNullable, NullNullable); + } + else if (!strcmp(argv[0], "notfullylocked")) + { + ChipLogDetail(Shell, "Lock : lock set to %s state", argv[0]); + DoorLockServer::Instance().SetLockState(1, DlLockState::kNotFullyLocked, OperationSourceEnum::kManual, NullNullable, + NullNullable, NullNullable, NullNullable); + } + else + { + inputErr = true; + } +exit: + if (inputErr) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} +#endif /* ENABLE_CHIP_SHELL */ + +void LockApp::AppTask::PreInitMatterStack() +{ + ChipLogProgress(DeviceLayer, "Welcome to NXP Lock Demo App"); +} + +void LockApp::AppTask::PostInitMatterStack() +{ +#if !CHIP_CONFIG_ENABLE_ICD_SERVER + chip::app::InteractionModelEngine::GetInstance()->RegisterReadHandlerAppCallback(&chip::NXP::App::GetICDUtil()); +#endif +} + +void LockApp::AppTask::AppMatter_RegisterCustomCliCommands() +{ +#ifdef ENABLE_CHIP_SHELL + /* Register application commands */ + static const shell_command_t kCommands[] = { + { .cmd_func = cliDoorLock, + .cmd_name = "doorlock", + .cmd_help = "Set the Door Lock State or trigger Lock Jammed Alarm. " + "Usage:[open|closed|jammedalarm|locked|unlocked|notfullylocked|unlatched] " }, + }; + Engine::Root().RegisterCommands(kCommands, sizeof(kCommands) / sizeof(kCommands[0])); +#endif +} + +bool LockApp::AppTask::CheckStateClusterHandler(void) +{ + Nullable state(DlLockState::kUnlocked); + DoorLock::Attributes::LockState::Get(APP_DEVICE_TYPE_ENDPOINT, state); + return (state.Value() == DlLockState::kUnlocked); +} + +CHIP_ERROR LockApp::AppTask::ProcessSetStateClusterHandler(void) +{ + Nullable state; + DoorLock::Attributes::LockState::Get(APP_DEVICE_TYPE_ENDPOINT, state); + auto newState = (state.Value() == DlLockState::kUnlocked) ? DlLockState::kLocked : DlLockState::kUnlocked; + auto status = DoorLock::Attributes::LockState::Set(APP_DEVICE_TYPE_ENDPOINT, newState); + + VerifyOrReturnError(status == Status::Success, CHIP_ERROR_WRITE_FAILED); + + return CHIP_NO_ERROR; +} + +// This returns an instance of this class. +LockApp::AppTask & LockApp::AppTask::GetDefaultInstance() +{ + static LockApp::AppTask sAppTask; + return sAppTask; +} + +chip::NXP::App::AppTaskBase & chip::NXP::App::GetAppTask() +{ + return LockApp::AppTask::GetDefaultInstance(); +} diff --git a/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp b/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp new file mode 100644 index 00000000000000..440696b4a85ce3 --- /dev/null +++ b/examples/lock-app/nxp/common/main/DeviceCallbacks.cpp @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2020-2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +/** + * @file DeviceCallbacks.cpp + * + * Implements all the callbacks to the application from the CHIP Stack + * + **/ +#include "DeviceCallbacks.h" + +#include +#include +#include +#include +#include +#include + +#include + +#if CONFIG_ENABLE_FEEDBACK +#include "UserInterfaceFeedback.h" +#endif + +using namespace chip::app; +void OnTriggerEffect(::Identify * identify) +{ + switch (identify->mCurrentEffectIdentifier) + { + case Clusters::Identify::EffectIdentifierEnum::kBlink: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBlink"); + break; + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kBreathe"); + break; + case Clusters::Identify::EffectIdentifierEnum::kOkay: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kOkay"); + break; + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + ChipLogProgress(Zcl, "Clusters::Identify::EffectIdentifierEnum::kChannelChange"); + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + return; + } +} + +Identify gIdentify0 = { + chip::EndpointId{ 0 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + chip::app::Clusters::Identify::IdentifyTypeEnum::kNone, + OnTriggerEffect, +}; + +Identify gIdentify1 = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + chip::app::Clusters::Identify::IdentifyTypeEnum::kNone, + OnTriggerEffect, +}; + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::System; +using namespace ::chip::DeviceLayer; +using namespace chip::app::Clusters; + +void LockApp::DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value) +{ + ChipLogProgress(DeviceLayer, + "endpointId " ChipLogFormatMEI " clusterId " ChipLogFormatMEI " attribute ID: " ChipLogFormatMEI + " Type: %u Value: %u, length %u", + ChipLogValueMEI(endpointId), ChipLogValueMEI(clusterId), ChipLogValueMEI(attributeId), type, *value, size); +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().RestoreState(); +#endif +} + +// This returns an instance of this class. +LockApp::DeviceCallbacks & LockApp::DeviceCallbacks::GetDefaultInstance() +{ + static DeviceCallbacks sDeviceCallbacks; + return sDeviceCallbacks; +} + +chip::DeviceManager::CHIPDeviceManagerCallbacks & chip::NXP::App::GetDeviceCallbacks() +{ + return LockApp::DeviceCallbacks::GetDefaultInstance(); +} diff --git a/examples/lock-app/nxp/common/main/ZclCallbacks.cpp b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp new file mode 100644 index 00000000000000..98fb0f8c2bc20f --- /dev/null +++ b/examples/lock-app/nxp/common/main/ZclCallbacks.cpp @@ -0,0 +1,160 @@ +/* + * + * Copyright (c) 2021-2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#include + +#include "AppTask.h" +#include "CHIPDeviceManager.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "LockManager.h" + +#if CONFIG_ENABLE_FEEDBACK +#include "UserInterfaceFeedback.h" +#endif + +using namespace ::chip; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DoorLock; +using chip::app::DataModel::Nullable; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & path, uint8_t type, uint16_t size, uint8_t * value) +{ + chip::DeviceManager::CHIPDeviceManagerCallbacks * cb = + chip::DeviceManager::CHIPDeviceManager::GetInstance().GetCHIPDeviceManagerCallbacks(); + if (cb != nullptr) + { + // propagate event to device manager + cb->PostAttributeChangeCallback(path.mEndpointId, path.mClusterId, path.mAttributeId, type, size, value); + } +} + +// App handles physical aspects of locking but not locking logic. That is it +// should wait for door to be locked on lock command and return success) but +// door lock server should check pin before even calling the lock-door +// callback. +bool emberAfPluginDoorLockOnDoorLockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + return LockManager::Instance().Lock(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote); +} + +bool emberAfPluginDoorLockOnDoorUnlockCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + return LockManager::Instance().Unlock(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote); +} + +bool emberAfPluginDoorLockOnDoorUnboltCommand(chip::EndpointId endpointId, const Nullable & fabricIdx, + const Nullable & nodeId, const Optional & pinCode, + OperationErrorEnum & err) +{ + return LockManager::Instance().Unbolt(endpointId, fabricIdx, nodeId, pinCode, err, OperationSourceEnum::kRemote); +} + +bool emberAfPluginDoorLockGetUser(chip::EndpointId endpointId, uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) +{ + return LockManager::Instance().GetUser(endpointId, userIndex, user); +} + +bool emberAfPluginDoorLockSetUser(chip::EndpointId endpointId, uint16_t userIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, const chip::CharSpan & userName, uint32_t uniqueId, + UserStatusEnum userStatus, UserTypeEnum usertype, CredentialRuleEnum credentialRule, + const CredentialStruct * credentials, size_t totalCredentials) +{ + + return LockManager::Instance().SetUser(endpointId, userIndex, creator, modifier, userName, uniqueId, userStatus, usertype, + credentialRule, credentials, totalCredentials); +} + +bool emberAfPluginDoorLockGetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, CredentialTypeEnum credentialType, + EmberAfPluginDoorLockCredentialInfo & credential) +{ + return LockManager::Instance().GetCredential(endpointId, credentialIndex, credentialType, credential); +} + +bool emberAfPluginDoorLockSetCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, + chip::FabricIndex modifier, DlCredentialStatus credentialStatus, + CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData) +{ + return LockManager::Instance().SetCredential(endpointId, credentialIndex, creator, modifier, credentialStatus, credentialType, + credentialData); +} + +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + EmberAfPluginDoorLockWeekDaySchedule & schedule) +{ + return LockManager::Instance().GetSchedule(endpointId, weekdayIndex, userIndex, schedule); +} + +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, + EmberAfPluginDoorLockHolidaySchedule & schedule) +{ + return LockManager::Instance().GetSchedule(endpointId, holidayIndex, schedule); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t weekdayIndex, uint16_t userIndex, + DlScheduleStatus status, DaysMaskMap daysMask, uint8_t startHour, uint8_t startMinute, + uint8_t endHour, uint8_t endMinute) +{ + return LockManager::Instance().SetSchedule(endpointId, weekdayIndex, userIndex, status, daysMask, startHour, startMinute, + endHour, endMinute); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + DlScheduleStatus status, uint32_t localStartTime, uint32_t localEndTime) +{ + return LockManager::Instance().SetSchedule(endpointId, yearDayIndex, userIndex, status, localStartTime, localEndTime); +} + +DlStatus emberAfPluginDoorLockGetSchedule(chip::EndpointId endpointId, uint8_t yearDayIndex, uint16_t userIndex, + EmberAfPluginDoorLockYearDaySchedule & schedule) +{ + return LockManager::Instance().GetSchedule(endpointId, yearDayIndex, userIndex, schedule); +} + +DlStatus emberAfPluginDoorLockSetSchedule(chip::EndpointId endpointId, uint8_t holidayIndex, DlScheduleStatus status, + uint32_t localStartTime, uint32_t localEndTime, OperatingModeEnum operatingMode) +{ + return LockManager::Instance().SetSchedule(endpointId, holidayIndex, status, localStartTime, localEndTime, operatingMode); +} + +void emberAfDoorLockClusterInitCallback(EndpointId endpoint) +{ + DoorLockServer::Instance().InitServer(endpoint); + LockManager::Instance().InitEndpoint(endpoint); +#if CONFIG_ENABLE_FEEDBACK + FeedbackMgr().RestoreState(); +#endif +} + +void emberAfPluginDoorLockOnAutoRelock(chip::EndpointId endpointId) +{ + // Apply the relock state in the application control + DoorLockServer::Instance().SetLockState(1, DlLockState::kLocked, OperationSourceEnum::kAuto, NullNullable, NullNullable, + NullNullable, NullNullable); +} diff --git a/examples/lock-app/nxp/common/main/include/AppEvent.h b/examples/lock-app/nxp/common/main/include/AppEvent.h new file mode 100644 index 00000000000000..065078a52e7a72 --- /dev/null +++ b/examples/lock-app/nxp/common/main/include/AppEvent.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021 Nest Labs, Inc. + * All rights reserved. + * + * 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. + */ + +#pragma once + +#include + +struct AppEvent; +using EventHandler = void (*)(const AppEvent &); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Timer = 0, + kEventType_TurnOn, + kEventType_Install, + }; + + uint16_t Type; + + union + { + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } ClusterEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/lock-app/nxp/common/main/include/AppTask.h b/examples/lock-app/nxp/common/main/include/AppTask.h new file mode 100644 index 00000000000000..ea180e197c8455 --- /dev/null +++ b/examples/lock-app/nxp/common/main/include/AppTask.h @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021-2023 Google LLC. + * Copyright 2024 NXP + * All rights reserved. + * + * 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. + */ + +#pragma once + +#if CONFIG_APP_FREERTOS_OS +#include "AppTaskFreeRTOS.h" +#else +#include "AppTaskZephyr.h" +#endif + +namespace LockApp { +#if CONFIG_APP_FREERTOS_OS +class AppTask : public chip::NXP::App::AppTaskFreeRTOS +#else +class AppTask : public chip::NXP::App::AppTaskZephyr +#endif +{ +public: + // AppTaskBase virtual methods + bool CheckStateClusterHandler(void) override; + CHIP_ERROR ProcessSetStateClusterHandler(void) override; + + ~AppTask() override{}; + void PostInitMatterStack(void) override; + void PreInitMatterStack(void) override; + void AppMatter_RegisterCustomCliCommands(void) override; + // This returns an instance of this class. + static AppTask & GetDefaultInstance(); + +private: + static AppTask sAppTask; +}; +} // namespace LockApp + +/** + * Returns the application-specific implementation of the AppTaskBase object. + * + * Applications can use this to gain access to features of the AppTaskBase + * that are specific to the selected application. + */ +chip::NXP::App::AppTaskBase & GetAppTask(); diff --git a/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h b/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h new file mode 100644 index 00000000000000..9e6f1d47993821 --- /dev/null +++ b/examples/lock-app/nxp/common/main/include/DeviceCallbacks.h @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2020-2023 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +/** + * @file DeviceCallbacks.h + * + * Implementations for the DeviceManager callbacks for this application + * + **/ + +#pragma once + +#include "CHIPDeviceManager.h" +#include "CommonDeviceCallbacks.h" + +namespace LockApp { +class DeviceCallbacks : public chip::NXP::App::CommonDeviceCallbacks +{ +public: + // This returns an instance of this class. + static DeviceCallbacks & GetDefaultInstance(); + + void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, + uint8_t type, uint16_t size, uint8_t * value); + +private: + void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); +}; +} // namespace LockApp + +/** + * Returns the application-specific implementation of the CommonDeviceCallbacks object. + * + * Applications can use this to gain access to features of the CommonDeviceCallbacks + * that are specific to the selected application. + */ +chip::DeviceManager::CHIPDeviceManagerCallbacks & GetDeviceCallbacks(); diff --git a/examples/lock-app/nxp/common/main/main.cpp b/examples/lock-app/nxp/common/main/main.cpp new file mode 100644 index 00000000000000..09de048127518b --- /dev/null +++ b/examples/lock-app/nxp/common/main/main.cpp @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2021-2023 Google LLC. + * All rights reserved. + * + * 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. + */ + +// ================================================================================ +// Main Code +// ================================================================================ + +#include "FreeRTOS.h" +#include +#include +#include + +#if configAPPLICATION_ALLOCATED_HEAP +uint8_t __attribute__((section(".heap"))) ucHeap[configTOTAL_HEAP_SIZE]; +#endif + +using namespace ::chip::DeviceLayer; + +#if FSL_OSA_MAIN_FUNC_ENABLE +extern "C" void main_task(void const * argument) +{ + chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); + chip::NXP::App::GetAppTask().Start(); +} +#else +extern "C" int main(int argc, char * argv[]) +{ + chip::DeviceLayer::PlatformMgrImpl().HardwareInit(); + chip::NXP::App::GetAppTask().Start(); + vTaskStartScheduler(); +} +#endif + +#if (defined(configCHECK_FOR_STACK_OVERFLOW) && (configCHECK_FOR_STACK_OVERFLOW > 0)) +void vApplicationStackOverflowHook(TaskHandle_t xTask, char * pcTaskName) +{ + assert(0); +} +#endif diff --git a/examples/lock-app/nxp/k32w1/.gn b/examples/lock-app/nxp/k32w1/.gn new file mode 100644 index 00000000000000..5d6e10a31e334d --- /dev/null +++ b/examples/lock-app/nxp/k32w1/.gn @@ -0,0 +1,31 @@ +# Copyright (c) 2020 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. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/mcxw71_k32w1/args.gni") +} diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn new file mode 100644 index 00000000000000..b8b6b7f67fa34c --- /dev/null +++ b/examples/lock-app/nxp/k32w1/BUILD.gn @@ -0,0 +1,276 @@ +# 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. + +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") + +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") + +import("${chip_root}/src/crypto/crypto.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") + +declare_args() { + # Setup discriminator as argument + setup_discriminator = 3840 + chip_with_diag_logs_demo = true +} + +assert(current_os == "freertos") +assert(target_os == "freertos") + +example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +mcxw71_k32w1_sdk("sdk") { + defines = [] + include_dirs = [] + sources = [] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + include_dirs += [ + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", + ] + + sources += [ + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + ] + + if (is_debug) { + defines += [ "BUILD_RELEASE=0" ] + } else { + defines += [ "BUILD_RELEASE=1" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] + + if (chip_key_storage == "littlefs") { + include_dirs += [ "${example_platform_dir}/board" ] + sources += [ + "${example_platform_dir}/board/peripherals.c", + "${example_platform_dir}/board/peripherals.h", + ] + } +} + +mcxw71_k32w1_executable("lock_app") { + output_name = "chip-k32w1-lock-example" + + defines = [] + deps = [] + include_dirs = [] + sources = [] + + # Defines used by common code + defines += [ + "CONFIG_NET_L2_OPENTHREAD=1", + "CONFIG_NETWORK_LAYER_BLE=1", + "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", + "CONFIG_OPERATIONAL_KEYSTORE=1", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_with_diag_logs_demo) { + defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] + } + + if (chip_with_low_power == 1) { + defines += [ "CONFIG_LOW_POWER=1" ] + } else { + defines += [ + "CONFIG_ENABLE_FEEDBACK=1", + "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)", + ] + } + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/app_task/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/clusters/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/diagnostic_logs/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/led_widget/include", + "${common_example_dir}/low_power/include", + "${common_example_dir}/operational_keystore/include", + "${common_example_dir}/ui_feedback/include", + ] + + sources += [ + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + + #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", + ] + + if (chip_with_low_power == 1) { + sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] + } + + if (chip_with_factory_data == 1) { + include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] + } + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + defines += [ + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + + # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. + "LED_MANAGER_ENABLE_STATUS_LED=0", + ] + + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ] + deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ] + } + + if (chip_with_diag_logs_demo) { + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + + # Platform specific files + include_dirs += [ + "${example_platform_dir}/util", + "${example_platform_dir}/app/support", + "${example_platform_dir}/button", + ] + + sources += [ + "${example_platform_dir}/button/ButtonManager.cpp", + "${example_platform_dir}/clusters/Identify.cpp", + "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", + ] + + if (chip_enable_ota_requestor) { + sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] + } + + include_dirs += [ + "include/config", + "../common/main", + "../common/main/include", + "${chip_root}/examples/lock-app/lock-common/include", + ] + + sources += [ + "${chip_root}/examples/lock-app/lock-common/src/LockEndpoint.cpp", + "${chip_root}/examples/lock-app/lock-common/src/LockManager.cpp", + "../common/main/AppTask.cpp", + "../common/main/DeviceCallbacks.cpp", + "../common/main/ZclCallbacks.cpp", + "../common/main/main.cpp", + ] + + if (chip_with_low_power == 0) { + sources += [ + "${common_example_dir}/ui_feedback/source/LedManager.cpp", + "${example_platform_dir}/util/LedOnOff.cpp", + ] + } + + deps += [ + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/platform/logging:default", + ] + + deps += [ "${chip_root}/examples/lock-app/nxp/zap:zap" ] + + if (chip_openthread_ftd) { + deps += [ + "${openthread_root}:libopenthread-cli-ftd", + "${openthread_root}:libopenthread-ftd", + ] + } else { + deps += [ + "${openthread_root}:libopenthread-cli-mtd", + "${openthread_root}:libopenthread-mtd", + ] + } + + cflags = [ + "-Wconversion", + "-Wno-error=format=", + ] + + ldscript = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-Wl,--defsym=__heap_size__=0", + "-Wl,--defsym=__stack_size__=0x480", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + "-T" + rebase_path(ldscript, root_build_dir), + ] + + if (chip_with_factory_data == 1) { + ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] + } + + output_dir = root_out_dir +} + +group("default") { + deps = [ ":lock_app" ] +} diff --git a/examples/lock-app/nxp/k32w1/README.md b/examples/lock-app/nxp/k32w1/README.md new file mode 100644 index 00000000000000..9b3cd33c1d4ed2 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/README.md @@ -0,0 +1,165 @@ +# Matter K32W1 Door Lock Example Application + +For generic information related to door lock application, please see the +[common README](../README.md). + +- [Matter K32W1 Door Lock Example Application](#matter-k32w1-door-lock-example-application) + - [Introduction](#introduction) + - [Device UI](#device-ui) + - [Building](#building) + - [Flashing](#flashing) + - [Flashing the `NBU` image](#flashing-the-nbu-image) + - [Flashing the host image](#flashing-the-host-image) + - [Debugging](#debugging) + - [OTA](#ota) + +## Introduction + +The following board was used when testing this Matter reference app for a +`k32w1` device: +![K32W1 EVK](../../../platform/nxp/mcxw71_k32w1/doc/images/k32w1-evk.jpg) + +## Device UI + +The state feedback is provided through LED effects: + +| widget | effect | description | +| ------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- | +| LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. | +| LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. | +| LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. | +| LED2 | solid on | The device is fully provisioned and has full network and service connectivity. | +| RGB LED | on | The `LockState` attribute of the `DoorLock` cluster is `Unlocked`. | +| RGB LED | off | The `LockState` attribute of the `DoorLock` cluster is `Locked`. | + +NOTE: `LED2` will be disabled when OTA is used. On K32W1 EVK board, `PTB0` is +wired to both `LED2` and CS (Chip Select) of the External Flash Memory. Since +the OTA image is stored in external memory, `LED2` operations will affect OTA +operation by corrupting packages and OTA will not work. + +The user actions are summarized below: + +| button | action | state | output | +| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| SW2 | short press | not commissioned | Enable BLE advertising | +| SW2 | short press | commissioned + device is LIT | Enable Active Mode | +| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) | +| SW3 | short press | NA | Toggle attribute `LockState` value | +| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) | + +## Building + +Manually building requires running the following commands: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/k32w1 +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w1$ gn gen out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/k32w1$ ninja -C out/debug +``` + +Please note that running `gn gen out/debug` without `--args` option will use the +default gn args values found in `args.gni`. + +After a successful build, the `elf` and `srec` files are found in `out/debug/`. +See the files prefixed with `chip-k32w1-lock-example`. + +## Flashing + +Two images must be written to the board: one for the host (CM33) and one for the +`NBU` (CM3). + +The image needed on the host side is the one generated in `out/debug/` while the +one needed on the `NBU` side can be found in the downloaded NXP-SDK package at +path - +`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter.sb3`. + +### Flashing the `NBU` image + +`NBU` image should be written only when a new NXP-SDK is released. + +[K32W148 board quick start guide](https://www.nxp.com/document/guide/getting-started-with-the-k32w148-development-platform:GS-K32W148EVK) +can be used for updating the `NBU/radio` core: + +- Section 2.5 – Get Software – install `SPSDK` (Secure Provisioning Command + Line Tool) +- Section 3.3 – Updating `NBU` for Wireless examples - use the corresponding + `.sb3` file found in the SDK package at path + `middleware\wireless\ieee-802.15.4\bin\k32w1\` + +### Flashing the host image + +Host image is the one found under `out/debug/`. It should be written after each +build process. + +If debugging is needed then jump directly to the [Debugging](#debugging) +section. Otherwise, if only flashing is needed then +[JLink 7.84b or greater](https://www.segger.com/downloads/jlink/) can be used: + +- Plug K32W1 to the USB port (no need to keep the SW4 button pressed while + doing this, e.g. ISP mode is not needed for host flashing) + +- Connect JLink to the device: + + ```bash + JLinkExe -device K32W1480 -if SWD -speed 4000 -autoconnect 1 + ``` + +- Run the following commands: + ```bash + reset + halt + loadfile chip-k32w1-lock-example.srec + reset + go + quit + ``` + +## Debugging + +One option for debugging would be to use MCUXpresso IDE. + +- Drag-and-drop the zip file containing the NXP SDK in the "Installed SDKs" + tab: + +![Installed SDKs](../../../platform/nxp/mcxw71_k32w1/doc/images/installed_sdks.jpg) + +- Import any demo application from the installed SDK: + +``` +Import SDK example(s).. -> choose a demo app (demo_apps -> hello_world) -> Finish +``` + +![Import demo](../../../platform/nxp/mcxw71_k32w1/doc/images/import_demo.jpg) + +- Flash the previously imported demo application on the board: + +``` +Right click on the application (from Project Explorer) -> Debug as -> JLink/CMSIS-DAP +``` + +After this step, a debug configuration specific for the K32W1 board was created. +This debug configuration will be used later on for debugging the application +resulted after ot-nxp compilation. + +- Import Matter repo in MCUXpresso IDE as Makefile Project. Use _none_ as + _Toolchain for Indexer Settings_: + +``` +File -> Import -> C/C++ -> Existing Code as Makefile Project +``` + +![New Project](../../../platform/nxp/mcxw71_k32w1/doc/images/new_project.jpg) + +- Replace the path of the existing demo application with the path of the K32W1 + application: + +``` +Run -> Debug Configurations... -> C/C++ Application +``` + +![Debug K32W1](../../../platform/nxp/mcxw71_k32w1/doc/images/debug_k32w1.jpg) + +## OTA + +Please see +[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/lock-app/nxp/k32w1/args.gni b/examples/lock-app/nxp/k32w1/args.gni new file mode 100644 index 00000000000000..e0c41d1e34f870 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/args.gni @@ -0,0 +1,45 @@ +# Copyright (c) 2020 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. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +# SDK target. This is overridden to add our SDK app_config.h & defines. +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_device = "K32W1480" + +chip_enable_ota_requestor = true +chip_stack_lock_tracking = "fatal" +chip_enable_ble = true +chip_generate_link_map_file = true + +chip_system_config_provide_statistics = false +chip_system_config_use_open_thread_inet_endpoints = true +chip_with_lwip = false + +chip_enable_icd_server = true +chip_enable_icd_lit = false +icd_enforce_sit_slow_poll_limit = true +chip_persist_subscriptions = true +chip_subscription_timeout_resumption = true + +is_debug = false + +chip_crypto = "platform" +chip_openthread_ftd = false +chip_with_ot_cli = 0 +chip_enable_matter_cli = true + +chip_with_diag_logs_demo = true +chip_with_low_power = 0 diff --git a/examples/lock-app/nxp/k32w1/build_overrides b/examples/lock-app/nxp/k32w1/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lock-app/nxp/k32w1/include/config/AppConfig.h b/examples/lock-app/nxp/k32w1/include/config/AppConfig.h new file mode 100644 index 00000000000000..89f4bf9333c4c8 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/include/config/AppConfig.h @@ -0,0 +1,27 @@ +/* + * Copyright 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +/* ---- App Config ---- */ + +/* ---- Button Manager Config ---- */ +#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 + +/* ---- LED Manager Config ---- */ +#define LED_MANAGER_STATUS_LED_INDEX 0 +#define LED_MANAGER_LIGHT_LED_INDEX 1 diff --git a/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h new file mode 100644 index 00000000000000..6bb18eef5a0fc9 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h @@ -0,0 +1,224 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * All rights reserved. + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use hard-coded test certificates already embedded in generic chip code => set it to 0 +// Use real/development certificates => set it to 1 + file the provisioning section from +// the internal flash +#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0 +#endif + +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + +// VID/PID for product => will be used by Basic Information Cluster +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037 +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA221 + +// Set the following define to use the Certification Declaration from below and not use it stored in factory data section +#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION +#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0 +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0x1037 +//-> product_id_array = [ 0xA221 ] +//-> device_type_id = 0x000A +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 1 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x81, 0xe8, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xda, 0x30, 0x81, 0xd7, \ + 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \ + 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x21, 0xa2, 0x18, 0x24, 0x03, 0x0a, 0x2c, 0x04, 0x13, 0x5a, 0x49, \ + 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \ + 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, \ + 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \ + 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \ + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0x94, 0xea, 0x03, \ + 0xe1, 0x95, 0xdc, 0xad, 0x43, 0x99, 0xa5, 0x94, 0x68, 0x1e, 0x62, 0x5f, 0x82, 0xfa, 0x6f, 0x61, 0x9e, 0x71, 0x79, \ + 0x63, 0x5f, 0xe5, 0x5e, 0x5d, 0xaf, 0x33, 0x91, 0xf0, 0x72, 0x02, 0x20, 0x16, 0xd1, 0x0c, 0x6f, 0x83, 0xbe, 0xbd, \ + 0x45, 0xa5, 0x59, 0xa7, 0x13, 0x8c, 0x5c, 0xd0, 0xd1, 0x68, 0x90, 0x9b, 0x6c, 0x40, 0x12, 0x9b, 0xc3, 0x3e, 0x6e, \ + 0x3c, 0xa6, 0x80, 0xbf, 0x7c, 0xd9 \ + } + +// All remaining data will be pulled from the provisioning region of flash. +#endif + +#else + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +// Use a default setup PIN code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +/** + * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT + * + * The amount of time in miliseconds after which BLE should change his advertisements + * from fast interval to slow interval. + * + * 30000 (30 secondes). + */ +#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000) + +/** + * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT + * + * The amount of time in miliseconds after which BLE advertisement should be disabled, counting + * from the moment of slow advertisement commencement. + * + * Defaults to 9000000 (15 minutes). + */ +#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) + +/** + * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * + * NFC commissioning is not supported on K32W1 + */ +#define CONFIG_CHIP_NFC_COMMISSIONING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 + +/** + * @def CHIP_CONFIG_MAX_FABRICS + * + * @brief + * Maximum number of fabrics the device can participate in. Each fabric can + * provision the device with its unique operational credentials and manage + * its own access control lists. + */ +#define CHIP_CONFIG_MAX_FABRICS 5 // 5 is the minimum number of supported fabrics + +/** + * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER + * + * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server. + */ +#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_HANDLER + * + * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server. + */ +#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2 + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +#if CONFIG_DIAG_LOGS_DEMO +#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1 +#define CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE 1024 +#endif diff --git a/examples/lock-app/nxp/k32w1/third_party/connectedhomeip b/examples/lock-app/nxp/k32w1/third_party/connectedhomeip new file mode 120000 index 00000000000000..59307833b4fee9 --- /dev/null +++ b/examples/lock-app/nxp/k32w1/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../.. \ No newline at end of file diff --git a/examples/lock-app/nxp/mcxw71/.gn b/examples/lock-app/nxp/mcxw71/.gn new file mode 100644 index 00000000000000..5d6e10a31e334d --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/.gn @@ -0,0 +1,31 @@ +# Copyright (c) 2020 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. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") + + # Import default platform configs + import("${chip_root}/src/platform/nxp/mcxw71_k32w1/args.gni") +} diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn new file mode 100644 index 00000000000000..effa43f226640b --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/BUILD.gn @@ -0,0 +1,276 @@ +# 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. + +import("//build_overrides/chip.gni") +import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/openthread.gni") + +import("${nxp_sdk_build_root}/nxp_sdk.gni") + +import("${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_executable.gni") + +import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") + +import("${chip_root}/src/crypto/crypto.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/src/platform/nxp/${nxp_platform}/args.gni") + +declare_args() { + # Setup discriminator as argument + setup_discriminator = 3840 + chip_with_diag_logs_demo = true +} + +assert(current_os == "freertos") +assert(target_os == "freertos") + +example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" +common_example_dir = "${chip_root}/examples/platform/nxp/common" + +mcxw71_k32w1_sdk("sdk") { + defines = [] + include_dirs = [] + sources = [] + + # Indicate the path to CHIPProjectConfig.h + include_dirs += [ "include/config" ] + + # Indicate the default path to FreeRTOSConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/freeRTOS" ] + + # Indicate the default path to OpenThreadConfig.h + include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + + include_dirs += [ + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", + ] + + sources += [ + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + ] + + if (is_debug) { + defines += [ "BUILD_RELEASE=0" ] + } else { + defines += [ "BUILD_RELEASE=1" ] + } + + defines += [ + "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}", + ] + + if (chip_key_storage == "littlefs") { + include_dirs += [ "${example_platform_dir}/board" ] + sources += [ + "${example_platform_dir}/board/peripherals.c", + "${example_platform_dir}/board/peripherals.h", + ] + } +} + +mcxw71_k32w1_executable("lock_app") { + output_name = "chip-mcxw71-lock-example" + + defines = [] + deps = [] + include_dirs = [] + sources = [] + + # Defines used by common code + defines += [ + "CONFIG_NET_L2_OPENTHREAD=1", + "CONFIG_NETWORK_LAYER_BLE=1", + "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", + "CONFIG_OPERATIONAL_KEYSTORE=1", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "CONFIG_APP_FREERTOS_OS=1", + ] + + if (chip_with_diag_logs_demo) { + defines += [ "CONFIG_DIAG_LOGS_DEMO=1" ] + } + + if (chip_with_low_power == 1) { + defines += [ "CONFIG_LOW_POWER=1" ] + } else { + defines += [ + "CONFIG_ENABLE_FEEDBACK=1", + "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)", + ] + } + + # App common files + include_dirs += [ + "${common_example_dir}/icd/include", + "${common_example_dir}/app_task/include", + "${common_example_dir}/matter_button/include", + "${common_example_dir}/matter_cli/include", + "${common_example_dir}/clusters/include", + "${common_example_dir}/device_callbacks/include", + "${common_example_dir}/device_manager/include", + "${common_example_dir}/diagnostic_logs/include", + "${common_example_dir}/factory_data/include", + "${common_example_dir}/led_widget/include", + "${common_example_dir}/low_power/include", + "${common_example_dir}/operational_keystore/include", + "${common_example_dir}/ui_feedback/include", + ] + + sources += [ + "${common_example_dir}/app_task/source/AppTaskBase.cpp", + "${common_example_dir}/app_task/source/AppTaskFreeRTOS.cpp", + + #"${common_example_dir}/clusters/source/ZclCallbacks.cpp", + "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", + "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/icd/source/ICDUtil.cpp", + "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", + ] + + if (chip_with_low_power == 1) { + sources += [ "${common_example_dir}/low_power/source/LowPower.cpp" ] + } + + if (chip_with_factory_data == 1) { + include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] + } + + if (chip_enable_matter_cli) { + defines += [ "ENABLE_CHIP_SHELL" ] + deps += [ + "${chip_root}/examples/shell/shell_common:shell_common", + "${chip_root}/src/lib/shell:shell", + ] + sources += [ + "${common_example_dir}/matter_cli/source/AppCLIBase.cpp", + "${common_example_dir}/matter_cli/source/AppCLIFreeRTOS.cpp", + ] + } + + if (chip_enable_ota_requestor) { + defines += [ + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + + # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. + "LED_MANAGER_ENABLE_STATUS_LED=0", + ] + + include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ] + deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ] + } + + if (chip_with_diag_logs_demo) { + sources += [ + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsDemo.cpp", + "${common_example_dir}/diagnostic_logs/source/DiagnosticLogsProviderDelegateImpl.cpp", + ] + } + + # Platform specific files + include_dirs += [ + "${example_platform_dir}/util", + "${example_platform_dir}/app/support", + "${example_platform_dir}/button", + ] + + sources += [ + "${example_platform_dir}/button/ButtonManager.cpp", + "${example_platform_dir}/clusters/Identify.cpp", + "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", + ] + + if (chip_enable_ota_requestor) { + sources += [ "${example_platform_dir}/ota/OtaUtils.cpp" ] + } + + include_dirs += [ + "include/config", + "../common/main", + "../common/main/include", + "${chip_root}/examples/lock-app/lock-common/include", + ] + + sources += [ + "${chip_root}/examples/lock-app/lock-common/src/LockEndpoint.cpp", + "${chip_root}/examples/lock-app/lock-common/src/LockManager.cpp", + "../common/main/AppTask.cpp", + "../common/main/DeviceCallbacks.cpp", + "../common/main/ZclCallbacks.cpp", + "../common/main/main.cpp", + ] + + if (chip_with_low_power == 0) { + sources += [ + "${common_example_dir}/ui_feedback/source/LedManager.cpp", + "${example_platform_dir}/util/LedOnOff.cpp", + ] + } + + deps += [ + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/platform/logging:default", + ] + + deps += [ "${chip_root}/examples/lock-app/nxp/zap:zap" ] + + if (chip_openthread_ftd) { + deps += [ + "${openthread_root}:libopenthread-cli-ftd", + "${openthread_root}:libopenthread-ftd", + ] + } else { + deps += [ + "${openthread_root}:libopenthread-cli-mtd", + "${openthread_root}:libopenthread-mtd", + ] + } + + cflags = [ + "-Wconversion", + "-Wno-error=format=", + ] + + ldscript = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" + + inputs = [ ldscript ] + + ldflags = [ + "-Wl,--defsym=__heap_size__=0", + "-Wl,--defsym=__stack_size__=0x480", + "-Wl,-print-memory-usage", + "-Wl,--no-warn-rwx-segments", + "-T" + rebase_path(ldscript, root_build_dir), + ] + + if (chip_with_factory_data == 1) { + ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] + } + + output_dir = root_out_dir +} + +group("default") { + deps = [ ":lock_app" ] +} diff --git a/examples/lock-app/nxp/mcxw71/README.md b/examples/lock-app/nxp/mcxw71/README.md new file mode 100644 index 00000000000000..593aed82f58641 --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/README.md @@ -0,0 +1,197 @@ +# Matter `MCXW71` Door Lock Example Application + +For generic information related to door lock application, please see the +[common README](../README.md). + +- [Matter `MCXW71` Door Lock Example Application](#matter-mcxw71-door-lock-example-application) + - [Introduction](#introduction) + - [Device UI](#device-ui) + - [Building](#building) + - [Flashing](#flashing) + - [Flashing the `NBU` image](#flashing-the-nbu-image) + - [Flashing the host image](#flashing-the-host-image) + - [Debugging](#debugging) + - [OTA](#ota) + +## Introduction + +The following board was used when testing this Matter reference app for an +`mcxw71` device: +![FRDM-MCXW71](../../../platform/nxp/mcxw71_k32w1/doc/images/frdm-mcxw71.jpg) + +## Device UI + +The state feedback is provided through LED effects: + +| widget | effect | description | +| ------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- | +| LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. | +| LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. | +| LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. | +| LED2 | solid on | The device is fully provisioned and has full network and service connectivity. | +| RGB LED | on | The `LockState` attribute of the `DoorLock` cluster is `Unlocked`. | +| RGB LED | off | The `LockState` attribute of the `DoorLock` cluster is `Locked`. | + +NOTE: `LED2` will be disabled when OTA is used. On `MCXW71` board, `PTB0` is +wired to both `LED2` and CS (Chip Select) of the External Flash Memory. Since +the OTA image is stored in external memory, `LED2` operations will affect OTA +operation by corrupting packages and OTA will not work. + +The user actions are summarized below: + +| button | action | state | output | +| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| SW2 | short press | not commissioned | Enable BLE advertising | +| SW2 | short press | commissioned + device is LIT | Enable Active Mode | +| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) | +| SW3 | short press | NA | Toggle attribute `LockState` value | +| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) | + +## Building + +Manually building requires running the following commands: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/lock-app/nxp/mcxw71 +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw71$ gn gen out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/lock-app/nxp/mcxw71$ ninja -C out/debug +``` + +Please note that running `gn gen out/debug` without `--args` option will use the +default gn args values found in `args.gni`. + +After a successful build, the `elf` and `srec` files are found in `out/debug/`. +See the files prefixed with `chip-mcxw71-lock-example`. + +## Flashing + +Two images must be written to the board: one for the host (CM33) and one for the +`NBU` (CM3). + +The image needed on the host side is the one generated in `out/debug/` while the +one needed on the `NBU` side can be found in the downloaded NXP-SDK package at +path - +`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter.sb3`. + +### Flashing the `NBU` image + +`NBU` image should be written only when a new NXP SDK is released. + +1. Install + [Secure Provisioning SDK tool](https://www.nxp.com/design/design-center/software/development-software/secure-provisioning-sdk-spsdk:SPSDK) + using Python: + + ``` + pip install spsdk + ``` + + Note: There might be some dependencies that cause conflicts with already + installed Python modules. However, `blhost` tool is still installed and can + be used. + +2. Updating `NBU` for Wireless examples + + It is necessary to work with the matching `NBU` image for the SDK version of + the application you are working with. This means that when you download your + SDK, prior to loading any wireless SDK example, update your `NBU` image with + the SDK provided binaries. For `FRDM` users, please write the following + binary: + + `middleware\wireless\ieee-802.15.4\bin\mcxw71\mcxw71_nbu_ble_15_4_dyn_matter_.sb3` + + Please note that `` may vary depending on the SDK version. + + 1. Place your device in `ISP` mode. + + - Make sure a jumper is placed on `JP25` + - Press and hold `SW4`, press and release Reset, then release `SW4` + + 2. Once the device is connected, you may find the assigned port by running: + + ``` + nxpdevscan + ``` + + 3. Run the `blhost` command to write the `sb3` file: + + ``` + blhost -p receive-sb-file \middleware\wireless\ieee-802.15.4\bin\mcxw71\mcxw71_nbu_ble_15_4_dyn_matter_.sb3 + ``` + +### Flashing the host image + +Host image is the one found under `out/debug/`. It should be written after each +build process. + +If debugging is needed then jump directly to the [Debugging](#debugging) +section. Otherwise, if only flashing is needed then +[JLink 7.84b or greater](https://www.segger.com/downloads/jlink/) can be used: + +- Plug `MCXW71` to the USB port (no need to keep the `SW4` button pressed + while doing this, e.g. ISP mode is not needed for host flashing) + +- Connect JLink to the device: + + ```bash + JLinkExe -device MCXW71 -if SWD -speed 4000 -autoconnect 1 + ``` + +- Run the following commands: + ```bash + reset + halt + loadfile chip-mcxw71-lock-example.srec + reset + go + quit + ``` + +## Debugging + +One option for debugging would be to use MCUXpresso IDE. + +- Drag-and-drop the zip file containing the NXP SDK in the "Installed SDKs" + tab: + +![Installed SDKs](../../../platform/nxp/mcxw71_k32w1/doc/images/mcxw71_installed_sdks.jpg) + +- Import any demo application from the installed SDK: + +``` +Import SDK example(s).. -> choose a demo app (demo_apps -> hello_world) -> Finish +``` + +![Import demo](../../../platform/nxp/mcxw71_k32w1/doc/images/import_demo.jpg) + +- Flash the previously imported demo application on the board: + +``` +Right click on the application (from Project Explorer) -> Debug as -> JLink/CMSIS-DAP +``` + +After this step, a debug configuration specific for the `MCXW71` board was +created. This debug configuration will be used later on for debugging the +application resulted after ot-nxp compilation. + +- Import Matter repo in MCUXpresso IDE as Makefile Project. Use _none_ as + _Toolchain for Indexer Settings_: + +``` +File -> Import -> C/C++ -> Existing Code as Makefile Project +``` + +![New Project](../../../platform/nxp/mcxw71_k32w1/doc/images/new_project.jpg) + +- Replace the path of the existing demo application with the path of the + `MCXW71` application: + +``` +Run -> Debug Configurations... -> C/C++ Application +``` + +![Debug MCXW71](../../../platform/nxp/mcxw71_k32w1/doc/images/mcxw71_debug.jpg) + +## OTA + +Please see +[mcxw71 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/lock-app/nxp/mcxw71/args.gni b/examples/lock-app/nxp/mcxw71/args.gni new file mode 100644 index 00000000000000..761b050b80cbec --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/args.gni @@ -0,0 +1,45 @@ +# Copyright (c) 2020 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. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +# SDK target. This is overridden to add our SDK app_config.h & defines. +nxp_sdk_target = get_label_info(":sdk", "label_no_toolchain") +nxp_device = "MCXW716C" + +chip_enable_ota_requestor = true +chip_stack_lock_tracking = "fatal" +chip_enable_ble = true +chip_generate_link_map_file = true + +chip_system_config_provide_statistics = false +chip_system_config_use_open_thread_inet_endpoints = true +chip_with_lwip = false + +chip_enable_icd_server = true +chip_enable_icd_lit = false +icd_enforce_sit_slow_poll_limit = true +chip_persist_subscriptions = true +chip_subscription_timeout_resumption = true + +is_debug = false + +chip_crypto = "platform" +chip_openthread_ftd = false +chip_with_ot_cli = 0 +chip_enable_matter_cli = true + +chip_with_diag_logs_demo = true +chip_with_low_power = 0 diff --git a/examples/lock-app/nxp/mcxw71/build_overrides b/examples/lock-app/nxp/mcxw71/build_overrides new file mode 120000 index 00000000000000..ee19c065d619a2 --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/build_overrides @@ -0,0 +1 @@ +../../../build_overrides/ \ No newline at end of file diff --git a/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h b/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h new file mode 100644 index 00000000000000..89f4bf9333c4c8 --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/include/config/AppConfig.h @@ -0,0 +1,27 @@ +/* + * Copyright 2024 Project CHIP Authors + * All rights reserved. + * + * 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. + */ + +#pragma once + +/* ---- App Config ---- */ + +/* ---- Button Manager Config ---- */ +#define BUTTON_MANAGER_FACTORY_RESET_TIMEOUT_MS 6000 + +/* ---- LED Manager Config ---- */ +#define LED_MANAGER_STATUS_LED_INDEX 0 +#define LED_MANAGER_LIGHT_LED_INDEX 1 diff --git a/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h new file mode 100644 index 00000000000000..984dd98b3adb6c --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020 Google LLC. + * All rights reserved. + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use hard-coded test certificates already embedded in generic chip code => set it to 0 +// Use real/development certificates => set it to 1 + file the provisioning section from +// the internal flash +#ifndef CONFIG_CHIP_LOAD_REAL_FACTORY_DATA +#define CONFIG_CHIP_LOAD_REAL_FACTORY_DATA 0 +#endif + +#if CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + +// VID/PID for product => will be used by Basic Information Cluster +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x1037 +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0xA401 + +// Set the following define to use the Certification Declaration from below and not use it stored in factory data section +#ifndef CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION +#define CHIP_USE_DEVICE_CONFIG_CERTIFICATION_DECLARATION 0 +#endif + +#ifndef CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION +//-> format_version = 1 +//-> vendor_id = 0x1037 +//-> product_id_array = [ 0xA401 ] +//-> device_type_id = 0x0100 +//-> certificate_id = "ZIG20142ZB330003-24" +//-> security_level = 0 +//-> security_information = 0 +//-> version_number = 0x2694 +//-> certification_type = 1 +//-> dac_origin_vendor_id is not present +//-> dac_origin_product_id is not present +#define CHIP_DEVICE_CONFIG_CERTIFICATION_DECLARATION \ + { \ + 0x30, 0x81, 0xe8, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xda, 0x30, 0x81, 0xd7, \ + 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, \ + 0x44, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x37, 0x04, 0x35, 0x15, 0x24, 0x00, \ + 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x01, 0xa4, 0x18, 0x24, 0x03, 0x0a, 0x2c, 0x04, 0x13, 0x5a, 0x49, \ + 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, \ + 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, \ + 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, \ + 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, \ + 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0xca, 0x6f, 0xf9, \ + 0xae, 0x3b, 0x2f, 0xc1, 0xf4, 0x07, 0x8f, 0x6d, 0x6e, 0x3b, 0x99, 0xff, 0x98, 0x18, 0x6b, 0x6b, 0xed, 0xa0, 0x27, \ + 0x88, 0xa4, 0x09, 0xc2, 0x0f, 0xc5, 0xa3, 0x21, 0xc2, 0x15, 0x02, 0x20, 0x67, 0x5a, 0xef, 0xe3, 0x0c, 0xcc, 0x9f, \ + 0xcb, 0x1e, 0x45, 0xe1, 0x20, 0xf2, 0xf1, 0x14, 0x19, 0x49, 0xf7, 0x2b, 0xdd, 0x34, 0x85, 0x16, 0xbd, 0x88, 0x9c, \ + 0xc8, 0xac, 0xd0, 0x70, 0x9e, 0x05 \ + } + +// All remaining data will be pulled from the provisioning region of flash. +#endif + +#else + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8005 + +// Use a default setup PIN code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS" + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in CHIP NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +#endif // CONFIG_CHIP_LOAD_REAL_FACTORY_DATA + +/** + * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION + * + * The hardware version number assigned to device or product by the device vendor. This + * number is scoped to the device product id, and typically corresponds to a revision of the + * physical device, a change to its packaging, and/or a change to its marketing presentation. + * This value is generally *not* incremented for device software versions. + */ +#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 100 + +#ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING "v0.1.0" +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING NXP_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION NXP_CONFIG_DEVICE_SOFTWARE_VERSION +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_NAME "NXP Semiconductors" +#endif + +#ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_NAME "NXP Demo App" +#endif + +/** + * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT + * + * The amount of time in miliseconds after which BLE should change his advertisements + * from fast interval to slow interval. + * + * 30000 (30 secondes). + */ +#define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000) + +/** + * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT + * + * The amount of time in miliseconds after which BLE advertisement should be disabled, counting + * from the moment of slow advertisement commencement. + * + * Defaults to 9000000 (15 minutes). + */ +#define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) + +/** + * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * + * NFC commissioning is not supported on K32W1 + */ +#define CONFIG_CHIP_NFC_COMMISSIONING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 + +/** + * @def CHIP_CONFIG_MAX_FABRICS + * + * @brief + * Maximum number of fabrics the device can participate in. Each fabric can + * provision the device with its unique operational credentials and manage + * its own access control lists. + */ +#define CHIP_CONFIG_MAX_FABRICS 5 // 5 is the minimum number of supported fabrics + +#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 + +/** + * @def CHIP_DEVICE_CONFIG_KVS_WEAR_STATS + * + * @brief Toggle support for key value store wear stats on or off. + */ +#define CHIP_DEVICE_CONFIG_KVS_WEAR_STATS 0 + +/** + * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER + * + * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server. + */ +#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_HANDLER + * + * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server. + */ +#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2 + +/** + * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE + * + * For a development build, set the default importance of events to be logged as Debug. + * Since debug is the lowest importance level, this means all standard, critical, info and + * debug importance level vi events get logged. + */ +#if BUILD_RELEASE +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production +#else +#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug +#endif // BUILD_RELEASE + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +#if CONFIG_DIAG_LOGS_DEMO +#define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER 1 +#define CHIP_DEVICE_CONFIG_MAX_DIAG_LOG_SIZE 1024 +#endif diff --git a/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip b/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip new file mode 120000 index 00000000000000..59307833b4fee9 --- /dev/null +++ b/examples/lock-app/nxp/mcxw71/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../../.. \ No newline at end of file diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 347ad97fbe2946..7c39ef0fe254eb 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -539,6 +539,177 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct QueryImageRequest { + vendor_id vendorID = 0; + int16u productID = 1; + int32u softwareVersion = 2; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -810,6 +981,53 @@ cluster NetworkCommissioning = 49 { command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; } +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { revision 2; @@ -1398,6 +1616,104 @@ cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +cluster IcdManagement = 70 { + revision 3; + + enum ClientTypeEnum : enum8 { + kPermanent = 0; + kEphemeral = 1; + } + + enum OperatingModeEnum : enum8 { + kSIT = 0; + kLIT = 1; + } + + bitmap Feature : bitmap32 { + kCheckInProtocolSupport = 0x1; + kUserActiveModeTrigger = 0x2; + kLongIdleTimeSupport = 0x4; + kDynamicSitLitSupport = 0x8; + } + + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_sensitive ClientTypeEnum clientType = 4; + fabric_idx fabricIndex = 254; + } + + readonly attribute int32u idleModeDuration = 0; + readonly attribute int32u activeModeDuration = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + provisional readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + provisional readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; + provisional readonly attribute optional OperatingModeEnum operatingMode = 8; + provisional readonly attribute optional int32u maximumCheckInBackOff = 9; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + ClientTypeEnum clientType = 4; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + request struct StayActiveRequestRequest { + int32u stayActiveDuration = 0; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3; +} + /** An interface to a generic way to secure a door */ cluster DoorLock = 257 { revision 7; @@ -2050,8 +2366,9 @@ cluster DoorLock = 257 { } endpoint 0 { - device type ma_rootdevice = 22, version 1; + device type ma_rootdevice = 22, version 2; + binding cluster OtaSoftwareUpdateProvider; server cluster Descriptor { callback attribute deviceTypeList; @@ -2066,9 +2383,13 @@ endpoint 0 { emits event AccessControlEntryChanged; emits event AccessControlExtensionChanged; callback attribute acl; + callback attribute extension; callback attribute subjectsPerAccessControlEntry; callback attribute targetsPerAccessControlEntry; callback attribute accessControlEntriesPerFabric; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; callback attribute clusterRevision; @@ -2093,16 +2414,49 @@ endpoint 0 { callback attribute capabilityMinima; callback attribute specificationVersion; callback attribute maxPathsPerInvoke; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 3; } + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; callback attribute regulatoryConfig; callback attribute locationCapability; callback attribute supportsConcurrentConnection; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; @@ -2123,8 +2477,14 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + ram attribute supportedThreadFeatures; + ram attribute threadVersion; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command ScanNetworks; handle command ScanNetworksResponse; @@ -2136,12 +2496,29 @@ endpoint 0 { handle command ReorderNetwork; } + server cluster DiagnosticLogs { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + server cluster GeneralDiagnostics { emits event BootReason; callback attribute networkInterfaces; callback attribute rebootCount; callback attribute upTime; + callback attribute activeNetworkFaults; callback attribute testEventTriggersEnabled default = false; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2222,6 +2599,10 @@ endpoint 0 { callback attribute channelPage0Mask; callback attribute operationalDatasetComponents; callback attribute activeNetworkFaultsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 2; @@ -2278,16 +2659,29 @@ endpoint 0 { handle command KeySetReadAllIndices; handle command KeySetReadAllIndicesResponse; } + + server cluster IcdManagement { + callback attribute idleModeDuration; + callback attribute activeModeDuration; + callback attribute activeModeThreshold; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 1; + } } endpoint 1 { device type ma_doorlock = 10, version 1; server cluster Identify { - ram attribute identifyTime default = 0x0; + ram attribute identifyTime default = 0x0000; ram attribute identifyType default = 0x0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 4; @@ -2303,6 +2697,7 @@ endpoint 1 { callback attribute partsList; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; callback attribute featureMap; callback attribute clusterRevision; @@ -2310,34 +2705,41 @@ endpoint 1 { server cluster DoorLock { emits event DoorLockAlarm; + emits event DoorStateChange; emits event LockOperation; emits event LockOperationError; emits event LockUserChange; - ram attribute lockState; + persist attribute lockState default = 1; ram attribute lockType; ram attribute actuatorEnabled; - ram attribute numberOfTotalUsersSupported default = 0; + ram attribute doorState; + ram attribute numberOfTotalUsersSupported default = 10; + ram attribute numberOfPINUsersSupported default = 10; + ram attribute numberOfRFIDUsersSupported default = 10; + ram attribute maxPINCodeLength default = 8; + ram attribute minPINCodeLength default = 6; + ram attribute maxRFIDCodeLength default = 20; + ram attribute minRFIDCodeLength default = 10; ram attribute credentialRulesSupport default = 1; + ram attribute numberOfCredentialsSupportedPerUser default = 5; ram attribute autoRelockTime; - ram attribute operatingMode; + ram attribute operatingMode default = 0x00; ram attribute supportedOperatingModes default = 0xFFF6; - ram attribute expiringUserTimeout default = 1440; + ram attribute enableOneTouchLocking default = 0x00; + ram attribute enablePrivacyModeButton default = 0x00; + ram attribute wrongCodeEntryLimit default = 3; + ram attribute userCodeTemporaryDisableTime default = 10; + ram attribute requirePINforRemoteOperation default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x1000; - ram attribute clusterRevision default = 6; + ram attribute featureMap default = 0x0001; + ram attribute clusterRevision default = 7; handle command LockDoor; handle command UnlockDoor; - handle command SetUser; - handle command GetUser; - handle command GetUserResponse; - handle command ClearUser; - handle command SetCredential; - handle command SetCredentialResponse; - handle command GetCredentialStatus; - handle command GetCredentialStatusResponse; + handle command UnlockWithTimeout; } } diff --git a/examples/lock-app/nxp/zap/lock-app.zap b/examples/lock-app/nxp/zap/lock-app.zap index 70442ac916c7fe..67da76956d2e1d 100644 --- a/examples/lock-app/nxp/zap/lock-app.zap +++ b/examples/lock-app/nxp/zap/lock-app.zap @@ -52,7 +52,7 @@ } ], "deviceVersions": [ - 1 + 2 ], "deviceIdentifiers": [ 22 @@ -191,6 +191,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "SubjectsPerAccessControlEntry", "code": 2, @@ -239,6 +255,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -553,6 +617,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -611,138 +739,132 @@ ] }, { - "name": "General Commissioning", - "code": 48, + "name": "OTA Software Update Provider", + "code": 41, "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", "enabled": 1, "commands": [ { - "name": "ArmFailSafe", + "name": "QueryImage", "code": 0, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { - "name": "ArmFailSafeResponse", + "name": "QueryImageResponse", "code": 1, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { - "name": "SetRegulatoryConfig", + "name": "ApplyUpdateRequest", "code": 2, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 }, { - "name": "SetRegulatoryConfigResponse", + "name": "ApplyUpdateResponse", "code": 3, "mfgCode": null, "source": "server", - "isIncoming": 0, + "isIncoming": 1, "isEnabled": 1 }, { - "name": "CommissioningComplete", + "name": "NotifyUpdateApplied", "code": 4, "mfgCode": null, "source": "client", - "isIncoming": 1, + "isIncoming": 0, "isEnabled": 1 - }, + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ { - "name": "CommissioningCompleteResponse", - "code": 5, + "name": "AnnounceOTAProvider", + "code": 0, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 } ], "attributes": [ { - "name": "Breadcrumb", + "name": "DefaultOTAProviders", "code": 0, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": null, "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BasicCommissioningInfo", + "name": "UpdatePossible", "code": 1, "mfgCode": null, "side": "server", - "type": "BasicCommissioningInfo", + "type": "boolean", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "1", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "RegulatoryConfig", + "name": "UpdateState", "code": 2, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", + "type": "UpdateStateEnum", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { - "name": "LocationCapability", + "name": "UpdateStateProgress", "code": 3, "mfgCode": null, "side": "server", - "type": "RegulatoryLocationTypeEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportsConcurrentConnection", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": null, + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -780,33 +902,430 @@ "maxInterval": 65344, "reportableChange": 0 } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } ] }, { - "name": "Network Commissioning", - "code": 49, + "name": "Localization Configuration", + "code": 43, "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "server", "enabled": 1, - "commands": [ + "attributes": [ { - "name": "ScanNetworks", + "name": "ActiveLocale", "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ScanNetworksResponse", + "name": "SupportedLocales", "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { "name": "AddOrUpdateThreadNetwork", "code": 3, "mfgCode": null, @@ -815,66 +1334,258 @@ "isEnabled": 1 }, { - "name": "RemoveNetwork", - "code": 4, + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "NetworkConfigResponse", - "code": 5, + "name": "ThreadVersion", + "code": 10, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ConnectNetwork", - "code": 6, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ConnectNetworkResponse", - "code": 7, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "MaxNetworks", - "code": 0, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Networks", - "code": 1, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "type": "array", @@ -889,96 +1600,124 @@ "reportableChange": 0 }, { - "name": "ScanMaxTimeSeconds", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ConnectMaxTimeSeconds", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "InterfaceEnabled", - "code": 4, + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkingStatus", - "code": 5, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "NetworkCommissioningStatusEnum", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastNetworkID", - "code": 6, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "octet_string", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LastConnectErrorValue", - "code": 7, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "int32s", + "type": "array", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -994,7 +1733,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1012,8 +1751,8 @@ "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -1089,7 +1828,87 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "int64u", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, @@ -1101,16 +1920,16 @@ "reportableChange": 0 }, { - "name": "TestEventTriggersEnabled", - "code": 8, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "false", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2253,6 +3072,70 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2786,12 +3669,166 @@ "reportableChange": 0 } ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] } ] }, { "id": 2, - "name": "Anonymous Endpoint Type", + "name": "MA-dimmablelight", "deviceTypeRef": { "code": 10, "profileId": 259, @@ -2852,10 +3889,10 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0", + "defaultValue": "0x0000", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 }, { @@ -2906,6 +3943,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -2950,8 +4003,8 @@ "bounded": 0, "defaultValue": "4", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 } ] @@ -3013,8 +4066,24 @@ "reportableChange": 0 }, { - "name": "PartsList", - "code": 3, + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "type": "array", @@ -3029,8 +4098,8 @@ "reportableChange": 0 }, { - "name": "GeneratedCommandList", - "code": 65528, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "type": "array", @@ -3045,8 +4114,8 @@ "reportableChange": 0 }, { - "name": "AcceptedCommandList", - "code": 65529, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", "type": "array", @@ -3135,130 +4204,186 @@ "isEnabled": 1 }, { - "name": "SetUser", - "code": 26, + "name": "UnlockWithTimeout", + "code": 3, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, + } + ], + "attributes": [ { - "name": "GetUser", - "code": 27, + "name": "LockState", + "code": 0, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "DlLockState", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetUserResponse", - "code": 28, + "name": "LockType", + "code": 1, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "DlLockType", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "ClearUser", - "code": 29, + "name": "ActuatorEnabled", + "code": 2, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "SetCredential", - "code": 34, + "name": "DoorState", + "code": 3, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "DoorStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "SetCredentialResponse", - "code": 35, + "name": "NumberOfTotalUsersSupported", + "code": 17, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetCredentialStatus", - "code": 36, + "name": "NumberOfPINUsersSupported", + "code": 18, "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "GetCredentialStatusResponse", - "code": 37, + "name": "NumberOfRFIDUsersSupported", + "code": 19, "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { - "name": "LockState", - "code": 0, + "name": "MaxPINCodeLength", + "code": 23, "mfgCode": null, "side": "server", - "type": "DlLockState", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "8", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LockType", - "code": 1, + "name": "MinPINCodeLength", + "code": 24, "mfgCode": null, "side": "server", - "type": "DlLockType", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ActuatorEnabled", - "code": 2, + "name": "MaxRFIDCodeLength", + "code": 25, "mfgCode": null, "side": "server", - "type": "boolean", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "20", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NumberOfTotalUsersSupported", - "code": 17, + "name": "MinRFIDCodeLength", + "code": 26, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "int8u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "10", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3280,6 +4405,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "NumberOfCredentialsSupportedPerUser", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AutoRelockTime", "code": 35, @@ -3306,7 +4447,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3329,16 +4470,80 @@ "reportableChange": 0 }, { - "name": "ExpiringUserTimeout", - "code": 53, + "name": "EnableOneTouchLocking", + "code": 41, "mfgCode": null, "side": "server", - "type": "int16u", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EnablePrivacyModeButton", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "WrongCodeEntryLimit", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserCodeTemporaryDisableTime", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RequirePINforRemoteOperation", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "boolean", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1440", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3376,6 +4581,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -3402,7 +4623,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x1000", + "defaultValue": "0x0001", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3418,7 +4639,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "7", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3433,6 +4654,13 @@ "side": "server", "included": 1 }, + { + "name": "DoorStateChange", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, { "name": "LockOperation", "code": 2, @@ -3469,7 +4697,7 @@ "parentEndpointIdentifier": null }, { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-dimmablelight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, diff --git a/examples/platform/nxp/common/app_task/include/AppTaskBase.h b/examples/platform/nxp/common/app_task/include/AppTaskBase.h index 76e18df7f47eb0..b9348eff3f7e69 100644 --- a/examples/platform/nxp/common/app_task/include/AppTaskBase.h +++ b/examples/platform/nxp/common/app_task/include/AppTaskBase.h @@ -177,6 +177,13 @@ class AppTaskBase virtual void SwitchCommissioningStateHandler(void); virtual void FactoryResetHandler(void); + /** + * Cluster-handling functions + * Must be overridden by a child class per cluster configuration + */ + virtual bool CheckStateClusterHandler(void) { return false; } + virtual CHIP_ERROR ProcessSetStateClusterHandler(void) { return CHIP_ERROR_NOT_IMPLEMENTED; } + private: inline static chip::CommonCaseDeviceServerInitParams initParams; diff --git a/examples/platform/nxp/common/icd/source/ICDUtil.cpp b/examples/platform/nxp/common/icd/source/ICDUtil.cpp index 98986c4a7a09f9..f42281719494fc 100644 --- a/examples/platform/nxp/common/icd/source/ICDUtil.cpp +++ b/examples/platform/nxp/common/icd/source/ICDUtil.cpp @@ -26,17 +26,12 @@ chip::NXP::App::ICDUtil chip::NXP::App::ICDUtil::sICDUtil; CHIP_ERROR chip::NXP::App::ICDUtil::OnSubscriptionRequested(chip::app::ReadHandler & aReadHandler, chip::Transport::SecureSession & aSecureSession) { - uint16_t agreedMaxInterval = kSubscriptionMaxIntervalPublisherLimit; uint16_t requestedMinInterval = 0; uint16_t requestedMaxInterval = 0; aReadHandler.GetReportingIntervals(requestedMinInterval, requestedMaxInterval); - if (requestedMaxInterval < agreedMaxInterval) - { - agreedMaxInterval = requestedMaxInterval; - } #if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR chip::NXP::App::OTARequestorInitiator::Instance().gImageProcessor.SetRebootDelaySec(requestedMinInterval); #endif - return aReadHandler.SetMaxReportingInterval(agreedMaxInterval); + return CHIP_NO_ERROR; } diff --git a/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp b/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp index ac2456f327b61c..42caeaf22ac66d 100644 --- a/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp +++ b/examples/platform/nxp/common/ui_feedback/source/LedManager.cpp @@ -61,8 +61,6 @@ void LedManager::Init() #endif /* The parameters will not be used by the dimmer init. */ lightLed.Init(LED_MANAGER_LIGHT_LED_INDEX, false); - - RestoreState(); } void LedManager::DisplayInLoop() @@ -97,7 +95,7 @@ void LedManager::RestoreState() chip::DeviceLayer::PlatformMgr().ScheduleWork([](intptr_t arg) { bool val = false; - APP_CLUSTER_ATTRIBUTE::Get(APP_DEVICE_TYPE_ENDPOINT, &val); + val = chip::NXP::App::GetAppTask().CheckStateClusterHandler(); if (val) LightingMgr().ApplyTurnOn(); else diff --git a/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp b/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp index e05281fdee4f4d..f3f820d9e3422b 100644 --- a/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp +++ b/examples/platform/nxp/mcxw71_k32w1/app/support/Memconfig.cpp @@ -135,4 +135,9 @@ void * __wrap__realloc_r(void * REENT, void * ptr, size_t new_size) return __wrap_realloc(ptr, new_size); } +void * __wrap__calloc_r(void * REENT, size_t num, size_t size) +{ + return __wrap_calloc(num, size); +} + } // extern "C" diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp index 47e5f9fd4b6c9d..09b0546c30968c 100644 --- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp +++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp @@ -144,10 +144,8 @@ void ButtonManager::AppActionEventHandler(const AppEvent & event) { chip::DeviceLayer::PlatformMgr().ScheduleWork( [](intptr_t arg) { - bool val = false; - APP_CLUSTER_ATTRIBUTE::Get(APP_DEVICE_TYPE_ENDPOINT, &val); - auto status = APP_CLUSTER_ATTRIBUTE::Set(APP_DEVICE_TYPE_ENDPOINT, (bool) !val); - if (status != chip::Protocols::InteractionModel::Status::Success) + auto status = chip::NXP::App::GetAppTask().ProcessSetStateClusterHandler(); + if (status != CHIP_NO_ERROR) { ChipLogProgress(DeviceLayer, "Error when updating cluster attribute"); } diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index d0a7e384ee4c77..ca1110088723df 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -522,6 +522,7 @@ def BuildNxpTarget(): target.AppendFixedTargets([ TargetPart('lighting', app=NxpApp.LIGHTING).OnlyIfRe('(k32w0|k32w1|mcxw71)'), TargetPart('contact-sensor', app=NxpApp.CONTACT).OnlyIfRe('(k32w0|k32w1|mcxw71)'), + TargetPart('lock-app', app=NxpApp.LOCK_APP).OnlyIfRe('(k32w1|mcxw71)'), TargetPart('all-clusters', app=NxpApp.ALLCLUSTERS).OnlyIfRe('rw61x'), TargetPart('laundry-washer', app=NxpApp.LAUNDRYWASHER).OnlyIfRe('rw61x'), TargetPart('thermostat', app=NxpApp.THERMOSTAT).OnlyIfRe('rw61x') diff --git a/scripts/build/builders/nxp.py b/scripts/build/builders/nxp.py index 1124a03142472c..81dc425169b06e 100644 --- a/scripts/build/builders/nxp.py +++ b/scripts/build/builders/nxp.py @@ -77,6 +77,7 @@ class NxpApp(Enum): ALLCLUSTERS = auto() LAUNDRYWASHER = auto() THERMOSTAT = auto() + LOCK_APP = auto() def ExampleName(self): if self == NxpApp.LIGHTING: @@ -89,6 +90,8 @@ def ExampleName(self): return "laundry-washer-app" elif self == NxpApp.THERMOSTAT: return "thermostat" + elif self == NxpApp.LOCK_APP: + return "lock-app" else: raise Exception('Unknown app type: %r' % self) @@ -103,6 +106,8 @@ def NameSuffix(self): return "laundry-washer-example" elif self == NxpApp.THERMOSTAT: return "thermostat-example" + elif self == NxpApp.LOCK_APP: + return "lock-example" else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index d7a834dfc431c2..b177abfbf7117a 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -13,7 +13,7 @@ linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,therm linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm] -nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell] +nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell] mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug] mw320-all-clusters-app nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc] diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp index 249b51b7681c22..c26a7da59b9483 100644 --- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp @@ -205,6 +205,11 @@ CHIP_ERROR OTAImageProcessorImpl::RegisterProcessor(uint32_t tag, OTATlvProcesso return CHIP_NO_ERROR; } +void OTAImageProcessorImpl::SetRebootDelaySec(uint16_t rebootDelay) +{ + mDelayBeforeRebootSec = rebootDelay; +} + void OTAImageProcessorImpl::HandleAbort(intptr_t context) { ChipLogError(SoftwareUpdate, "OTA was aborted"); diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h index a30677037ea7f4..9a862a716b957f 100644 --- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h +++ b/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h @@ -73,6 +73,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR SelectProcessor(ByteSpan & block); CHIP_ERROR RegisterProcessor(uint32_t tag, OTATlvProcessor * processor); Optional & GetBackupProvider() { return mBackupProviderLocation; } + void SetRebootDelaySec(uint16_t rebootDelay); static void FetchNextData(uint32_t context); static OTAImageProcessorImpl & GetDefaultInstance(); @@ -109,6 +110,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTADataAccumulator mAccumulator; std::map mProcessorMap; Optional mBackupProviderLocation; + uint16_t mDelayBeforeRebootSec = 0; }; } // namespace chip diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp index 9a52321e48fce8..3c1e39b041b4e2 100644 --- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp @@ -103,6 +103,32 @@ void PlatformManagerImpl::CleanReset() HAL_ResetMCU(); } +void PlatformManagerImpl::ScheduleResetInIdle(void) +{ + resetInIdle = true; +} + +bool PlatformManagerImpl::GetResetInIdleValue(void) +{ + return resetInIdle; +} + +extern "C" void initiateResetInIdle(void) +{ + PlatformMgr().Shutdown(); + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" void scheduleResetInIdle(void) +{ + PlatformMgrImpl().ScheduleResetInIdle(); +} + +extern "C" bool getResetInIdleValue(void) +{ + return PlatformMgrImpl().GetResetInIdleValue(); +} + static int app_entropy_source(void * data, unsigned char * output, size_t len, size_t * olen) { otError otErr = otPlatEntropyGet(output, (uint16_t) len); diff --git a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h index ae1ef0ad3eb25f..588790823cdd57 100644 --- a/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h +++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h @@ -53,6 +53,8 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener CHIP_ERROR ServiceInit(void); void CleanReset(); void StopBLEConnectivity() {} + void ScheduleResetInIdle(void); + bool GetResetInIdleValue(void); private: // ===== Methods that implement the PlatformManager abstract interface. @@ -68,6 +70,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener System::Clock::Timestamp mStartTime = System::Clock::kZero; + bool resetInIdle = false; static PlatformManagerImpl sInstance; using Internal::GenericPlatformManagerImpl_FreeRTOS::PostEventFromISR; From b30d23a6542faaffc1c297eed682bf17ffa46abe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:20:56 -0400 Subject: [PATCH 14/42] Bump jinja2 in /integrations/docker/images/stage-2/chip-build-efr32 (#35509) Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4. - [Release notes](https://github.com/pallets/jinja/releases) - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst) - [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4) --- updated-dependencies: - dependency-name: jinja2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../docker/images/stage-2/chip-build-efr32/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt b/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt index 5c9ae9889f5ef3..94a277ac3666db 100644 --- a/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt +++ b/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt @@ -1,5 +1,5 @@ # codegen.py build requirements -Jinja2==3.1.3 +Jinja2==3.1.4 lark==1.1.7 # Sphinx dependencies (for slc-cli) linkify-it-py==2.0.2 From 7789409fe254593975c2572e7392b6d2f6ed9e57 Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Fri, 13 Sep 2024 10:22:26 -0400 Subject: [PATCH 15/42] Updated TC_S_2_2 to match vs doc (#35519) --- .../suites/certification/Test_TC_S_2_2.yaml | 301 ++++++++++++++++-- 1 file changed, 278 insertions(+), 23 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index 95005e30c40e42..0d78bccbe64e05 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -219,7 +219,14 @@ tests: "Step 2a: TH configures AC1 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC1? + ./chip-tool levelcontrol move-to-level-with-on-off 100 0 0 0 1 1 + + DUT is configured with AC1 for application clusters which is implemented and supporting scenes + + [1705040301.476123][6423:6425] CHIP:DMG: StatusIB = + [1705040301.476139][6423:6425] CHIP:DMG: { + [1705040301.476152][6423:6425] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040301.476164][6423:6425] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -315,7 +322,16 @@ tests: "Step 3a: TH configures AC2 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC2? + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC2 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + ./chip-tool levelcontrol move-to-level-with-on-off 200 0 0 0 1 1 + + DUT is configured with AC2 for application clusters which is implemented, supporting scenes and different from AC1 + + [1705040820.918043][6555:6557] CHIP:DMG: StatusIB = + [1705040820.918056][6555:6557] CHIP:DMG: { + [1705040820.918068][6555:6557] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040820.918080][6555:6557] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -340,6 +356,47 @@ tests: - name: "SceneID" value: 0x01 + - label: "Wait 250 ms for instant transition" + PICS: PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 250 + + - label: + "TH confirm the DUT reached AC1 (on level control cluster) after 250ms" + PICS: PICS_SDK_CI_ONLY && S.S.C05.Rsp + cluster: "Level Control" + command: "readAttribute" + attribute: "CurrentLevel" + response: + value: 100 + + - label: "Verify DUT returns to AC1." + verification: | + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + Read CurrentLevel attribute from level control cluster + + ./chip-tool levelcontrol read current-level 1 1 + + Verify CurrentLevel attribute value on TH(chip-tool) + + [1708072116.730389][7757:7759] CHIP:DMG: } + [1708072116.730518][7757:7759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0000 DataVersion: 2359286215 + [1708072116.730552][7757:7759] CHIP:TOO: CurrentLevel: 100 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please confirm AC1 on DUT and enter 'y'." + - name: "expectedValue" + value: "y" + - label: "Step 3c: TH reads attribute SceneTableSize from DUT." command: "readAttribute" attribute: "SceneTableSize" @@ -411,7 +468,16 @@ tests: "Step 4c: TH configures AC2 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC2? + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + ./chip-tool levelcontrol move-to-level-with-on-off 200 0 0 0 1 1 + + DUT is configured with AC2 for application clusters which is implemented, supporting scenes and different from AC1 + + [1705040820.918043][6555:6557] CHIP:DMG: StatusIB = + [1705040820.918056][6555:6557] CHIP:DMG: { + [1705040820.918068][6555:6557] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040820.918080][6555:6557] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -436,6 +502,47 @@ tests: - name: "SceneID" value: 0x01 + - label: "Wait 250 ms for instant transition" + PICS: PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 250 + + - label: + "TH confirm the DUT reached AC1 (on level control cluster) after 250ms" + PICS: PICS_SDK_CI_ONLY && S.S.C05.Rsp + cluster: "Level Control" + command: "readAttribute" + attribute: "CurrentLevel" + response: + value: 100 + + - label: "Verify DUT returns to AC1." + verification: | + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + Read CurrentLevel attribute from level control cluster + + ./chip-tool levelcontrol read current-level 1 1 + + Verify CurrentLevel attribute value on TH(chip-tool) + + [1708072116.730389][7757:7759] CHIP:DMG: } + [1708072116.730518][7757:7759] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0000 DataVersion: 2359286215 + [1708072116.730552][7757:7759] CHIP:TOO: CurrentLevel: 100 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Please confirm AC1 on DUT and enter 'y'." + - name: "expectedValue" + value: "y" + - label: "Step 4e: TH sends a RecallScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0xFF, which is outside of the @@ -516,24 +623,93 @@ tests: - label: "Step 5a: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." + verification: | + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + ./chip-tool scenesmanagement view-scene 0x0001 0x01 1 1 + + Verify DUT sends a ViewSceneResponse command to TH with the Status field set to 0x00 (SUCCESS), the GroupID field set to G1, the SceneID field set to 0x01, the TransitionTime field set to 0x0000 and a set of extension fields appropriate to AC1 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + + [1720440014.726] [13252:13254] [DMG] Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0001 + [1720440014.726] [13252:13254] [TOO] Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0001 + [1720440014.726] [13252:13254] [TOO] ViewSceneResponse: { + [1720440014.726] [13252:13254] [TOO] status: 0 + [1720440014.726] [13252:13254] [TOO] groupID: 1 + [1720440014.726] [13252:13254] [TOO] sceneID: 1 + [1720440014.726] [13252:13254] [TOO] transitionTime: 0 + [1720440014.727] [13252:13254] [TOO] sceneName: + [1720440014.727] [13252:13254] [TOO] extensionFieldSets: 3 entries + [1720440014.727] [13252:13254] [TOO] [1]: { + [1720440014.727] [13252:13254] [TOO] ClusterID: 6 + [1720440014.727] [13252:13254] [TOO] AttributeValueList: 1 entries + [1720440014.727] [13252:13254] [TOO] [1]: { + [1720440014.727] [13252:13254] [TOO] AttributeID: 0 + [1720440014.727] [13252:13254] [TOO] ValueUnsigned8: 1 + [1720440014.727] [13252:13254] [TOO] } + [1720440014.727] [13252:13254] [TOO] } + [1720440014.727] [13252:13254] [TOO] [2]: { + [1720440014.727] [13252:13254] [TOO] ClusterID: 8 + [1720440014.727] [13252:13254] [TOO] AttributeValueList: 1 entries + [1720440014.727] [13252:13254] [TOO] [1]: { + [1720440014.727] [13252:13254] [TOO] AttributeID: 0 + [1720440014.727] [13252:13254] [TOO] ValueUnsigned8: 100 + [1720440014.727] [13252:13254] [TOO] } + [1720440014.727] [13252:13254] [TOO] } + [1720440014.727] [13252:13254] [TOO] [3]: { + [1720440014.727] [13252:13254] [TOO] ClusterID: 768 + [1720440014.727] [13252:13254] [TOO] AttributeValueList: 9 entries + [1720440014.727] [13252:13254] [TOO] [1]: { + [1720440014.727] [13252:13254] [TOO] AttributeID: 3 + [1720440014.727] [13252:13254] [TOO] ValueUnsigned16: 24939 + [1720440014.727] [13252:13254] [TOO] } + [1720440014.727] [13252:13254] [TOO] [2]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 4 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned16: 24701 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [3]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 16384 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned16: 0 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [4]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 1 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned8: 0 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [5]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 16386 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned8: 0 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [6]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 16387 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned8: 0 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [7]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 16388 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned16: 25 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [8]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 7 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned16: 0 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.728] [13252:13254] [TOO] [9]: { + [1720440014.728] [13252:13254] [TOO] AttributeID: 16385 + [1720440014.728] [13252:13254] [TOO] ValueUnsigned8: 2 + [1720440014.728] [13252:13254] [TOO] } + [1720440014.729] [13252:13254] [TOO] } + [1720440014.729] [13252:13254] [TOO] } PICS: S.S.C01.Rsp && PICS_SKIP_SAMPLE_APP - command: "ViewScene" + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "GroupID" - value: G1 - - name: "SceneID" - value: 0x01 - response: - values: - - name: "Status" - value: 0x00 - - name: "GroupID" - value: G1 - - name: "SceneID" - value: 0x01 - - name: "TransitionTime" - value: 0x0000 + - name: "message" + value: + "Please execute the view-scene command and verify that the + extensionfieldsets, status, groupID and SceneID are in + accordance with AC1 on DUT and enter 'y' if the command is + successful" + - name: "expectedValue" + value: "y" - label: "Step 5b: TH sends a ViewScene command to DUT with the GroupID field @@ -728,7 +904,7 @@ tests: set to GI (Where GI is a group currently absent from the group table), the SceneID field set to 0x01, the TransitionTime field set to 1000 (1s) and a set of extension fields appropriate to AC1." - PICS: S.S.C00.Rsp + PICS: S.S.C00.Rsp && PICS_SDK_CI_ONLY command: "AddScene" arguments: values: @@ -751,6 +927,55 @@ tests: - name: "SceneID" value: 0x01 + - label: + "Step 8b: TH sends a AddScene command to DUT with the GroupID field + set to GI (Where GI is a group currently absent from the group table), + the SceneID field set to 0x01, the TransitionTime field set to 1000 + (1s) and a set of extension fields appropriate to AC1." + verification: | + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + ./chip-tool groupkeymanagement read group-table 1 0 + + Verify the GroupTable entries on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1705676728.146505][4668:4670] CHIP:DMG: } + [1705676728.146723][4668:4670] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 3010518007 + [1705676728.146781][4668:4670] CHIP:TOO: GroupTable: 1 entries + [1705676728.147147][4668:4670] CHIP:TOO: [1]: { + [1705676728.147155][4668:4670] CHIP:TOO: GroupId: 1 + [1705676728.147160][4668:4670] CHIP:TOO: Endpoints: 1 entries + [1705676728.147164][4668:4670] CHIP:TOO: [1]: 1 + [1705676728.147167][4668:4670] CHIP:TOO: GroupName: Gp1 + [1705676728.147170][4668:4670] CHIP:TOO: FabricIndex: 1 + [1705676728.147173][4668:4670] CHIP:TOO: } + + Select the group (G1) that is absent from the above group table + + ./chip-tool scenesmanagement add-scene 0x0002 0x01 1000 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4000", "valueUnsigned16": "0x01"}]}]' 1 1 + + Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x85 (INVALID_COMMAND), the GroupID field set to GI and the SceneID field set to 0x01. on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1706763629.927365][4236:4238] CHIP:DMG: }, + [1706763629.927382][4236:4238] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0000 + [1706763629.927390][4236:4238] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0000 + [1706763629.927407][4236:4238] CHIP:TOO: AddSceneResponse: { + [1706763629.927413][4236:4238] CHIP:TOO: status: 133 + [1706763629.927416][4236:4238] CHIP:TOO: groupID: 2 + [1706763629.927419][4236:4238] CHIP:TOO: sceneID: 1 + [1706763629.927422][4236:4238] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: + "Please execute the add scene command with + extensionfieldsets in accordance with AC1 on DUT and enter + 'y' if the command is successful" + - name: "expectedValue" + value: "y" + - label: "Step 8c: TH sends a GetSceneMembership command to DUT with the GroupID field set to G1." @@ -1051,7 +1276,14 @@ tests: "Step 10a: TH configures AC2 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC2? + ./chip-tool levelcontrol move-to-level-with-on-off 200 0 0 0 1 1 + + DUT is configured with AC2 for application clusters which is implemented, supporting scenes and different from AC1 + + [1705040820.918043][6555:6557] CHIP:DMG: StatusIB = + [1705040820.918056][6555:6557] CHIP:DMG: { + [1705040820.918068][6555:6557] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040820.918080][6555:6557] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -1099,7 +1331,14 @@ tests: "Step 11a: TH configures AC1 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC1? + ./chip-tool levelcontrol move-to-level-with-on-off 100 0 0 0 1 1 + + DUT is configured with AC1 for application clusters which is implemented and supporting scenes + + [1705040301.476123][6423:6425] CHIP:DMG: StatusIB = + [1705040301.476139][6423:6425] CHIP:DMG: { + [1705040301.476152][6423:6425] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040301.476164][6423:6425] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -1153,7 +1392,16 @@ tests: "Step 12a: TH configures AC2 on DUT for all implemented application clusters supporting scenes." verification: | - Is DUT configured with AC2? + THIS COMMAND SHALL VARY DEPENDING ON THE DUT, TESTER NEEDS TO ENSURE THAT AC1 REPRESENTS CLUSTER ATTRIBUTES PRESENT ON DUT + + ./chip-tool levelcontrol move-to-level-with-on-off 200 0 0 0 1 1 + + DUT is configured with AC2 for application clusters which is implemented, supporting scenes and different from AC1 + + [1705040820.918043][6555:6557] CHIP:DMG: StatusIB = + [1705040820.918056][6555:6557] CHIP:DMG: { + [1705040820.918068][6555:6557] CHIP:DMG: status = 0x00 (SUCCESS), + [1705040820.918080][6555:6557] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP @@ -1304,7 +1552,14 @@ tests: clusters supporting scenes." runIf: ContinueTest verification: | - Is DUT configured with AC3? + ./chip-tool levelcontrol move-to-level-with-on-off 1 0 0 0 1 1 + + DUT is configured with AC3 for application clusters which is implemented, supporting scenes and different from AC1, AC2 + + [1705045707.240304][8006:8008] CHIP:DMG: StatusIB = + [1705045707.240308][8006:8008] CHIP:DMG: { + [1705045707.240311][8006:8008] CHIP:DMG: status = 0x00 (SUCCESS), + [1705045707.240314][8006:8008] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" PICS: PICS_SKIP_SAMPLE_APP From 236908d7f1964d09f7d7c3f0e8ba9bb425d2755f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Sep 2024 12:49:11 -0400 Subject: [PATCH 16/42] Rename controller:isSuspended to make it clearer that it's notifying about a state change. (#35577) --- src/darwin/Framework/CHIP/MTRDeviceController.mm | 4 ++-- src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h | 2 +- src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 04fa9a9bec05e9..58ef5b58c8ed32 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -385,8 +385,8 @@ - (void)_notifyDelegatesOfSuspendState { BOOL isSuspended = [self isSuspended]; [self _callDelegatesWithBlock:^(id delegate) { - if ([delegate respondsToSelector:@selector(controller:isSuspended:)]) { - [delegate controller:self isSuspended:isSuspended]; + if ([delegate respondsToSelector:@selector(controller:suspendedChangedTo:)]) { + [delegate controller:self suspendedChangedTo:isSuspended]; } } logString:__PRETTY_FUNCTION__]; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h index 40382c95ade9d9..374b8aec2064aa 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h @@ -112,7 +112,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) * the controller will be in the specified state. */ - (void)controller:(MTRDeviceController *)controller - isSuspended:(BOOL)suspended MTR_NEWLY_AVAILABLE; + suspendedChangedTo:(BOOL)suspended MTR_NEWLY_AVAILABLE; @end typedef NS_ENUM(NSUInteger, MTRPairingStatus) { diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index db0a8ab848576c..b7dad2e542c264 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -93,7 +93,7 @@ - (id)initWithExpectation:(XCTestExpectation *)expectation expectedSuspensionSta } - (void)controller:(MTRDeviceController *)controller - isSuspended:(BOOL)suspended + suspendedChangedTo:(BOOL)suspended { XCTAssertEqual(suspended, self.expectedSuspensionState); [self.expectation fulfill]; From 7467abce81d3e6ff3caa57f7bc180d2725630c55 Mon Sep 17 00:00:00 2001 From: Hasty Granbery Date: Fri, 13 Sep 2024 11:35:29 -0700 Subject: [PATCH 17/42] Update TC_TSTAT_4_2 to work with thermostats that do not have AUTO feature (#35579) * Update TC_TSTAT_4_2 to work with thermostats that do not have AUTO feature * Python formatting for restyled --- src/python_testing/TC_TSTAT_4_2.py | 78 ++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 25 deletions(-) diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index 67a7a16ea5290d..b2916c5914e38a 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -101,6 +101,16 @@ def get_available_scenario(self, presetTypes: list, presetScenarioCounts: map): return availableScenarios[0] return None + def make_preset(self, presetScenario, coolSetpoint, heatSetpoint, presetHandle=NullValue, name=None, builtIn=False): + preset = cluster.Structs.PresetStruct(presetHandle=presetHandle, presetScenario=presetScenario, builtIn=builtIn) + if self.check_pics("TSTAT.S.F00"): + preset.heatingSetpoint = heatSetpoint + if self.check_pics("TSTAT.S.F01"): + preset.coolingSetpoint = coolSetpoint + if name is not None: + preset.name = name + return preset + async def write_presets(self, endpoint, presets, @@ -255,13 +265,29 @@ async def test_TC_TSTAT_4_2(self): presetTypes = [] presetScenarioCounts = {} numberOfPresetsSupported = 0 - minHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinHeatSetpointLimit) - maxHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxHeatSetpointLimit) - minCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinCoolSetpointLimit) - maxCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxCoolSetpointLimit) + minHeatSetpointLimit = 700 + maxHeatSetpointLimit = 3000 + minCoolSetpointLimit = 1600 + maxCoolSetpointLimit = 3200 + + supportsHeat = self.check_pics("TSTAT.S.F00") + supportsCool = self.check_pics("TSTAT.S.F01") + supportsOccupancy = self.check_pics("TSTAT.S.F02") + + occupied = True - asserts.assert_true(minHeatSetpointLimit < maxHeatSetpointLimit, "Heat setpoint range invalid") - asserts.assert_true(minCoolSetpointLimit < maxCoolSetpointLimit, "Cool setpoint range invalid") + if supportsHeat: + minHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinHeatSetpointLimit) + maxHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxHeatSetpointLimit) + asserts.assert_true(minHeatSetpointLimit < maxHeatSetpointLimit, "Heat setpoint range invalid") + + if supportsCool: + minCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinCoolSetpointLimit) + maxCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxCoolSetpointLimit) + asserts.assert_true(minCoolSetpointLimit < maxCoolSetpointLimit, "Cool setpoint range invalid") + + if supportsOccupancy: + occupied = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Occupancy) & 1 heatSetpoint = minHeatSetpointLimit + ((maxHeatSetpointLimit - minHeatSetpointLimit) / 2) coolSetpoint = minCoolSetpointLimit + ((maxCoolSetpointLimit - minCoolSetpointLimit) / 2) @@ -296,8 +322,7 @@ async def test_TC_TSTAT_4_2(self): for preset in test_presets: preset.builtIn = NullValue - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint)) await self.send_atomic_request_begin_command() @@ -334,8 +359,7 @@ async def test_TC_TSTAT_4_2(self): if len(builtInPresets) > 0: builtInPresets[0].builtIn = NullValue - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint)) # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -415,7 +439,16 @@ async def test_TC_TSTAT_4_2(self): "Couldn't run test step 6 since there were no non-built-in presets to activate and delete") # Write the occupied cooling setpoint to a different value - await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedCoolingSetpoint(2300), endpoint_id=endpoint) + if occupied: + if supportsHeat: + await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedHeatingSetpoint(heatSetpoint+1), endpoint_id=endpoint) + elif supportsCool: + await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedCoolingSetpoint(coolSetpoint+1), endpoint_id=endpoint) + else: + if supportsHeat: + await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedHeatingSetpoint(heatSetpoint+1), endpoint_id=endpoint) + elif supportsCool: + await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedCoolingSetpoint(coolSetpoint+1), endpoint_id=endpoint) activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) logger.info(f"Rx'd ActivePresetHandle: {activePresetHandle}") @@ -456,8 +489,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_begin_command() # Write to the presets attribute after adding a preset with builtIn set to True - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True)) + test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, builtIn=True)) status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) @@ -475,8 +507,8 @@ async def test_TC_TSTAT_4_2(self): # Write to the presets attribute after adding a preset with a preset handle that doesn't exist in Presets attribute test_presets = copy.deepcopy(current_presets) - test_presets.append(cluster.Structs.PresetStruct(presetHandle=random.randbytes(16), presetScenario=cluster.Enums.PresetScenarioEnum.kWake, - name="Wake", coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True)) + test_presets.append(self.make_preset(cluster.Enums.PresetScenarioEnum.kWake, coolSetpoint, + heatSetpoint, presetHandle=random.randbytes(16), name="Wake", builtIn=True)) status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.NotFound) @@ -497,8 +529,8 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_begin_command() # Write to the presets attribute after adding a duplicate preset - test_presets.append(cluster.Structs.PresetStruct( - presetHandle=duplicatePreset.presetHandle, presetScenario=availableScenario, coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + test_presets.append(self.make_preset(availableScenario, coolSetpoint, + heatSetpoint, presetHandle=duplicatePreset.presetHandle)) await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) @@ -540,8 +572,7 @@ async def test_TC_TSTAT_4_2(self): presets_without_name_support = list(preset for preset in test_presets if preset.presetScenario in availableScenarios) if len(presets_without_name_support) == 0 and len(availableScenarios) > 0: - new_preset = cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenarios[0], - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True) + new_preset = self.make_preset(availableScenarios[0], coolSetpoint, heatSetpoint, builtIn=True) test_presets.append(new_preset) presets_without_name_support = [new_preset] @@ -570,8 +601,7 @@ async def test_TC_TSTAT_4_2(self): # Write to the presets attribute with a new valid preset added test_presets = copy.deepcopy(current_presets) - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint)) # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -630,8 +660,7 @@ async def test_TC_TSTAT_4_2(self): presetScenario for presetScenario in cluster.Enums.PresetScenarioEnum if presetScenario not in supportedScenarios) if len(unavailableScenarios) > 0: test_presets = current_presets.copy() - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=unavailableScenarios[0], - name="Preset", coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + test_presets.append(self.make_preset(unavailableScenarios[0], coolSetpoint, heatSetpoint, name="Preset")) # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -664,8 +693,7 @@ async def test_TC_TSTAT_4_2(self): presetsAddedForScenario = presetsAddedForScenario + 1 while presetsAddedForScenario < presetType.numberOfPresets: - testPresets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=scenario, - coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + testPresets.append(self.make_preset(scenario, coolSetpoint, heatSetpoint)) presetsAddedForScenario = presetsAddedForScenario + 1 # Send the AtomicRequest begin command From bba766b25e22d8d6500d698ccf36f2aff52b35dd Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 13 Sep 2024 15:24:56 -0400 Subject: [PATCH 18/42] Add ability to control data-model-interface usage for cmake-based platforms (#35559) * Add data-mode-enabled/disabled variants to all CMAKE builds. Platforms changed: - esp32 - mbed - nrfconnect - telink - nxp I tested all these except NXP which I could not compile in TOT due to missing vscode configuration. * add options for data model to qpg builds as this can be used to check for size deltas * Fix unit test * Restyle * Fix nxp typo and strip * Update quoting logic * Update config/telink/chip-module/CMakeLists.txt Co-authored-by: Terence Hampson * more update on the 'I' text * Fix nxp build placement of data model interface * Switch to zephyr KConfig for data model interface setting * Use bool for DM enabling in places * Apply review comment * Fix nxp typo --------- Co-authored-by: Andrei Litvin Co-authored-by: Terence Hampson --- build/chip/esp32/esp32_codegen.cmake | 10 +++++ config/common/cmake/chip_gn_args.cmake | 9 ++++- config/esp32/components/chip/CMakeLists.txt | 8 ++++ config/mbed/CMakeLists.txt | 4 ++ config/nrfconnect/chip-module/CMakeLists.txt | 8 ++++ config/nxp/chip-cmake-freertos/CMakeLists.txt | 7 ++++ config/nxp/chip-module/CMakeLists.txt | 8 ++++ config/telink/chip-module/CMakeLists.txt | 7 ++++ config/zephyr/Kconfig | 7 ++++ config/zephyr/chip-module/CMakeLists.txt | 9 ++++- scripts/build/build/targets.py | 12 ++++++ scripts/build/builders/esp32.py | 8 +++- scripts/build/builders/host.py | 2 +- scripts/build/builders/mbed.py | 9 ++++- scripts/build/builders/nrf.py | 22 ++++++----- scripts/build/builders/nxp.py | 38 ++++++++++++------- scripts/build/builders/qpg.py | 8 +++- scripts/build/builders/telink.py | 17 ++++++--- .../build/testdata/all_targets_linux_x64.txt | 12 +++--- 19 files changed, 164 insertions(+), 41 deletions(-) diff --git a/build/chip/esp32/esp32_codegen.cmake b/build/chip/esp32/esp32_codegen.cmake index d83bdb7ccf12c8..7febb089875172 100644 --- a/build/chip/esp32/esp32_codegen.cmake +++ b/build/chip/esp32/esp32_codegen.cmake @@ -17,6 +17,7 @@ macro(chip_app_component_codegen IDL_NAME) include("${CHIP_ROOT}/build/chip/chip_codegen.cmake") + include("${CHIP_ROOT}/src/app/codegen-data-model-provider/model.cmake") # The IDF build system performs a two-pass expansion to determine # component expansion. The first pass runs in script-mode @@ -71,5 +72,14 @@ macro(chip_app_component_zapgen ZAP_NAME) add_dependencies(${COMPONENT_LIB} app-zapgen) target_include_directories(${COMPONENT_LIB} PUBLIC "${APP_TEMPLATE_GEN_DIR}") target_sources(${COMPONENT_LIB} PRIVATE ${APP_TEMPLATE_GEN_FILES}) + + # When data model interface is used, provide a default code-generation data model as + # part of zapgen. See `chip_data_model.cmake` for similar logic + set(CHIP_DATA_MODEL_INTERFACE "disabled" CACHE STRING "Data model interface option to use: enabled or disabled") + + if ("${CHIP_DATA_MODEL_INTERFACE}" STREQUAL "enabled") + target_sources(${COMPONENT_LIB} PRIVATE ${CODEGEN_DATA_MODEL_SOURCES}) + endif() + endif() endmacro() diff --git a/config/common/cmake/chip_gn_args.cmake b/config/common/cmake/chip_gn_args.cmake index 663e7f49977030..8fde49c3438098 100644 --- a/config/common/cmake/chip_gn_args.cmake +++ b/config/common/cmake/chip_gn_args.cmake @@ -171,7 +171,7 @@ macro(matter_common_gn_args) LIB_PW_RPC DEVICE_INFO_EXAMPLE_PROVIDER PROJECT_CONFIG - + DATA_MODEL_INTERFACE ) set(multiValueArgs PROJECT_CONFIG_INC_DIR @@ -203,6 +203,11 @@ macro(matter_common_gn_args) if (ARG_DEVICE_INFO_EXAMPLE_PROVIDER) matter_add_gn_arg_bool ("chip_build_example_providers" ${ARG_DEVICE_INFO_EXAMPLE_PROVIDER}) endif() # ARG_DEVICE_INFO_EXAMPLE_PROVIDER + + if (ARG_DATA_MODEL_INTERFACE) + matter_add_gn_arg_string("chip_use_data_model_interface" "${ARG_DATA_MODEL_INTERFACE}") + endif() + if (ARG_PROJECT_CONFIG) get_filename_component(PROJECT_CONFIG ${ARG_PROJECT_CONFIG} @@ -220,4 +225,4 @@ endmacro() # Generate the temporary GN arguments file from the settings macro(matter_generate_args_tmp_file) file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/args.tmp" CONTENT ${MATTER_GN_ARGS}) -endmacro() \ No newline at end of file +endmacro() diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 85141d5f962241..161a3ce6e2249c 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -33,6 +33,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake) set(CHIP_REQUIRE_COMPONENTS esp_eth freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash spi_flash) +set(CHIP_DATA_MODEL_INTERFACE "disabled" CACHE STRING "Data model interface option to use: enabled or disabled") + if(NOT "${IDF_TARGET}" STREQUAL "esp32h2") list(APPEND CHIP_REQUIRE_COMPONENTS mdns) endif() @@ -64,6 +66,12 @@ macro(chip_gn_arg_bool arg boolean) endif() endmacro() +if ("${CHIP_DATA_MODEL_INTERFACE}" STREQUAL "enabled") + chip_gn_arg_append("chip_use_data_model_interface" "\"enabled\"") +else() + chip_gn_arg_append("chip_use_data_model_interface" "\"disabled\"") +endif() + # ESP-IDF lets user set software version string by two ways: # 1. Project's CMakeLists.txt file and 2. Config option # It depends on CONFIG_APP_PROJECT_VER_FROM_CONFIG option diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 88567b604e3254..37dad135327e07 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -112,6 +112,9 @@ if (CONFIG_MBED_BSD_SOCKET_TRACE) matter_add_flags(-DMBED_BSD_SOCKET_TRACE=1) endif() +# Option can be set with `-DCHIP_DATA_MODEL_INTERFACE=enabled` or similar on the command line +set(CHIP_DATA_MODEL_INTERFACE "disabled" CACHE STRING "Data model interface option to use: enabled or disabled") + # ============================================================================== # Generate configuration for CHIP GN build system # ============================================================================== @@ -121,6 +124,7 @@ matter_common_gn_args( LIB_TESTS CONFIG_CHIP_BUILD_TESTS LIB_PW_RPC CONFIG_CHIP_PW_RPC PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} + DATA_MODEL_INTERFACE ${CHIP_DATA_MODEL_INTERFACE} ) if (CONFIG_CHIP_PW_RPC) matter_add_gn_arg_import("${GN_ROOT_TARGET}/lib/pw_rpc/pw_rpc.gni") diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index ee169106ffc8f9..98fee746485cc3 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -106,6 +106,13 @@ endif() get_property(CHIP_COMPILER_LAUNCHER GLOBAL PROPERTY RULE_LAUNCH_COMPILE) + +if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) + set(DATA_MODEL_INTERFACE "enabled") +else() + set(DATA_MODEL_INTERFACE "disabled") +endif() + # ============================================================================== # Generate configuration for CHIP GN build system # ============================================================================== @@ -116,6 +123,7 @@ matter_common_gn_args( LIB_TESTS CONFIG_CHIP_BUILD_TESTS PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER + DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE} ) matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) diff --git a/config/nxp/chip-cmake-freertos/CMakeLists.txt b/config/nxp/chip-cmake-freertos/CMakeLists.txt index b639e23ff65034..db078e69df4f64 100644 --- a/config/nxp/chip-cmake-freertos/CMakeLists.txt +++ b/config/nxp/chip-cmake-freertos/CMakeLists.txt @@ -40,6 +40,12 @@ matter_add_gn_arg("chip_with_factory_data" ${CONFIG_CHIP_FACTORY_DATA}) matter_add_gn_arg("chip_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE}) matter_add_gn_arg("chip_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA}) +if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) + set(DATA_MODEL_INTERFACE "enabled") +else() + set(DATA_MODEL_INTERFACE "disabled") +endif() + matter_common_gn_args( DEBUG CONFIG_DEBUG LIB_SHELL CONFIG_CHIP_LIB_SHELL @@ -47,6 +53,7 @@ matter_common_gn_args( PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} PROJECT_CONFIG_INC_DIR ${CONFIG_CHIP_PROJECT_CONFIG_INCLUDE_DIRS} DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER + DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE} ) matter_generate_args_tmp_file() diff --git a/config/nxp/chip-module/CMakeLists.txt b/config/nxp/chip-module/CMakeLists.txt index 32a85a606c71e0..f5cb1bf88a0fce 100644 --- a/config/nxp/chip-module/CMakeLists.txt +++ b/config/nxp/chip-module/CMakeLists.txt @@ -91,6 +91,13 @@ endif() get_property(CHIP_COMPILER_LAUNCHER GLOBAL PROPERTY RULE_LAUNCH_COMPILE) +if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) + set(DATA_MODEL_INTERFACE "enabled") +else() + set(DATA_MODEL_INTERFACE "disabled") +endif() + + # ============================================================================== # Generate configuration for CHIP GN build system # ============================================================================== @@ -101,6 +108,7 @@ matter_common_gn_args( LIB_TESTS CONFIG_CHIP_BUILD_TESTS PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER + DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE} ) matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index 7b58f5c4b6fc05..d4c02aa5d621b8 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -77,6 +77,12 @@ if (CONFIG_CHIP_OPENTHREAD_CONFIG) zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG}) endif() +if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) + set(DATA_MODEL_INTERFACE "enabled") +else() + set(DATA_MODEL_INTERFACE "disabled") +endif() + # ============================================================================== # Generate configuration for CHIP GN build system # ============================================================================== @@ -87,6 +93,7 @@ matter_common_gn_args( LIB_TESTS CONFIG_CHIP_BUILD_TESTS PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER + DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE} ) matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 62efe30c07fda4..2a3a2d5495bf96 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -574,4 +574,11 @@ config CHIP_BLE_ADVERTISING_DURATION If CHIP_BLE_EXT_ADVERTISING is set to false, the maximum duration time is 15 minutes, else the maximum duration time can be extended to 2880 minutes (48h). +config USE_CHIP_DATA_MODEL_INTERFACE + bool "Use a DataModel::Provider interface for data access" + help + This enables a level of indiraction in the CHIP interaction model engine in + accessing underlying data and executing operations such as + wildcard-expansion, read, write and invoke. + endif diff --git a/config/zephyr/chip-module/CMakeLists.txt b/config/zephyr/chip-module/CMakeLists.txt index 8449398b4f480b..fb94465b772bf6 100644 --- a/config/zephyr/chip-module/CMakeLists.txt +++ b/config/zephyr/chip-module/CMakeLists.txt @@ -70,6 +70,12 @@ if(CONFIG_CHIP) zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG}) endif() + if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE) + set(DATA_MODEL_INTERFACE "enabled") + else() + set(DATA_MODEL_INTERFACE "disabled") + endif() + # ============================================================================== # Generate configuration for CHIP GN build system # ============================================================================== @@ -78,6 +84,7 @@ if(CONFIG_CHIP) LIB_SHELL CONFIG_CHIP_LIB_SHELL LIB_TESTS CONFIG_CHIP_BUILD_TESTS PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} + DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE} ) matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) @@ -139,4 +146,4 @@ if(CONFIG_CHIP) GN_DEPENDENCIES kernel ) set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) -endif() # CONFIG_CHIP \ No newline at end of file +endif() # CONFIG_CHIP diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index ca1110088723df..0464c51f7b0e6b 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -232,6 +232,8 @@ def BuildEsp32Target(): target.AppendModifier('rpc', enable_rpcs=True) target.AppendModifier('ipv6only', enable_ipv4=False) target.AppendModifier('tracing', enable_insights_trace=True).OnlyIfRe("light") + target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-disabled') return target @@ -331,6 +333,8 @@ def BuildNrfTarget(): ]) target.AppendModifier('rpc', enable_rpcs=True) + target.AppendModifier('data-model-disabled', use_data_model_interface=False).ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', use_data_model_interface=True).ExceptIfRe('-data-model-disabled') return target @@ -416,6 +420,8 @@ def BuildMbedTarget(): '-(release|debug)') target.AppendModifier('debug', profile=MbedProfile.DEBUG).ExceptIfRe( '-(release|develop)') + target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-disabled') return target @@ -540,6 +546,8 @@ def BuildNxpTarget(): target.AppendModifier(name="wifi", enable_wifi=True).OnlyIfRe('rw61x') target.AppendModifier(name="thread", enable_thread=True).ExceptIfRe('zephyr') target.AppendModifier(name="matter-shell", enable_shell=True).ExceptIfRe('k32w0|k32w1') + target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-disabled') return target @@ -620,6 +628,8 @@ def BuildQorvoTarget(): ]) target.AppendModifier('updateimage', update_image=True) + target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-disabled') return target @@ -781,6 +791,8 @@ def BuildTelinkTarget(): target.AppendModifier('4mb', enable_4mb_flash=True) target.AppendModifier('mars', mars_board_config=True) target.AppendModifier('usb', usb_board_config=True) + target.AppendModifier('data-model-disabled', use_data_model_interface=False).ExceptIfRe('-data-model-enabled') + target.AppendModifier('data-model-enabled', use_data_model_interface=True).ExceptIfRe('-data-model-disabled') return target diff --git a/scripts/build/builders/esp32.py b/scripts/build/builders/esp32.py index 018e20170b194b..a225315fc613c6 100644 --- a/scripts/build/builders/esp32.py +++ b/scripts/build/builders/esp32.py @@ -16,6 +16,7 @@ import os import shlex from enum import Enum, auto +from typing import Optional from .builder import Builder, BuilderOutput @@ -153,7 +154,8 @@ def __init__(self, app: Esp32App = Esp32App.ALL_CLUSTERS, enable_rpcs: bool = False, enable_ipv4: bool = True, - enable_insights_trace: bool = False + enable_insights_trace: bool = False, + data_model_interface: Optional[str] = None, ): super(Esp32Builder, self).__init__(root, runner) self.board = board @@ -161,6 +163,7 @@ def __init__(self, self.enable_rpcs = enable_rpcs self.enable_ipv4 = enable_ipv4 self.enable_insights_trace = enable_insights_trace + self.data_model_interface = data_model_interface if not app.IsCompatible(board): raise Exception( @@ -215,6 +218,9 @@ def generate(self): cmake_flags.append( f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") + if self.data_model_interface: + cmake_flags.append(f'-DCHIP_DATA_MODEL_INTERFACE={self.data_model_interface}') + cmake_args = ['-C', self.ExamplePath, '-B', shlex.quote(self.output_dir)] + cmake_flags diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 12d21fbe8ba62e..61fbd006824a39 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -322,7 +322,7 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_test_event_triggers=None, enable_dnssd_tests: Optional[bool] = None, chip_casting_simplified: Optional[bool] = None, - data_model_interface: Optional[bool] = None, + data_model_interface: Optional[str] = None, chip_data_model_check_die_on_failure: Optional[bool] = None, ): super(HostBuilder, self).__init__( diff --git a/scripts/build/builders/mbed.py b/scripts/build/builders/mbed.py index 6dc47d0aa4aa27..cc4eb83a665621 100644 --- a/scripts/build/builders/mbed.py +++ b/scripts/build/builders/mbed.py @@ -15,6 +15,7 @@ import os import shlex from enum import Enum, auto +from typing import Optional from .builder import Builder, BuilderOutput @@ -101,7 +102,9 @@ def __init__(self, runner, app: MbedApp = MbedApp.LOCK, board: MbedBoard = MbedBoard.CY8CPROTO_062_4343W, - profile: MbedProfile = MbedProfile.RELEASE): + profile: MbedProfile = MbedProfile.RELEASE, + data_model_interface: Optional[str] = None, + ): super(MbedBuilder, self).__init__(root, runner) self.app = app self.board = board @@ -111,6 +114,7 @@ def __init__(self, self.root, 'third_party', 'mbed-os', 'repo') self.mbed_os_posix_socket_path = os.path.join( self.root, 'third_party', 'mbed-os-posix-socket', 'repo') + self.data_model_interface = data_model_interface @property def ExamplePath(self): @@ -131,6 +135,9 @@ def generate(self): flags.append(f"-DMBED_OS_PATH={shlex.quote(self.mbed_os_path)}") flags.append(f"-DMBED_OS_POSIX_SOCKET_PATH={shlex.quote(self.mbed_os_posix_socket_path)}") + if self.data_model_interface is not None: + flags.append(f"-DCHIP_DATA_MODEL_INTERFACE={self.data_model_interface}") + if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") diff --git a/scripts/build/builders/nrf.py b/scripts/build/builders/nrf.py index f9c801da0b5dd1..5fbc417ffe2c13 100644 --- a/scripts/build/builders/nrf.py +++ b/scripts/build/builders/nrf.py @@ -16,6 +16,7 @@ import os import shlex from enum import Enum, auto +from typing import Optional from .builder import Builder, BuilderOutput @@ -139,11 +140,14 @@ def __init__(self, runner, app: NrfApp = NrfApp.LIGHT, board: NrfBoard = NrfBoard.NRF52840DK, - enable_rpcs: bool = False): + enable_rpcs: bool = False, + use_data_model_interface: Optional[bool] = None, + ): super(NrfConnectBuilder, self).__init__(root, runner) self.app = app self.board = board self.enable_rpcs = enable_rpcs + self.use_data_model_interface = use_data_model_interface def generate(self): if not os.path.exists(self.output_dir): @@ -187,18 +191,18 @@ def generate(self): if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") + if self.use_data_model_interface is not None: + value = 'y' if self.use_data_model_interface else 'n' + flags.append(f"-DCONFIG_USE_CHIP_DATA_MODEL_INTERFACE={value}") + build_flags = " -- " + " ".join(flags) if len(flags) > 0 else "" - cmd = ''' -source "$ZEPHYR_BASE/zephyr-env.sh"; -export ZEPHYR_TOOLCHAIN_VARIANT=zephyr;''' + cmd = 'source "$ZEPHYR_BASE/zephyr-env.sh";\nexport ZEPHYR_TOOLCHAIN_VARIANT=zephyr;' + if zephyr_sdk_dir: - cmd += f''' -export ZEPHYR_SDK_INSTALL_DIR={zephyr_sdk_dir};''' + cmd += f'\nexport ZEPHYR_SDK_INSTALL_DIR={zephyr_sdk_dir};' - cmd += ''' -west build --cmake-only -d {outdir} -b {board} --sysbuild {sourcedir}{build_flags} - '''.format( + cmd += '\nwest build --cmake-only -d {outdir} -b {board} --sysbuild {sourcedir}{build_flags}\n'.format( outdir=shlex.quote(self.output_dir), board=self.board.GnArgName(), sourcedir=shlex.quote(os.path.join( diff --git a/scripts/build/builders/nxp.py b/scripts/build/builders/nxp.py index 81dc425169b06e..6a297cf8174d6a 100644 --- a/scripts/build/builders/nxp.py +++ b/scripts/build/builders/nxp.py @@ -16,6 +16,7 @@ import logging import os from enum import Enum, auto +from typing import Optional from .builder import BuilderOutput from .gn import GnBuilder @@ -136,7 +137,9 @@ def __init__(self, enable_wifi: bool = False, disable_ipv4: bool = False, enable_shell: bool = False, - enable_ota: bool = False): + enable_ota: bool = False, + data_model_interface: Optional[str] = None, + ): super(NxpBuilder, self).__init__( root=app.BuildRoot(root, board, os_env), runner=runner) @@ -158,6 +161,7 @@ def __init__(self, self.enable_wifi = enable_wifi self.enable_ota = enable_ota self.enable_shell = enable_shell + self.data_model_interface = data_model_interface def GnBuildArgs(self): args = [] @@ -207,6 +211,9 @@ def GnBuildArgs(self): if self.board == NxpBoard.RW61X: args.append('chip_enable_openthread=true chip_inet_config_enable_ipv4=false') + if self.data_model_interface is not None: + args.append(f'chip_use_data_model_interface="{self.data_model_interface}"') + return args def WestBuildArgs(self): @@ -217,27 +224,30 @@ def WestBuildArgs(self): if self.has_sw_version_2: args.append('-DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2') + if self.data_model_interface: + # NOTE: this is not supporting "check" + enabled = "y" if self.data_model_interface.lower() == "enabled" else "n" + args.append(f"-DCONFIG_USE_CHIP_DATA_MODEL_INTERFACE={enabled}") + build_args = " -- " + " ".join(args) if len(args) > 0 else "" return build_args def generate(self): if self.os_env == NxpOsUsed.ZEPHYR: - if 'ZEPHYR_NXP_SDK_INSTALL_DIR' in os.environ: - cmd = 'export ZEPHYR_SDK_INSTALL_DIR="$ZEPHYR_NXP_SDK_INSTALL_DIR"\n' - else: - raise Exception("ZEPHYR_SDK_INSTALL_DIR need to be set") - if 'ZEPHYR_NXP_BASE' in os.environ: - cmd += 'export ZEPHYR_BASE="$ZEPHYR_NXP_BASE"\n' - else: + if 'ZEPHYR_NXP_SDK_INSTALL_DIR' not in os.environ: + raise Exception("ZEPHYR_NXP_SDK_INSTALL_DIR need to be set") + + if 'ZEPHYR_NXP_BASE' not in os.environ: raise Exception("ZEPHYR_NXP_BASE need to be set") - build_args = self.WestBuildArgs() - cmd += ''' - west build -p --cmake-only -b {board_name} -d {out_folder} {example_folder} {build_args} - '''.format( + + cmd = 'export ZEPHYR_SDK_INSTALL_DIR="$ZEPHYR_NXP_SDK_INSTALL_DIR"' + cmd += '\nexport ZEPHYR_BASE="$ZEPHYR_NXP_BASE"' + + cmd += '\nwest build -p --cmake-only -b {board_name} -d {out_folder} {example_folder}{build_args}'.format( board_name=self.board.Name(self.os_env), out_folder=self.output_dir, example_folder=self.app.BuildRoot(self.code_root, self.board, self.os_env), - build_args=build_args).strip() + build_args=self.WestBuildArgs()) self._Execute(['bash', '-c', cmd], title='Generating ' + self.identifier) else: cmd = '' @@ -269,7 +279,7 @@ def generate(self): extra_args.extend(self.GnBuildArgs() or []) if extra_args: - cmd += ' --args="%s' % ' '.join(extra_args) + '" ' + cmd += " --args='%s" % ' '.join(extra_args) + "' " cmd += self.output_dir diff --git a/scripts/build/builders/qpg.py b/scripts/build/builders/qpg.py index 330f4e3b74977d..93feaee78f6b99 100644 --- a/scripts/build/builders/qpg.py +++ b/scripts/build/builders/qpg.py @@ -14,6 +14,7 @@ import os from enum import Enum, auto +from typing import Optional from .builder import BuilderOutput from .gn import GnBuilder @@ -108,7 +109,9 @@ def __init__(self, board: QpgBoard = QpgBoard.QPG6105, flavour: QpgFlavour = QpgFlavour.EXT_FLASH, enable_rpcs: bool = False, - update_image: bool = False): + update_image: bool = False, + data_model_interface: Optional[str] = None, + ): super(QpgBuilder, self).__init__( root=app.BuildRoot(root), runner=runner) @@ -117,6 +120,7 @@ def __init__(self, self.flavour = flavour self.enable_rpcs = enable_rpcs self.update_image = update_image + self.data_model_interface = data_model_interface def GnBuildArgs(self): args = ['qpg_target_ic=\"%s\" qpg_flavour=\"%s\"' % (self.board.GnArgName(), self.flavour.GnFlavourName())] @@ -124,6 +128,8 @@ def GnBuildArgs(self): args.append('import("//with_pw_rpc.gni")') if self.update_image: args.append('matter_ota_test_image=true') + if self.data_model_interface: + args.append(f'chip_use_data_model_interface="{self.data_model_interface}"') return args def build_outputs(self): diff --git a/scripts/build/builders/telink.py b/scripts/build/builders/telink.py index b9cd709ba6b44c..6ac4c30ca241f5 100644 --- a/scripts/build/builders/telink.py +++ b/scripts/build/builders/telink.py @@ -16,6 +16,7 @@ import os import shlex from enum import Enum, auto +from typing import Optional from .builder import Builder, BuilderOutput @@ -152,7 +153,9 @@ def __init__(self, enable_factory_data: bool = False, enable_4mb_flash: bool = False, mars_board_config: bool = False, - usb_board_config: bool = False): + usb_board_config: bool = False, + use_data_model_interface: Optional[str] = None, + ): super(TelinkBuilder, self).__init__(root, runner) self.app = app self.board = board @@ -164,6 +167,7 @@ def __init__(self, self.enable_4mb_flash = enable_4mb_flash self.mars_board_config = mars_board_config self.usb_board_config = usb_board_config + self.use_data_model_interface = use_data_model_interface def get_cmd_prefixes(self): if not self._runner.dry_run: @@ -211,13 +215,16 @@ def generate(self): if self.options.pregen_dir: flags.append(f"-DCHIP_CODEGEN_PREGEN_DIR={shlex.quote(self.options.pregen_dir)}") + if self.use_data_model_interface is not None: + value = 'y' if self.use_data_model_interface else 'n' + flags.append(f"-DCONFIG_USE_CHIP_DATA_MODEL_INTERFACE={value}") + build_flags = " -- " + " ".join(flags) if len(flags) > 0 else "" cmd = self.get_cmd_prefixes() - cmd += ''' -source "$ZEPHYR_BASE/zephyr-env.sh"; -west build --cmake-only -d {outdir} -b {board} {sourcedir}{build_flags} - '''.format( + cmd += '\nsource "$ZEPHYR_BASE/zephyr-env.sh";' + + cmd += '\nwest build --cmake-only -d {outdir} -b {board} {sourcedir}{build_flags}\n'.format( outdir=shlex.quote(self.output_dir), board=self.board.GnArgName(), sourcedir=shlex.quote(os.path.join(self.root, 'examples', self.app.ExampleName(), 'telink')), diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index b177abfbf7117a..dbbf90508b0245 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -6,21 +6,21 @@ cc32xx-{lock,air-purifier} ti-cc13x4_26x4-{lighting,lock,pump,pump-controller}[-mtd][-ftd] cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw930739m2evb_01,cyw930739m2evb_02}-{light,light-switch,lock,thermostat} efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a,brd2605a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] -esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing] +esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing][-data-model-disabled][-data-model-enabled] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang] linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled][-check-failure-die] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm] -nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell] -mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug] +nxp-{k32w0,k32w1,rw61x,mcxw71}-{zephyr,freertos}-{lighting,contact-sensor,lock-app,all-clusters,laundry-washer,thermostat}[-factory][-low-power][-lit][-fro32k][-smu2][-dac-conversion][-rotating-id][-sw-v2][-ota][-wifi][-thread][-matter-shell][-data-model-disabled][-data-model-enabled] +mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,ota-requestor,shell}[-release][-develop][-debug][-data-model-disabled][-data-model-enabled] mw320-all-clusters-app -nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc] +nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc][-data-model-disabled][-data-model-enabled] nrf-native-posix-64-tests nuttx-x64-light -qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage] +qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage][-data-model-disabled][-data-model-enabled] stm32-stm32wb5mm-dk-light tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui] -telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb] +telink-{tlsr9118bdk40d,tlsr9518adk80d,tlsr9528a,tlsr9528a_retention,tlsr9258a,tlsr9258a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars][-usb][-data-model-disabled][-data-model-enabled] openiotsdk-{shell,lock}[-mbedtls][-psa] From 16e4e9b45fd39a1f98d2dfa32adf01a7dfe17c10 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Sat, 14 Sep 2024 09:26:06 +1200 Subject: [PATCH 19/42] Darwin: Add support for zippered builds (#35567) * Darwin: Add support for zippered builds * Restyled by shellharden * Restyled by shfmt --------- Co-authored-by: Restyled.io --- .../Framework/chip_xcode_build_connector.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/darwin/Framework/chip_xcode_build_connector.sh b/src/darwin/Framework/chip_xcode_build_connector.sh index b4a8195b8e0c52..5947ae7dd36490 100755 --- a/src/darwin/Framework/chip_xcode_build_connector.sh +++ b/src/darwin/Framework/chip_xcode_build_connector.sh @@ -1,7 +1,7 @@ #!/bin/bash -e # -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-2024 Project CHIP Authors # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -67,15 +67,23 @@ for define in "${xcode_defines[@]}"; do done # Forward C/C++ flags (OTHER_C*FLAGS) -declare -a target_cflags=() read -r -a target_cflags_c <<<"$OTHER_CFLAGS" read -r -a target_cflags_cc <<<"$OTHER_CPLUSPLUSFLAGS" # Handle target OS and arch declare target_arch= declare target_cpu= -declare target_cflags= +declare -a target_cflags=() declare current_arch="$(uname -m)" +declare deployment_target="$LLVM_TARGET_TRIPLE_OS_VERSION$LLVM_TARGET_TRIPLE_SUFFIX" +declare deployment_variant= +if [[ "$IS_ZIPPERED" == YES ]]; then + if [[ "$CLANG_TARGET_TRIPLE_VARIANTS" != *-apple-* ]]; then + echo "Unable to determine target variant for zippered build" >&2 + exit 1 + fi + deployment_variant="${CLANG_TARGET_TRIPLE_VARIANTS/*-apple-/}" +fi read -r -a archs <<<"$ARCHS" for arch in "${archs[@]}"; do @@ -86,7 +94,8 @@ for arch in "${archs[@]}"; do *) target_cpu="$arch" ;; esac fi - target_cflags+=(-arch "$arch") + [[ "${#archs[@]}" -gt 1 ]] && target_cflags+=(-arch "$arch") + [[ -n "$deployment_variant" ]] && target_cflags+=(-target-variant "$arch-apple-$deployment_variant") done # Translate other options @@ -108,7 +117,7 @@ declare -a args=( 'enable_fuzz_test_targets=false' "target_cpu=\"$target_cpu\"" "mac_target_arch=\"$target_arch\"" - "mac_deployment_target=\"$LLVM_TARGET_TRIPLE_OS_VERSION$LLVM_TARGET_TRIPLE_SUFFIX\"" + "mac_deployment_target=\"$deployment_target\"" "target_defines=$(format_gn_list "${target_defines[@]}")" "target_cflags=$(format_gn_list "${target_cflags[@]}")" "target_cflags_c=$(format_gn_list "${target_cflags_c[@]}")" From f78dad40891af0cc7639bdb2dd102e4dff07d401 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 13 Sep 2024 18:30:53 -0400 Subject: [PATCH 20/42] Add a wildcard attribute read API on MTRDevice. (#35562) * Add a wildcard attribute read API on MTRDevice. * Adding new XPC protocol * Restyled by whitespace * Restyled by clang-format * Add unit test for NSCoding bits. * Fix up XPC protocol bits. --------- Co-authored-by: Justin Wood Co-authored-by: Restyled.io --- src/darwin/Framework/CHIP/MTRBaseDevice.h | 4 +- src/darwin/Framework/CHIP/MTRBaseDevice.mm | 101 ++++++++++++++ src/darwin/Framework/CHIP/MTRDevice.h | 14 ++ src/darwin/Framework/CHIP/MTRDevice.mm | 11 ++ .../Framework/CHIP/MTRDeviceController_XPC.mm | 27 +++- .../Framework/CHIP/MTRDevice_Concrete.mm | 129 ++++++++++++++++-- src/darwin/Framework/CHIP/MTRDevice_XPC.mm | 12 +- .../CHIP/XPC Protocol/MTRXPCServerProtocol.h | 2 + .../Framework/CHIPTests/MTRDeviceTests.m | 109 +++++++++++---- 9 files changed, 362 insertions(+), 47 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.h b/src/darwin/Framework/CHIP/MTRBaseDevice.h index d3a1b0833f11fd..71f6a9cec43962 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.h +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.h @@ -166,7 +166,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) { */ NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) -@interface MTRAttributeRequestPath : NSObject +@interface MTRAttributeRequestPath : NSObject @property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) @@ -185,7 +185,7 @@ MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) */ NS_SWIFT_SENDABLE MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) -@interface MTREventRequestPath : NSObject +@interface MTREventRequestPath : NSObject @property (nonatomic, readonly, copy, nullable) NSNumber * endpoint MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * cluster MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); @property (nonatomic, readonly, copy, nullable) NSNumber * event MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); diff --git a/src/darwin/Framework/CHIP/MTRBaseDevice.mm b/src/darwin/Framework/CHIP/MTRBaseDevice.mm index 7f03a9690b8e61..8a1feefea20607 100644 --- a/src/darwin/Framework/CHIP/MTRBaseDevice.mm +++ b/src/darwin/Framework/CHIP/MTRBaseDevice.mm @@ -2333,6 +2333,57 @@ - (void)convertToAttributePathParams:(chip::app::AttributePathParams &)params params.SetWildcardAttributeId(); } } + +static NSString * const sEndpointIDKey = @"endpointIDKey"; +static NSString * const sClusterIDKey = @"clusterIDKey"; +static NSString * const sAttributeIDKey = @"attributeIDKey"; + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (nullable instancetype)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _endpoint = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEndpointIDKey]; + if (_endpoint && ![_endpoint isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRAttributeRequestPath decoded %@ for endpoint, not NSNumber.", _attribute); + return nil; + } + + _cluster = [decoder decodeObjectOfClass:[NSNumber class] forKey:sClusterIDKey]; + if (_cluster && ![_cluster isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRAttributeRequestPath decoded %@ for cluster, not NSNumber.", _attribute); + return nil; + } + + _attribute = [decoder decodeObjectOfClass:[NSNumber class] forKey:sAttributeIDKey]; + if (_attribute && ![_attribute isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTRAttributeRequestPath decoded %@ for attribute, not NSNumber.", _attribute); + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder +{ + if (_endpoint) { + [coder encodeObject:_endpoint forKey:sEndpointIDKey]; + } + if (_cluster) { + [coder encodeObject:_cluster forKey:sClusterIDKey]; + } + if (_attribute) { + [coder encodeObject:_attribute forKey:sAttributeIDKey]; + } +} + @end @implementation MTREventRequestPath @@ -2406,6 +2457,56 @@ - (void)convertToEventPathParams:(chip::app::EventPathParams &)params params.SetWildcardEventId(); } } +static NSString * const sEventEndpointIDKey = @"endpointIDKey"; +static NSString * const sEventClusterIDKey = @"clusterIDKey"; +static NSString * const sEventAttributeIDKey = @"attributeIDKey"; + ++ (BOOL)supportsSecureCoding +{ + return YES; +} + +- (nullable instancetype)initWithCoder:(NSCoder *)decoder +{ + self = [super init]; + if (self == nil) { + return nil; + } + + _endpoint = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventEndpointIDKey]; + if (_endpoint && ![_endpoint isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTREventRequestPath decoded %@ for endpoint, not NSNumber.", _endpoint); + return nil; + } + + _cluster = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventClusterIDKey]; + if (_cluster && ![_cluster isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTREventRequestPath decoded %@ for cluster, not NSNumber.", _cluster); + return nil; + } + + _event = [decoder decodeObjectOfClass:[NSNumber class] forKey:sEventAttributeIDKey]; + if (_event && ![_event isKindOfClass:[NSNumber class]]) { + MTR_LOG_ERROR("MTREventRequestPath decoded %@ for event, not NSNumber.", _event); + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder +{ + if (_endpoint) { + [coder encodeObject:_endpoint forKey:sEventEndpointIDKey]; + } + if (_cluster) { + [coder encodeObject:_cluster forKey:sEventClusterIDKey]; + } + if (_event) { + [coder encodeObject:_event forKey:sEventAttributeIDKey]; + } +} + @end @implementation MTRClusterPath diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 2858ae56924af9..5a8dcb8de08355 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -186,6 +186,20 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) expectedValueInterval:(NSNumber *)expectedValueInterval timedWriteTimeout:(NSNumber * _Nullable)timeout; +/** + * Read the attributes identified by the provided attribute paths. The paths + * can include wildcards. + * + * Paths that do not correspond to any existing attributes, or that the + * MTRDevice does not have attribute values for, will not be present in the + * return value from this function. + * + * @return an array of response-value dictionaries as described in the + * documentation for MTRDeviceResponseHandler. Each one will have an + * MTRAttributePathKey and an MTRDataKey. + */ +- (NSArray *> *)readAttributePaths:(NSArray *)attributePaths MTR_NEWLY_AVAILABLE; + /** * Invoke a command with a designated command path * diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index cb0d402dd5dc44..46fc8faa40ee1d 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -1272,6 +1272,17 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID #undef MTRDeviceErrorStr } +- (NSArray *> *)readAttributePaths:(NSArray *)attributePaths +{ +#define MTRDeviceErrorStr "MTRDevice readAttributePaths: must be handled by subclasses" + MTR_LOG_ERROR(MTRDeviceErrorStr); +#ifdef DEBUG + NSAssert(NO, @MTRDeviceErrorStr); +#endif // DEBUG +#undef MTRDeviceErrorStr + return [NSArray array]; +} + - (void)invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm index 29860fd41f1039..4cf30e1a34dd80 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm @@ -66,7 +66,7 @@ - (NSXPCInterface *)_interfaceForServerProtocol NSMutableSet * allowedClasses = [MTRDeviceController_XPC _allowedClasses]; [allowedClasses addObjectsFromArray:@[ [MTRCommandPath class], - [MTRAttributePath class] + [MTRAttributePath class], ]]; [interface setClasses:allowedClasses @@ -74,6 +74,27 @@ - (NSXPCInterface *)_interfaceForServerProtocol argumentIndex:0 ofReply:YES]; + // readAttributePaths: gets handed an array of MTRAttributeRequestPath. + allowedClasses = [MTRDeviceController_XPC _allowedClasses]; + [allowedClasses addObjectsFromArray:@[ + [MTRAttributeRequestPath class], + ]]; + [interface setClasses:allowedClasses + forSelector:@selector(deviceController:nodeID:readAttributePaths:withReply:) + argumentIndex:2 + ofReply:NO]; + + // readAttributePaths: returns response-value dictionaries that have + // attribute paths and values. + allowedClasses = [MTRDeviceController_XPC _allowedClasses]; + [allowedClasses addObjectsFromArray:@[ + [MTRAttributePath class], + ]]; + [interface setClasses:allowedClasses + forSelector:@selector(deviceController:nodeID:readAttributePaths:withReply:) + argumentIndex:0 + ofReply:YES]; + return interface; } @@ -82,7 +103,7 @@ - (NSXPCInterface *)_interfaceForClientProtocol NSXPCInterface * interface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCClientProtocol)]; NSMutableSet * allowedClasses = [MTRDeviceController_XPC _allowedClasses]; [allowedClasses addObjectsFromArray:@[ - [MTRAttributePath class] + [MTRAttributePath class], ]]; [interface setClasses:allowedClasses @@ -92,7 +113,7 @@ - (NSXPCInterface *)_interfaceForClientProtocol allowedClasses = [MTRDeviceController_XPC _allowedClasses]; [allowedClasses addObjectsFromArray:@[ - [MTREventPath class] + [MTREventPath class], ]]; [interface setClasses:allowedClasses diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 28c198bd941861..62f6a5f1769208 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -2963,6 +2963,79 @@ - (void)writeAttributeWithEndpointID:(NSNumber *)endpointID [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"write %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, attributeID.unsignedLongLongValue]; } +- (NSArray *> *)readAttributePaths:(NSArray *)attributePaths +{ + // Determine the set of what the spec calls "existent paths" that correspond + // to the request paths. Building the whole set in-memory is OK, because + // we're going to need all those paths for our return value anyway. + NSMutableSet * existentPaths = [[NSMutableSet alloc] init]; + { + std::lock_guard lock(_lock); + for (MTRAttributeRequestPath * path in attributePaths) { + [self _addExistentPathsFor:path to:existentPaths]; + } + } + + NSMutableArray *> * result = [NSMutableArray arrayWithCapacity:existentPaths.count]; + for (MTRAttributePath * path in existentPaths) { + auto * value = [self readAttributeWithEndpointID:path.endpoint clusterID:path.cluster attributeID:path.attribute params:nil]; + if (!value) { + continue; + } + [result addObject:@{ + MTRAttributePathKey : path, + MTRDataKey : value, + }]; + } + + return result; +} + +- (void)_addExistentPathsFor:(MTRAttributeRequestPath *)path to:(NSMutableSet *)set +{ + os_unfair_lock_assert_owner(&_lock); + + if (path.endpoint != nil) { + [self _addExistentPathsForEndpoint:path.endpoint path:path to:set]; + return; + } + + NSArray * endpointList = [self _endpointList]; + for (NSNumber * endpoint in endpointList) { + [self _addExistentPathsForEndpoint:endpoint path:path to:set]; + } +} + +- (void)_addExistentPathsForEndpoint:(NSNumber *)endpoint path:(MTRAttributeRequestPath *)path to:(NSMutableSet *)set +{ + os_unfair_lock_assert_owner(&_lock); + + if (path.cluster != nil) { + [self _addExistentPathsForEndpoint:endpoint cluster:path.cluster attribute:path.attribute to:set]; + return; + } + + auto * clusterList = [self _serverListForEndpointID:endpoint]; + for (NSNumber * cluster in clusterList) { + [self _addExistentPathsForEndpoint:endpoint cluster:cluster attribute:path.attribute to:set]; + } +} + +- (void)_addExistentPathsForEndpoint:(NSNumber *)endpoint cluster:(NSNumber *)cluster attribute:(NSNumber * _Nullable)attribute to:(NSMutableSet *)set +{ + os_unfair_lock_assert_owner(&_lock); + + if (attribute != nil) { + [set addObject:[MTRAttributePath attributePathWithEndpointID:endpoint clusterID:cluster attributeID:attribute]]; + return; + } + + auto * attributeList = [self _attributeListForEndpointID:endpoint clusterID:cluster]; + for (NSNumber * existentAttribute in attributeList) { + [set addObject:[MTRAttributePath attributePathWithEndpointID:endpoint clusterID:cluster attributeID:existentAttribute]]; + } +} + - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID @@ -3968,19 +4041,55 @@ - (void)_updateAttributeDependentDescriptionData { os_unfair_lock_assert_owner(&_lock); - auto * partsListPath = [MTRAttributePath attributePathWithEndpointID:@(kRootEndpointId) - clusterID:@(MTRClusterIDTypeDescriptorID) - attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID)]; - auto * partsList = [self _cachedAttributeValueForPath:partsListPath]; - NSMutableArray * endpointsOnDevice = [self arrayOfNumbersFromAttributeValue:partsList]; - if (!endpointsOnDevice) { - endpointsOnDevice = [[NSMutableArray alloc] init]; - } - // Add Root node! - [endpointsOnDevice addObject:@(0)]; + auto * partsList = [self _cachedListOfNumbersValueForEndpointID:@(kRootEndpointId) + clusterID:@(MTRClusterIDTypeDescriptorID) + attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributePartsListID)]; + NSMutableArray * endpointsOnDevice = [partsList mutableCopy]; + // Add Root Node endpoint. + [endpointsOnDevice addObject:@(kRootEndpointId)]; return endpointsOnDevice; } +/** + * Returns the cached value of the relevant attribute as a list of numbers. + * Returns an empty list if the value does not exist or can't be converted to a + * list of numbers. + */ +- (NSArray *)_cachedListOfNumbersValueForEndpointID:(NSNumber *)endpointID + clusterID:(NSNumber *)clusterID + attributeID:(NSNumber *)attributeID +{ + os_unfair_lock_assert_owner(&_lock); + + auto * path = [MTRAttributePath attributePathWithEndpointID:endpointID + clusterID:clusterID + attributeID:attributeID]; + auto * value = [self _cachedAttributeValueForPath:path]; + NSArray * arrayValue = [self arrayOfNumbersFromAttributeValue:value]; + if (arrayValue) { + return arrayValue; + } + return [NSArray array]; +} + +- (NSArray *)_serverListForEndpointID:(NSNumber *)endpointID +{ + os_unfair_lock_assert_owner(&_lock); + + return [self _cachedListOfNumbersValueForEndpointID:endpointID + clusterID:@(MTRClusterIDTypeDescriptorID) + attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeServerListID)]; +} + +- (NSArray *)_attributeListForEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID +{ + os_unfair_lock_assert_owner(&_lock); + + return [self _cachedListOfNumbersValueForEndpointID:endpointID + clusterID:clusterID + attributeID:@(MTRAttributeIDTypeGlobalAttributeAttributeListID)]; +} + - (NSNumber * _Nullable)_networkFeatures { NSNumber * _Nullable result = nil; diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index 18764080cbab32..a8d9a48e9cbb35 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -203,13 +203,13 @@ - (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)di MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(estimatedStartTime, NSDate * _Nullable, nil, getEstimatedStartTimeWithReply) MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(estimatedSubscriptionLatency, NSNumber * _Nullable, nil, getEstimatedSubscriptionLatencyWithReply) -typedef NSDictionary * _Nullable readAttributeResponseType; +typedef NSDictionary * _Nullable ReadAttributeResponseType; MTR_DEVICE_COMPLEX_REMOTE_XPC_GETTER(readAttributeWithEndpointID : (NSNumber *) endpointID clusterID : (NSNumber *) clusterID attributeID : (NSNumber *) attributeID params : (MTRReadParams * _Nullable) params, - readAttributeResponseType, + ReadAttributeResponseType, nil, readAttributeWithEndpointID : endpointID clusterID @@ -231,6 +231,14 @@ - (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)di : expectedValueInterval timedWriteTimeout : timeout) +typedef NSArray *> * ReadAttributePathsResponseType; +MTR_DEVICE_COMPLEX_REMOTE_XPC_GETTER(readAttributePaths + : (NSArray *) attributePaths, + ReadAttributePathsResponseType, + [NSArray array], // Default return value + readAttributePaths + : attributePaths withReply) + - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h index eaaa4b655e18e9..bd7d0e6df0e99c 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h @@ -29,6 +29,8 @@ MTR_NEWLY_AVAILABLE - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID readAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID params:(MTRReadParams * _Nullable)params withReply:(void (^)(NSDictionary * _Nullable))reply; - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID writeAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID value:(id)value expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedWriteTimeout:(NSNumber * _Nullable)timeout; +- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID readAttributePaths:(NSArray *)attributePaths withReply:(void (^)(NSArray *> *))reply; + - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID commandFields:(id)commandFields expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout serverSideProcessingTimeout:(NSNumber * _Nullable)serverSideProcessingTimeout completion:(MTRDeviceResponseHandler)completion; diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index 615ff63996a27e..459eec5919ceab 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -1451,8 +1451,23 @@ - (void)test017_TestMTRDeviceBasics [subscriptionExpectation fulfill]; }; + NSMutableSet * endpoints = [[NSMutableSet alloc] init]; + NSMutableSet * clusters = [[NSMutableSet alloc] init]; + NSMutableSet * rootBasicInformationAttributes = [[NSMutableSet alloc] init]; __block unsigned attributeReportsReceived = 0; delegate.onAttributeDataReceived = ^(NSArray *> * data) { + for (NSDictionary * dataItem in data) { + MTRAttributePath * path = dataItem[MTRAttributePathKey]; + XCTAssertNotNil(path); + if (dataItem[MTRDataKey]) { + [endpoints addObject:path.endpoint]; + [clusters addObject:[MTRClusterPath clusterPathWithEndpointID:path.endpoint clusterID:path.cluster]]; + if (path.endpoint.unsignedLongValue == 0 && path.cluster.unsignedLongValue == MTRClusterIDTypeBasicInformationID) { + [rootBasicInformationAttributes addObject:path.attribute]; + } + } + } + attributeReportsReceived += data.count; }; @@ -1539,6 +1554,39 @@ - (void)test017_TestMTRDeviceBasics XCTAssertNotEqual(attributeReportsReceived, 0); XCTAssertNotEqual(eventReportsReceived, 0); + // Test readAttributePaths. First, try DeviceTypeList across all endpoints. + __auto_type * deviceTypeListPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:@(MTRClusterIDTypeDescriptorID) attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID)]; + __auto_type * deviceTypes = [device readAttributePaths:@[ deviceTypeListPath ]]; + XCTAssertEqual(deviceTypes.count, endpoints.count); + + // Now try ClusterRevision across all clusters. + __auto_type * clusterRevisionsPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:nil attributeID:@(MTRAttributeIDTypeGlobalAttributeClusterRevisionID)]; + __auto_type * clusterRevisions = [device readAttributePaths:@[ clusterRevisionsPath ]]; + XCTAssertEqual(clusterRevisions.count, clusters.count); + + // Now try BasicInformation in a few different ways: + __auto_type * basicInformationAllAttributesPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:nil]; + __auto_type * basicInformationAllAttributes = [device readAttributePaths:@[ basicInformationAllAttributesPath ]]; + + __auto_type * basicInformationAllRootAttributesPath = [MTRAttributeRequestPath requestPathWithEndpointID:@(0) clusterID:@(MTRClusterIDTypeBasicInformationID) attributeID:nil]; + __auto_type * basicInformationAllRootAttributes = [device readAttributePaths:@[ basicInformationAllRootAttributesPath ]]; + // Should have gotten the same things, because Basic Information only exists + // on the root endpoint. + XCTAssertEqualObjects([NSSet setWithArray:basicInformationAllAttributes], [NSSet setWithArray:basicInformationAllRootAttributes]); + XCTAssertEqual(basicInformationAllAttributes.count, rootBasicInformationAttributes.count); + + // Now try multiple paths. Should just get the union of all the things for + // each path. + __auto_type * variousThings = [device readAttributePaths:@[ deviceTypeListPath, basicInformationAllRootAttributesPath ]]; + XCTAssertEqualObjects([NSSet setWithArray:variousThings], + [[NSSet setWithArray:deviceTypes] setByAddingObjectsFromSet:[NSSet setWithArray:basicInformationAllRootAttributes]]); + + // And similar if the paths expand to overlapping sets of existent paths + // (e.g. because Basic Information has a ClusterRevision). + variousThings = [device readAttributePaths:@[ clusterRevisionsPath, basicInformationAllRootAttributesPath ]]; + XCTAssertEqualObjects([NSSet setWithArray:variousThings], + [[NSSet setWithArray:clusterRevisions] setByAddingObjectsFromSet:[NSSet setWithArray:basicInformationAllRootAttributes]]); + // Before resubscribe, first test write failure and expected value effects NSNumber * testEndpointID = @(1); NSNumber * testClusterID = @(8); @@ -3117,48 +3165,49 @@ - (void)test031_MTRDeviceAttributeCacheLocalTestStorage XCTAssertTrue(storedAttributeCountDifferenceFromMTRDeviceReport > 300); } -- (void)test032_MTRPathClassesEncoding +- (void)doEncodeDecodeRoundTrip:(id)encodable { + // We know all our encodables are in fact NSObject. + NSObject * obj = (NSObject *) encodable; + NSError * encodeError; - NSData * encodedData; - NSError * decodeError; - id decodedValue; + NSData * encodedData = [NSKeyedArchiver archivedDataWithRootObject:encodable requiringSecureCoding:YES error:&encodeError]; + XCTAssertNil(encodeError, @"Failed to encode %@", NSStringFromClass(obj.class)); - // Test attribute path encode / decode - MTRAttributePath * originalAttributePath = [MTRAttributePath attributePathWithEndpointID:@(101) clusterID:@(102) attributeID:@(103)]; - encodedData = [NSKeyedArchiver archivedDataWithRootObject:originalAttributePath requiringSecureCoding:YES error:&encodeError]; - XCTAssertNil(encodeError); + NSError * decodeError; + id decodedValue = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObject:obj.class] fromData:encodedData error:&decodeError]; + XCTAssertNil(decodeError, @"Failed to decode %@", NSStringFromClass([obj class])); + XCTAssertTrue([decodedValue isKindOfClass:obj.class], @"Expected %@ but got %@", NSStringFromClass(obj.class), NSStringFromClass([decodedValue class])); - decodedValue = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObject:[MTRAttributePath class]] fromData:encodedData error:&decodeError]; - XCTAssertNil(decodeError); - XCTAssertTrue([decodedValue isKindOfClass:[MTRAttributePath class]]); + XCTAssertEqualObjects(obj, decodedValue, @"Decoding for %@ did not round-trip correctly", NSStringFromClass([obj class])); +} - MTRAttributePath * decodedAttributePath = decodedValue; - XCTAssertEqualObjects(originalAttributePath, decodedAttributePath); +- (void)test032_MTRPathClassesEncoding +{ + // Test attribute path encode / decode + MTRAttributePath * attributePath = [MTRAttributePath attributePathWithEndpointID:@(101) clusterID:@(102) attributeID:@(103)]; + [self doEncodeDecodeRoundTrip:attributePath]; // Test event path encode / decode - MTREventPath * originalEventPath = [MTREventPath eventPathWithEndpointID:@(201) clusterID:@(202) eventID:@(203)]; - encodedData = [NSKeyedArchiver archivedDataWithRootObject:originalEventPath requiringSecureCoding:YES error:&encodeError]; - XCTAssertNil(encodeError); + MTREventPath * eventPath = [MTREventPath eventPathWithEndpointID:@(201) clusterID:@(202) eventID:@(203)]; + [self doEncodeDecodeRoundTrip:eventPath]; - decodedValue = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObject:[MTREventPath class]] fromData:encodedData error:&decodeError]; - XCTAssertNil(decodeError); - XCTAssertTrue([decodedValue isKindOfClass:[MTREventPath class]]); + // Test command path encode / decode + MTRCommandPath * commandPath = [MTRCommandPath commandPathWithEndpointID:@(301) clusterID:@(302) commandID:@(303)]; + [self doEncodeDecodeRoundTrip:commandPath]; - MTREventPath * decodedEventPath = decodedValue; - XCTAssertEqualObjects(originalEventPath, decodedEventPath); + // Test attribute request path encode/decode + MTRAttributeRequestPath * attributeRequestPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:nil attributeID:nil]; + [self doEncodeDecodeRoundTrip:attributeRequestPath]; - // Test command path encode / decode - MTRCommandPath * originalCommandPath = [MTRCommandPath commandPathWithEndpointID:@(301) clusterID:@(302) commandID:@(303)]; - encodedData = [NSKeyedArchiver archivedDataWithRootObject:originalCommandPath requiringSecureCoding:YES error:&encodeError]; - XCTAssertNil(encodeError); + attributeRequestPath = [MTRAttributeRequestPath requestPathWithEndpointID:@(101) clusterID:@(102) attributeID:@(103)]; + [self doEncodeDecodeRoundTrip:attributeRequestPath]; - decodedValue = [NSKeyedUnarchiver unarchivedObjectOfClasses:[NSSet setWithObject:[MTRCommandPath class]] fromData:encodedData error:&decodeError]; - XCTAssertNil(decodeError); - XCTAssertTrue([decodedValue isKindOfClass:[MTRCommandPath class]]); + attributeRequestPath = [MTRAttributeRequestPath requestPathWithEndpointID:nil clusterID:@(105) attributeID:@(106)]; + [self doEncodeDecodeRoundTrip:attributeRequestPath]; - MTRCommandPath * decodedCommandPath = decodedValue; - XCTAssertEqualObjects(originalCommandPath, decodedCommandPath); + attributeRequestPath = [MTRAttributeRequestPath requestPathWithEndpointID:@(107) clusterID:nil attributeID:@(109)]; + [self doEncodeDecodeRoundTrip:attributeRequestPath]; } // Helper API to test if changes in an attribute with a path specified by endpointId, clusterId and attributeId trigger From a068855d27b42b2c17d38b3a8a9d30d672163aee Mon Sep 17 00:00:00 2001 From: Grant Erickson Date: Fri, 13 Sep 2024 15:48:49 -0700 Subject: [PATCH 21/42] Add `--zap ZAP` to `run_zaptool.sh` to specify an arbitrary location to `zap` (#35549). (#35582) * scripts/tools/zap/run_zaptool.sh * Display the value of 'ZAP_CMD' to standard output. * Add support for the `--zap` command line option to specify the `zap` executable to run. * Added usage documentation about `ZAP_DEVELOPMENT_PATH` and `ZAP_INSTALL_PATH`. * docs/code_generation.md: Added documentation about the `--zap ZAP` option to `run_zaptool.sh`. --- docs/code_generation.md | 2 +- scripts/tools/zap/run_zaptool.sh | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/docs/code_generation.md b/docs/code_generation.md index e12bf40f100cff..bf5b6f3036963a 100644 --- a/docs/code_generation.md +++ b/docs/code_generation.md @@ -66,7 +66,7 @@ Since this is tedious to type, the SDK provides a `scripts/tools/zap/run_zaptool.sh` script to automate this: ```bash -# Ensure zap is in $PATH or set $ZAP_INSTALL_PATH or $ZAP_DEVELOPMENT_PATH +# Ensure `zap` is in $PATH, specify the `--zap ZAP` option to `run_zaptool.sh` to specify the path to `zap`, set $ZAP_INSTALL_PATH, or set $ZAP_DEVELOPMENT_PATH ./scripts/tools/zap/run_zaptool.sh examples/lighting-app/lighting-common/lighting-app.zap ``` diff --git a/scripts/tools/zap/run_zaptool.sh b/scripts/tools/zap/run_zaptool.sh index 4caf9d5610076f..52efc26abeaaee 100755 --- a/scripts/tools/zap/run_zaptool.sh +++ b/scripts/tools/zap/run_zaptool.sh @@ -16,6 +16,9 @@ # limitations under the License. # +readonly ZAP_CMD_DEFAULT="zap" + +ZAP_CMD="$ZAP_CMD_DEFAULT" ZAP_FILE="" function _get_fullpath() { @@ -39,6 +42,22 @@ function _print_usage() { echo " General Options:" echo "" echo " -h, --help Display this help, then exit." + echo " --zap ZAP Use the zap program ZAP as the zap executable " + echo " to run (default: $ZAP_CMD_DEFAULT)." + echo "" + echo " Some influential environment variables:" + echo "" + echo " ZAP_DEVELOPMENT_PATH The path to a zap development environment. This " + echo " is likely a zap checkout, used for local " + echo " development (current: \"${ZAP_DEVELOPMENT_PATH:-}\")." + echo "" + echo " If set, this overrides both the '--zap' option " + echo " and the 'ZAP_INTALL_PATH' environment variable." + echo " ZAP_INSTALL_PATH The path where the 'zap' executable exists. " + echo " This may be used if 'zap' is NOT in the current " + echo " PATH (current: \"${ZAP_INSTALL_PATH:-}\")." + echo "" + echo " If set, this overrides the '--zap' option." echo "" fi @@ -59,6 +78,11 @@ while [ "${#}" -gt 0 ]; do _print_usage 0 ;; + --zap) + ZAP_CMD="${2}" + shift 2 + ;; + -*) echo "ERROR: Unknown or invalid option: '${1}'" >&2 _print_usage 1 @@ -101,13 +125,14 @@ elif [ -n "$ZAP_INSTALL_PATH" ]; then fi WORKING_DIR="$CHIP_ROOT" else - ZAP_CMD="zap" + [ -z "$ZAP_CMD" ] && ZAP_CMD="$ZAP_CMD_DEFAULT" WORKING_DIR="$CHIP_ROOT" fi ( cd "$WORKING_DIR" + echo "CMD: $ZAP_CMD" echo "ARGS: $ZAP_ARGS" if [[ "${ZAP_ARGS[*]}" == *"/all-clusters-app.zap"* ]]; then From ba9faf2b1e321f009f8bf27f5800627c9e4826ea Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Mon, 16 Sep 2024 08:11:37 +0200 Subject: [PATCH 22/42] Fix max timeout for open commissioning window (#35507) Commissioning window can be opened using timeout exceeding the maximum value of 900 s defined by the spec. This can happen if selected transport is IP, but the device uses BLE extended announcement feature. Added checking if device is commissioned to be able to determine what max timeout should be used for the particular scenario. Renamed CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING to the CHIP_DEVICE_CONFIG_EXT_ADVERTISING, as config name sounds misleading and it seems it relates only to BLE. Fixes: #35505 --- src/app/server/CommissioningWindowManager.cpp | 14 ++++++++++++++ src/app/server/CommissioningWindowManager.h | 11 +---------- src/include/platform/CHIPDeviceConfig.h | 14 +++++++------- src/platform/ESP32/CHIPDevicePlatformConfig.h | 4 ++-- src/platform/ESP32/nimble/BLEManagerImpl.cpp | 8 ++++---- src/platform/Linux/BLEManagerImpl.cpp | 8 ++++---- src/platform/Linux/bluez/BluezAdvertisement.cpp | 2 +- src/platform/NuttX/BLEManagerImpl.cpp | 8 ++++---- src/platform/Zephyr/BLEManagerImpl.cpp | 8 ++++---- src/platform/Zephyr/CHIPDevicePlatformConfig.h | 2 +- src/platform/nrfconnect/CHIPDevicePlatformConfig.h | 2 +- src/platform/silabs/CHIPDevicePlatformConfig.h | 2 +- src/platform/silabs/efr32/BLEManagerImpl.cpp | 8 ++++---- 13 files changed, 48 insertions(+), 43 deletions(-) diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 01bff4bf07db46..110a729d8f1b87 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -302,6 +302,20 @@ CHIP_ERROR CommissioningWindowManager::AdvertiseAndListenForPASE() return CHIP_NO_ERROR; } +System::Clock::Seconds32 CommissioningWindowManager::MaxCommissioningTimeout() const +{ +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING + /* Allow for extended announcement only if the device is uncomissioned. */ + if (mServer->GetFabricTable().FabricCount() == 0) + { + // Specification section 2.3.1 - Extended Announcement Duration up to 48h + return System::Clock::Seconds32(60 * 60 * 48); + } +#endif + // Specification section 5.4.2.3. Announcement Duration says 15 minutes. + return System::Clock::Seconds32(15 * 60); +} + CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindow(Seconds32 commissioningTimeout, CommissioningWindowAdvertisement advertisementMode) { diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 51efb44b19376e..3bc50ed3e33685 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -58,16 +58,7 @@ class CommissioningWindowManager : public Messaging::UnsolicitedMessageHandler, return CHIP_NO_ERROR; } - static constexpr System::Clock::Seconds32 MaxCommissioningTimeout() - { -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING - // Specification section 2.3.1 - Extended Announcement Duration up to 48h - return System::Clock::Seconds32(60 * 60 * 48); -#else - // Specification section 5.4.2.3. Announcement Duration says 15 minutes. - return System::Clock::Seconds32(15 * 60); -#endif - } + System::Clock::Seconds32 MaxCommissioningTimeout() const; System::Clock::Seconds32 MinCommissioningTimeout() const { diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index f4b5fbdc41789c..87fdfad76a531c 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -640,18 +640,18 @@ #endif /** - * CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING + * CHIP_DEVICE_CONFIG_EXT_ADVERTISING * * Optional configuration to enable Extended Announcement Duration up to 48h. * Should be used together with extending CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS past 15 minutes. * Disabled by default. */ -#ifndef CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 0 +#ifndef CHIP_DEVICE_CONFIG_EXT_ADVERTISING +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING 0 #endif -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING /** * CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS @@ -735,18 +735,18 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE * Time in seconds that a factory new device will advertise commissionable node discovery. */ #ifndef CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING /** * By default, the extended announcement, when enabled, starts its extended advertising 15 mins * after the standard slow advertisement. Time at which the default discovery time would close the * commissioning window and stop the BLE. - * Therefore, when CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING is enabled bump the default Discovery timeout + * Therefore, when CHIP_DEVICE_CONFIG_EXT_ADVERTISING is enabled bump the default Discovery timeout * to the maximum allowed by the spec. 48h. */ #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (60 * 60 * 48) #else #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (15 * 60) -#endif // CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#endif // CHIP_DEVICE_CONFIG_EXT_ADVERTISING #endif // CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS /** diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index dc4f380c262fb5..81ee804035d4ab 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -152,9 +152,9 @@ #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART #ifdef CONFIG_ENABLE_BLE_EXT_ANNOUNCEMENT -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING CONFIG_ENABLE_BLE_EXT_ANNOUNCEMENT +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING CONFIG_ENABLE_BLE_EXT_ANNOUNCEMENT #else -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 0 +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING 0 #endif // Options for background chip task diff --git a/src/platform/ESP32/nimble/BLEManagerImpl.cpp b/src/platform/ESP32/nimble/BLEManagerImpl.cpp index d4d90f45362dbe..db3ade84d0234b 100644 --- a/src/platform/ESP32/nimble/BLEManagerImpl.cpp +++ b/src/platform/ESP32/nimble/BLEManagerImpl.cpp @@ -281,12 +281,12 @@ void BLEManagerImpl::BleAdvTimeoutHandler(System::Layer *, void *) BLEMgrImpl().mFlags.Set(Flags::kFastAdvertisingEnabled, 0); BLEMgrImpl().mFlags.Set(Flags::kAdvertisingRefreshNeeded, 1); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING BLEMgrImpl().mFlags.Clear(Flags::kExtAdvertisingEnabled); BLEMgrImpl().StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS); #endif } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING else { ChipLogProgress(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); @@ -1066,7 +1066,7 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) ExitNow(); } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING // Check for extended advertisement interval and redact VID/PID if past the initial period. if (mFlags.Has(Flags::kExtAdvertisingEnabled)) { @@ -1671,7 +1671,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) } else { -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (!mFlags.Has(Flags::kExtAdvertisingEnabled)) { adv_params.itvl_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; diff --git a/src/platform/Linux/BLEManagerImpl.cpp b/src/platform/Linux/BLEManagerImpl.cpp index e2070c6978ea70..4ef45f88ea60fa 100644 --- a/src/platform/Linux/BLEManagerImpl.cpp +++ b/src/platform/Linux/BLEManagerImpl.cpp @@ -61,7 +61,7 @@ static constexpr System::Clock::Timeout kNewConnectionScanTimeout = System::Cloc static constexpr System::Clock::Timeout kConnectTimeout = System::Clock::Seconds16(20); static constexpr System::Clock::Timeout kFastAdvertiseTimeout = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING // The CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS specifies the transition time // starting from advertisement commencement. Since the extended advertisement timer is started after // the fast-to-slow transition, we have to subtract the time spent in fast advertising. @@ -584,7 +584,7 @@ void BLEManagerImpl::DriveBLEState() // Setup service data for advertising. auto serviceDataFlags = BluezAdvertisement::kServiceDataNone; -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (mFlags.Has(Flags::kExtAdvertisingEnabled)) serviceDataFlags |= BluezAdvertisement::kServiceDataExtendedAnnouncement; #endif @@ -667,7 +667,7 @@ BluezAdvertisement::AdvertisingIntervals BLEManagerImpl::GetAdvertisingIntervals { if (mFlags.Has(Flags::kFastAdvertisingEnabled)) return { CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN, CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX }; -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (mFlags.Has(Flags::kExtAdvertisingEnabled)) return { CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN, CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MAX }; #endif @@ -682,7 +682,7 @@ void BLEManagerImpl::HandleAdvertisingTimer(chip::System::Layer *, void * appSta { ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); self->_SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING self->mFlags.Clear(Flags::kExtAdvertisingEnabled); DeviceLayer::SystemLayer().StartTimer(kSlowAdvertiseTimeout, HandleAdvertisingTimer, self); } diff --git a/src/platform/Linux/bluez/BluezAdvertisement.cpp b/src/platform/Linux/bluez/BluezAdvertisement.cpp index c68d601d241cd0..859c1bf64fa07b 100644 --- a/src/platform/Linux/bluez/BluezAdvertisement.cpp +++ b/src/platform/Linux/bluez/BluezAdvertisement.cpp @@ -161,7 +161,7 @@ CHIP_ERROR BluezAdvertisement::SetupServiceData(ServiceDataFlags aFlags) deviceInfo.SetAdditionalDataFlag(true); #endif -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (aFlags & kServiceDataExtendedAnnouncement) { deviceInfo.SetExtendedAnnouncementFlag(true); diff --git a/src/platform/NuttX/BLEManagerImpl.cpp b/src/platform/NuttX/BLEManagerImpl.cpp index f28308dd86fc6a..6672b5d4bdd295 100644 --- a/src/platform/NuttX/BLEManagerImpl.cpp +++ b/src/platform/NuttX/BLEManagerImpl.cpp @@ -60,7 +60,7 @@ static constexpr System::Clock::Timeout kNewConnectionScanTimeout = System::Cloc static constexpr System::Clock::Timeout kConnectTimeout = System::Clock::Seconds16(20); static constexpr System::Clock::Timeout kFastAdvertiseTimeout = System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING // The CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS specifies the transition time // starting from advertisement commencement. Since the extended advertisement timer is started after // the fast-to-slow transition, we have to subtract the time spent in fast advertising. @@ -593,7 +593,7 @@ void BLEManagerImpl::DriveBLEState() // Setup service data for advertising. auto serviceDataFlags = BluezAdvertisement::kServiceDataNone; -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (mFlags.Has(Flags::kExtAdvertisingEnabled)) serviceDataFlags |= BluezAdvertisement::kServiceDataExtendedAnnouncement; #endif @@ -662,7 +662,7 @@ BluezAdvertisement::AdvertisingIntervals BLEManagerImpl::GetAdvertisingIntervals { if (mFlags.Has(Flags::kFastAdvertisingEnabled)) return { CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN, CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX }; -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (mFlags.Has(Flags::kExtAdvertisingEnabled)) return { CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN, CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MAX }; #endif @@ -677,7 +677,7 @@ void BLEManagerImpl::HandleAdvertisingTimer(chip::System::Layer *, void * appSta { ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); self->_SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING self->mFlags.Clear(Flags::kExtAdvertisingEnabled); DeviceLayer::SystemLayer().StartTimer(kSlowAdvertiseTimeout, HandleAdvertisingTimer, self); } diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index 7af097195c6e27..49751da62479e3 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -295,7 +295,7 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() Encoding::LittleEndian::Put16(serviceData.uuid, UUID16_CHIPoBLEService.val); ReturnErrorOnFailure(ConfigurationMgr().GetBLEDeviceIdentificationInfo(serviceData.deviceIdInfo)); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) { serviceData.deviceIdInfo.SetVendorId(DEVICE_HANDLE_NULL); @@ -316,7 +316,7 @@ inline CHIP_ERROR BLEManagerImpl::PrepareAdvertisingRequest() mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN; mAdvertisingRequest.maxInterval = CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX; } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING else if (mFlags.Has(Flags::kExtendedAdvertisingEnabled)) { mAdvertisingRequest.minInterval = CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN; @@ -421,7 +421,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising() System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME), HandleSlowBLEAdvertisementInterval, this); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING // Start timer to schedule start of the extended advertising DeviceLayer::SystemLayer().StartTimer( System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS), @@ -443,7 +443,7 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising() mFlags.Clear(Flags::kAdvertising); mFlags.Set(Flags::kFastAdvertisingEnabled, true); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING mFlags.Clear(Flags::kExtendedAdvertisingEnabled); #endif diff --git a/src/platform/Zephyr/CHIPDevicePlatformConfig.h b/src/platform/Zephyr/CHIPDevicePlatformConfig.h index 687e743444b9d9..3c855a74374668 100644 --- a/src/platform/Zephyr/CHIPDevicePlatformConfig.h +++ b/src/platform/Zephyr/CHIPDevicePlatformConfig.h @@ -166,7 +166,7 @@ #endif // CONFIG_CHIP_EXTENDED_DISCOVERY #ifdef CONFIG_CHIP_BLE_EXT_ADVERTISING -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 1 +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING 1 #endif // CONFIG_CHIP_BLE_EXT_ADVERTISING #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (CONFIG_CHIP_BLE_ADVERTISING_DURATION * 60) diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index c05dfb11845605..486a48cc074af2 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -242,7 +242,7 @@ #endif // CONFIG_CHIP_EXTENDED_DISCOVERY #ifdef CONFIG_CHIP_BLE_EXT_ADVERTISING -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING 1 +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING 1 #endif // CONFIG_CHIP_BLE_EXT_ADVERTISING #define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS (CONFIG_CHIP_BLE_ADVERTISING_DURATION * 60) diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index 010d72ebb887eb..d8c58a93685c21 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -155,7 +155,7 @@ #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 25 -#define CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING SL_MATTER_BLE_EXTENDED_ADV +#define CHIP_DEVICE_CONFIG_EXT_ADVERTISING SL_MATTER_BLE_EXTENDED_ADV /* ICD Configuration Defines diff --git a/src/platform/silabs/efr32/BLEManagerImpl.cpp b/src/platform/silabs/efr32/BLEManagerImpl.cpp index e29e34e31af16e..ef553bffa152a1 100644 --- a/src/platform/silabs/efr32/BLEManagerImpl.cpp +++ b/src/platform/silabs/efr32/BLEManagerImpl.cpp @@ -449,7 +449,7 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) advData[index++] = ShortUUID_CHIPoBLEService[0]; // AD value advData[index++] = ShortUUID_CHIPoBLEService[1]; -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING // Check for extended advertisement interval and redact VID/PID if past the initial period. if (mFlags.Has(Flags::kExtAdvertisingEnabled)) { @@ -553,7 +553,7 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) } else { -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING if (!mFlags.Has(Flags::kExtAdvertisingEnabled)) { interval_min = CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN; @@ -993,12 +993,12 @@ void BLEManagerImpl::BleAdvTimeoutHandler(void * arg) ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start slow advertisement"); BLEMgrImpl().mFlags.Set(Flags::kAdvertising); BLEMgr().SetAdvertisingMode(BLEAdvertisingMode::kSlowAdvertising); -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING BLEMgrImpl().mFlags.Clear(Flags::kExtAdvertisingEnabled); BLEMgrImpl().StartBleAdvTimeoutTimer(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_CHANGE_TIME_MS); #endif } -#if CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING +#if CHIP_DEVICE_CONFIG_EXT_ADVERTISING else { ChipLogDetail(DeviceLayer, "bleAdv Timeout : Start extended advertisement"); From 9de3c6b1cdec49d8c842cdf2d09b903908684fb8 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 16 Sep 2024 03:40:22 -0400 Subject: [PATCH 23/42] Remove illegal Identify clusters from examples (#35575) * Remove illegal Identify clusters from examples Problem: - Many examples have the Identify cluster on endpoint 0 and this is not useful or legal. The Identify cluster has to be on a simple endpoint. This PR: - Removes the identify clusters in the wrong places (verified they are elsewhere where required) - Adds a lint rule that EP0 can't have Identify - Fixes YAML test that expected Identify on EP0 to use EP1 available in all examples. Testing done: - Integration tests still pass - New lint rule failed before PR, passes now * Fix CI * Update PairOnNetworkLongImInvokeCommand.kt * Update PairOnNetworkLongImInvokeCommand.kt * Update PairOnNetworkLongImInvokeCommand.kt * Update PairOnNetworkLongImInvokeCommand.kt * fix java/kotlin style --------- Co-authored-by: yunhanw-google --- .../all-clusters-app.matter | 10 - .../all-clusters-common/all-clusters-app.zap | 92 --- .../all-clusters-minimal-app.matter | 9 - .../all-clusters-minimal-app.zap | 84 --- ...tnode_colortemperaturelight_hbUnzYVeyn.zap | 2 +- .../rootnode_dishwasher_cc105034fe.matter | 10 - .../rootnode_dishwasher_cc105034fe.zap | 92 --- .../rootnode_laundrywasher_fb10d238c8.matter | 60 -- .../rootnode_laundrywasher_fb10d238c8.zap | 92 --- .../rootnode_onofflightswitch_FsPlMr090Q.zap | 2 +- ...eraturecontrolledcabinet_ffdb696680.matter | 60 -- ...emperaturecontrolledcabinet_ffdb696680.zap | 92 --- .../dishwasher-common/dishwasher-app.matter | 10 - .../dishwasher-common/dishwasher-app.zap | 92 --- .../PairOnNetworkLongImInvokeCommand.kt | 44 +- .../PairOnNetworkLongImInvokeCommand.kt | 12 +- .../PairOnNetworkLongImSubscribeCommand.kt | 30 +- .../nxp/zap/laundry-washer-app.matter | 9 - .../nxp/zap/laundry-washer-app.zap | 84 --- .../lit-icd-common/lit-icd-server-app.matter | 9 - .../lit-icd-common/lit-icd-server-app.zap | 84 --- .../network-manager-app.matter | 60 -- .../network-manager-app.zap | 92 --- .../nxp/zap/thermostat_matter_thread.matter | 14 - .../nxp/zap/thermostat_matter_thread.zap | 156 ----- .../nxp/zap/thermostat_matter_wifi.matter | 14 - .../nxp/zap/thermostat_matter_wifi.zap | 156 ----- .../qpg/zap/thermostaticRadiatorValve.matter | 9 - .../qpg/zap/thermostaticRadiatorValve.zap | 84 --- .../thermostat-common/thermostat.matter | 9 - .../thermostat-common/thermostat.zap | 84 --- scripts/rules.matterlint | 5 +- .../zap/tests/inputs/all-clusters-app.zap | 94 +-- .../app-templates/endpoint_config.h | 590 +++++++++--------- .../app-templates/gen_config.h | 2 +- .../tests/suites/TestDescriptorCluster.yaml | 1 - src/app/tests/suites/TestIdentifyCluster.yaml | 2 +- 37 files changed, 317 insertions(+), 2034 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index cc36d5c6160113..1aa3c8007507d3 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -7798,16 +7798,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Groups { ram attribute nameSupport; ram attribute featureMap default = 0; 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 0140adbbd9a461..94747c1fbf40c8 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 @@ -69,98 +69,6 @@ "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Groups", "code": 4, diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 77ad5a9fc5d0a5..9b30603b156ee2 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -6242,15 +6242,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - } - server cluster Groups { ram attribute nameSupport; ram attribute featureMap default = 0; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 528dd80c73bfd2..249b28707df21b 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -69,90 +69,6 @@ "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Groups", "code": 4, diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index a274b1055195f9..6aa6a2502fb4b4 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -3594,4 +3594,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 9a567896dfdd24..4ab3e0f003c457 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -1368,16 +1368,6 @@ endpoint 0 { device type ma_rootdevice = 22, version 1; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap index e0ee90ac36fc3b..bedf611487efa1 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -61,98 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index e160cd4fe8cb82..b7b8c92c1e655c 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -234,56 +234,6 @@ struct AtomicAttributeStatusStruct { status statusCode = 1; } -/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -cluster Identify = 3 { - revision 4; - - enum EffectIdentifierEnum : enum8 { - kBlink = 0; - kBreathe = 1; - kOkay = 2; - kChannelChange = 11; - kFinishEffect = 254; - kStopEffect = 255; - } - - enum EffectVariantEnum : enum8 { - kDefault = 0; - } - - enum IdentifyTypeEnum : enum8 { - kNone = 0; - kLightOutput = 1; - kVisibleIndicator = 2; - kAudibleBeep = 3; - kDisplay = 4; - kActuator = 5; - } - - attribute int16u identifyTime = 0; - readonly attribute IdentifyTypeEnum identifyType = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct IdentifyRequest { - int16u identifyTime = 0; - } - - request struct TriggerEffectRequest { - EffectIdentifierEnum effectIdentifier = 0; - EffectVariantEnum effectVariant = 1; - } - - /** Command description for Identify */ - command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; - /** Command description for TriggerEffect */ - command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1457,16 +1407,6 @@ endpoint 0 { device type ma_rootdevice = 22, version 1; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index 7b3d2d49a9a95d..163f7e1b17ee79 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -61,98 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index ff4a49b7778298..de332faefc57ea 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -2902,4 +2902,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index cf0c9c20e47438..9f7942e9284b44 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -234,56 +234,6 @@ struct AtomicAttributeStatusStruct { status statusCode = 1; } -/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -cluster Identify = 3 { - revision 4; - - enum EffectIdentifierEnum : enum8 { - kBlink = 0; - kBreathe = 1; - kOkay = 2; - kChannelChange = 11; - kFinishEffect = 254; - kStopEffect = 255; - } - - enum EffectVariantEnum : enum8 { - kDefault = 0; - } - - enum IdentifyTypeEnum : enum8 { - kNone = 0; - kLightOutput = 1; - kVisibleIndicator = 2; - kAudibleBeep = 3; - kDisplay = 4; - kActuator = 5; - } - - attribute int16u identifyTime = 0; - readonly attribute IdentifyTypeEnum identifyType = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct IdentifyRequest { - int16u identifyTime = 0; - } - - request struct TriggerEffectRequest { - EffectIdentifierEnum effectIdentifier = 0; - EffectVariantEnum effectVariant = 1; - } - - /** Command description for Identify */ - command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; - /** Command description for TriggerEffect */ - command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1334,16 +1284,6 @@ endpoint 0 { device type ma_rootdevice = 22, version 1; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index b93bcb05fec24a..79d3f881487e8e 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -61,98 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 578a806c9d7253..0c7c4044810c6b 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -1466,16 +1466,6 @@ endpoint 0 { device type ma_rootdevice = 22, version 1; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Groups { ram attribute nameSupport; ram attribute featureMap default = 0; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index d8804e9526b4af..857f5a0192f38f 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -61,98 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Groups", "code": 4, diff --git a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt index 23583ffe6e3169..cb8bb53e233be6 100644 --- a/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt +++ b/examples/java-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt @@ -58,13 +58,7 @@ class PairOnNetworkLongImInvokeCommand( if (element != null) { logger.log(Level.INFO, element.toString() + element.getJsonString()) val clusterId = element.getClusterId().getId() - if (clusterId == CLUSTER_ID_IDENTIFY) { - logger.log(Level.INFO, "success code is $successCode") - setSuccess() - return - } else if ( - clusterId == CLUSTER_ID_TEST && element.getJsonString().equals("""{"0:UINT":2}""") - ) { + if (clusterId == CLUSTER_ID_TEST && element.getJsonString().equals("""{"0:UINT":2}""")) { logger.log(Level.INFO, "success code is $successCode") setSuccess() return @@ -91,41 +85,18 @@ class PairOnNetworkLongImInvokeCommand( val tlvWriter1 = TlvWriter() tlvWriter1.startStructure(AnonymousTag) tlvWriter1.put(ContextSpecificTag(0), number) + tlvWriter1.put(ContextSpecificTag(1), number) tlvWriter1.endStructure() val element1: InvokeElement = - InvokeElement.newInstance( - /* endpointId= */ 0, - CLUSTER_ID_IDENTIFY, - IDENTIFY_COMMAND, - tlvWriter1.getEncoded(), - null - ) - - val tlvWriter2 = TlvWriter() - tlvWriter2.startStructure(AnonymousTag) - tlvWriter2.put(ContextSpecificTag(0), number) - tlvWriter2.put(ContextSpecificTag(1), number) - tlvWriter2.endStructure() - - val element2: InvokeElement = InvokeElement.newInstance( /* endpointId= */ 1, CLUSTER_ID_TEST, TEST_ADD_ARGUMENT_COMMAND, - tlvWriter2.getEncoded(), + tlvWriter1.getEncoded(), null ) - val element3: InvokeElement = - InvokeElement.newInstance( - /* endpointId= */ 1, - CLUSTER_ID_IDENTIFY, - IDENTIFY_COMMAND, - null, - """{"0:UINT":1}""" - ) - currentCommissioner() .pairDeviceWithAddress( getNodeId(), @@ -142,20 +113,11 @@ class PairOnNetworkLongImInvokeCommand( clear() currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element1, 0, 0) waitCompleteMs(getTimeoutMillis()) - clear() - currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element2, 0, 0) - waitCompleteMs(getTimeoutMillis()) - clear() - currentCommissioner().invoke(InternalInvokeCallback(), devicePointer, element3, 0, 0) - waitCompleteMs(getTimeoutMillis()) } companion object { private val logger = Logger.getLogger(PairOnNetworkLongImInvokeCommand::class.java.name) - private const val MATTER_PORT = 5540 - private const val CLUSTER_ID_IDENTIFY = 0x0003L - private const val IDENTIFY_COMMAND = 0L private const val CLUSTER_ID_TEST = 0xFFF1FC05L private const val TEST_ADD_ARGUMENT_COMMAND = 0X04L } diff --git a/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt b/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt index 1b66fa5886f7f4..22559bc1ca091d 100644 --- a/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt +++ b/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImInvokeCommand.kt @@ -22,7 +22,7 @@ import java.util.logging.Level import java.util.logging.Logger import kotlinx.coroutines.runBlocking import matter.controller.MatterController -import matter.controller.cluster.clusters.IdentifyCluster +import matter.controller.cluster.clusters.UnitTestingCluster class PairOnNetworkLongImInvokeCommand( controller: MatterController, @@ -39,12 +39,14 @@ class PairOnNetworkLongImInvokeCommand( override fun runCommand() { runBlocking { try { - val identifyTime: UShort = 1u - val identifyCluster = IdentifyCluster(controller = currentCommissioner(), endpointId = 0u) + val arg1: UByte = 1u + val arg2: UByte = 2u + val testCluster = UnitTestingCluster(controller = currentCommissioner(), endpointId = 1u) - // By running command identify, we are implicitly requesting CASE to be established if it's + // By running command testAddArguments, we are implicitly requesting CASE to be established + // if it's // not already present. - identifyCluster.identify(identifyTime) + testCluster.testAddArguments(arg1, arg2) logger.log(Level.INFO, "Invoke command succeeded") } catch (ex: Exception) { setFailure("invoke failure: ${ex.message}") diff --git a/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt b/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt index 85295328bc40a5..8ca1324d9e228e 100644 --- a/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt +++ b/examples/kotlin-matter-controller/java/src/com/matter/controller/commands/pairing/PairOnNetworkLongImSubscribeCommand.kt @@ -5,11 +5,11 @@ import java.util.logging.Level import java.util.logging.Logger import kotlinx.coroutines.flow.takeWhile import kotlinx.coroutines.runBlocking +import matter.controller.BooleanSubscriptionState import matter.controller.MatterController import matter.controller.SubscribeRequest import matter.controller.SubscriptionState -import matter.controller.UShortSubscriptionState -import matter.controller.cluster.clusters.IdentifyCluster +import matter.controller.cluster.clusters.UnitTestingCluster import matter.controller.model.AttributePath import matter.controller.model.EventPath @@ -42,8 +42,8 @@ class PairOnNetworkLongImSubscribeCommand( // Verify Wildcard subscription startWildcardSubscription() - // Verify IdentifyTime attribute subscription - subscribeIdentifyTimeAttribute() + // Verify Boolean attribute subscription + subscribeBooleanAttribute() } catch (ex: Exception) { logger.log(Level.WARNING, "General subscribe failure occurred with error ${ex.message}") setFailure("subscribe failure") @@ -107,30 +107,30 @@ class PairOnNetworkLongImSubscribeCommand( } } - private suspend fun subscribeIdentifyTimeAttribute() { - logger.log(Level.INFO, "Subscribe IdentifyTime attribute") + private suspend fun subscribeBooleanAttribute() { + logger.log(Level.INFO, "Subscribe Boolean attribute") - val identifyCluster = IdentifyCluster(controller = currentCommissioner(), endpointId = 0u) + val testCluster = UnitTestingCluster(controller = currentCommissioner(), endpointId = 1u) - identifyCluster - .subscribeIdentifyTimeAttribute(minInterval = 0, maxInterval = 5) + testCluster + .subscribeBooleanAttribute(minInterval = 0, maxInterval = 5) .takeWhile { subscriptionState -> // Keep collecting as long as it's not SubscriptionEstablished - subscriptionState !is UShortSubscriptionState.SubscriptionEstablished + subscriptionState !is BooleanSubscriptionState.SubscriptionEstablished } .collect { subscriptionState -> when (subscriptionState) { - is UShortSubscriptionState.Success -> { - logger.log(Level.INFO, "Received IdentifyTime Update: ${subscriptionState.value}") + is BooleanSubscriptionState.Success -> { + logger.log(Level.INFO, "Received Boolean Update: ${subscriptionState.value}") } - is UShortSubscriptionState.Error -> { + is BooleanSubscriptionState.Error -> { logger.log( Level.WARNING, "Received SubscriptionErrorNotification with terminationCause: ${subscriptionState.exception}" ) } - is UShortSubscriptionState.SubscriptionEstablished -> { - logger.log(Level.INFO, "IdentifyTime Subscription is established") + is BooleanSubscriptionState.SubscriptionEstablished -> { + logger.log(Level.INFO, "Boolean Subscription is established") } else -> { logger.log(Level.SEVERE, "Unexpected subscription state: $subscriptionState") diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index e3ba743cb6f971..e9bd6ba5caf036 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter @@ -2150,15 +2150,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap index 001bfbc945f132..189241e5005e7a 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap @@ -61,90 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 6c5e4af56cbee4..a1beda368f8f29 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -1818,15 +1818,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index c7354adc058a6f..09567dcb43c99f 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -69,90 +69,6 @@ "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 273b523ce5060f..0ed34e7eea61fb 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -234,56 +234,6 @@ struct AtomicAttributeStatusStruct { status statusCode = 1; } -/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -cluster Identify = 3 { - revision 4; - - enum EffectIdentifierEnum : enum8 { - kBlink = 0; - kBreathe = 1; - kOkay = 2; - kChannelChange = 11; - kFinishEffect = 254; - kStopEffect = 255; - } - - enum EffectVariantEnum : enum8 { - kDefault = 0; - } - - enum IdentifyTypeEnum : enum8 { - kNone = 0; - kLightOutput = 1; - kVisibleIndicator = 2; - kAudibleBeep = 3; - kDisplay = 4; - kActuator = 5; - } - - attribute int16u identifyTime = 0; - readonly attribute IdentifyTypeEnum identifyType = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct IdentifyRequest { - int16u identifyTime = 0; - } - - request struct TriggerEffectRequest { - EffectIdentifierEnum effectIdentifier = 0; - EffectVariantEnum effectVariant = 1; - } - - /** Command description for Identify */ - command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; - /** Command description for TriggerEffect */ - command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -1594,16 +1544,6 @@ endpoint 0 { device type ma_rootdevice = 22, version 1; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap index da1c431a49157f..a016ef57f5c9e9 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.zap +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -61,98 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 179a2c5bf19a90..d38dfd294c9d82 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2562,20 +2562,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 0ed071f900d8b4..6b19e3da7c61fd 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -61,162 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 820bd331ad6a6d..ef0e5fca27b72b 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -2473,20 +2473,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - handle command TriggerEffect; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 000bc243947016..e3868768ae56bc 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -61,162 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index d88d6ec1feee1a..0da91d75b18ecf 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -2204,15 +2204,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap index 6077dfb9d0f599..07d5830e2909bb 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap @@ -61,90 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 6feefe3bba1c14..b99e3f1d4b436c 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2384,15 +2384,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; - server cluster Identify { - ram attribute identifyTime default = 0x0000; - ram attribute identifyType default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - - handle command Identify; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index ffb9da2b136de9..bd5d8084997fe9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -61,90 +61,6 @@ "deviceTypeCode": 22, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index 16c1fa56e1de1e..ee27673ae5bb0b 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -156,10 +156,13 @@ endpoint 0 { require server cluster OperationalCredentials; require server cluster GeneralDiagnostics; - // Example rejection of clusters: + // It is disallowed to have Simple Device type cluster requirements on EP0. // + // TODO: Make sure for these commented rules that nothing breaks in CI // reject server cluster Scenes; + // reject server cluster ScenesManagement; // reject server cluster Groups; + reject server cluster Identify; // Required only if !CustomNetworkConfig. // require server cluster NetworkCommissioning; diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 0ec92a5c61294d..9d4ae062f054c8 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -69,98 +69,6 @@ "deviceTypeCode": 17, "deviceTypeProfileId": 259, "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Groups", "code": 4, @@ -25291,4 +25199,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 6ea480e199be51..08646d26bc566d 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -355,18 +355,12 @@ } // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 1054 +#define GENERATED_ATTRIBUTE_COUNT 1050 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Identify (server) */ \ - { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000000, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* IdentifyTime */ \ - { ZAP_SIMPLE_DEFAULT(0x0), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* IdentifyType */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Groups (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ + /* Endpoint: 0, Cluster: Groups (server) */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(BITMAP8), 0 }, /* NameSupport */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ @@ -2164,10 +2158,6 @@ // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ - const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ - (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback, \ - (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayGroupsServer[] = { \ (EmberAfGenericClusterFunction) emberAfGroupsClusterServerInitCallback, \ }; \ @@ -2179,6 +2169,10 @@ (EmberAfGenericClusterFunction) emberAfTimeFormatLocalizationClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterTimeFormatLocalizationClusterServerPreAttributeChangedCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ + (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterOnOffClusterServerShutdownCallback, \ @@ -2238,13 +2232,8 @@ // clang-format off #define GENERATED_COMMANDS { \ - /* Endpoint: 0, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=0) */ \ - 0x00000000 /* Identify */, \ - 0x00000040 /* TriggerEffect */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=3) */ \ + /* AcceptedCommandList (index=0) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2252,29 +2241,29 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=10)*/ \ + /* GeneratedCommandList (index=7)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ - /* AcceptedCommandList (index=15) */ \ + /* AcceptedCommandList (index=12) */ \ 0x00000000 /* AnnounceOTAProvider */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ - /* AcceptedCommandList (index=17) */ \ + /* AcceptedCommandList (index=14) */ \ 0x00000000 /* ArmFailSafe */, \ 0x00000002 /* SetRegulatoryConfig */, \ 0x00000004 /* CommissioningComplete */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=21)*/ \ + /* GeneratedCommandList (index=18)*/ \ 0x00000001 /* ArmFailSafeResponse */, \ 0x00000003 /* SetRegulatoryConfigResponse */, \ 0x00000005 /* CommissioningCompleteResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=25) */ \ + /* AcceptedCommandList (index=22) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -2282,63 +2271,63 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=32)*/ \ + /* GeneratedCommandList (index=29)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */\ - /* AcceptedCommandList (index=36) */ \ + /* AcceptedCommandList (index=33) */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=38)*/ \ + /* GeneratedCommandList (index=35)*/ \ 0x00000001 /* RetrieveLogsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Diagnostics (server) */\ - /* AcceptedCommandList (index=40) */ \ + /* AcceptedCommandList (index=37) */ \ 0x00000000 /* TestEventTrigger */, \ 0x00000001 /* TimeSnapshot */, \ 0x00000003 /* PayloadTestRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=44)*/ \ + /* GeneratedCommandList (index=41)*/ \ 0x00000002 /* TimeSnapshotResponse */, \ 0x00000004 /* PayloadTestResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ - /* AcceptedCommandList (index=47) */ \ + /* AcceptedCommandList (index=44) */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ - /* AcceptedCommandList (index=49) */ \ + /* AcceptedCommandList (index=46) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Wi-Fi Network Diagnostics (server) */\ - /* AcceptedCommandList (index=51) */ \ + /* AcceptedCommandList (index=48) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ - /* AcceptedCommandList (index=53) */ \ + /* AcceptedCommandList (index=50) */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Time Synchronization (server) */\ - /* AcceptedCommandList (index=55) */ \ + /* AcceptedCommandList (index=52) */ \ 0x00000000 /* SetUTCTime */, \ 0x00000001 /* SetTrustedTimeSource */, \ 0x00000002 /* SetTimeZone */, \ 0x00000004 /* SetDSTOffset */, \ 0x00000005 /* SetDefaultNTP */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=61)*/ \ + /* GeneratedCommandList (index=58)*/ \ 0x00000003 /* SetTimeZoneResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Administrator Commissioning (server) */\ - /* AcceptedCommandList (index=63) */ \ + /* AcceptedCommandList (index=60) */ \ 0x00000000 /* OpenCommissioningWindow */, \ 0x00000001 /* OpenBasicCommissioningWindow */, \ 0x00000002 /* RevokeCommissioning */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Operational Credentials (server) */\ - /* AcceptedCommandList (index=67) */ \ + /* AcceptedCommandList (index=64) */ \ 0x00000000 /* AttestationRequest */, \ 0x00000002 /* CertificateChainRequest */, \ 0x00000004 /* CSRRequest */, \ @@ -2348,35 +2337,35 @@ 0x0000000A /* RemoveFabric */, \ 0x0000000B /* AddTrustedRootCertificate */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=76)*/ \ + /* GeneratedCommandList (index=73)*/ \ 0x00000001 /* AttestationResponse */, \ 0x00000003 /* CertificateChainResponse */, \ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Group Key Management (server) */\ - /* AcceptedCommandList (index=81) */ \ + /* AcceptedCommandList (index=78) */ \ 0x00000000 /* KeySetWrite */, \ 0x00000001 /* KeySetRead */, \ 0x00000003 /* KeySetRemove */, \ 0x00000004 /* KeySetReadAllIndices */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=86)*/ \ + /* GeneratedCommandList (index=83)*/ \ 0x00000002 /* KeySetReadResponse */, \ 0x00000005 /* KeySetReadAllIndicesResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Fault Injection (server) */\ - /* AcceptedCommandList (index=89) */ \ + /* AcceptedCommandList (index=86) */ \ 0x00000000 /* FailAtFault */, \ 0x00000001 /* FailRandomlyAtFault */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=92) */ \ + /* AcceptedCommandList (index=89) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=95) */ \ + /* AcceptedCommandList (index=92) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2384,14 +2373,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=102)*/ \ + /* GeneratedCommandList (index=99)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=107) */ \ + /* AcceptedCommandList (index=104) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -2400,7 +2389,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Level Control (server) */\ - /* AcceptedCommandList (index=114) */ \ + /* AcceptedCommandList (index=111) */ \ 0x00000000 /* MoveToLevel */, \ 0x00000001 /* Move */, \ 0x00000002 /* Step */, \ @@ -2411,95 +2400,95 @@ 0x00000007 /* StopWithOnOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Oven Cavity Operational State (server) */\ - /* AcceptedCommandList (index=123) */ \ + /* AcceptedCommandList (index=120) */ \ 0x00000000 /* Pause */, \ 0x00000001 /* Stop */, \ 0x00000002 /* Start */, \ 0x00000003 /* Resume */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=128)*/ \ + /* GeneratedCommandList (index=125)*/ \ 0x00000004 /* OperationalCommandResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Oven Mode (server) */\ - /* AcceptedCommandList (index=130) */ \ + /* AcceptedCommandList (index=127) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=132)*/ \ + /* GeneratedCommandList (index=129)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Mode Select (server) */\ - /* AcceptedCommandList (index=134) */ \ + /* AcceptedCommandList (index=131) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Laundry Washer Mode (server) */\ - /* AcceptedCommandList (index=136) */ \ + /* AcceptedCommandList (index=133) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=138)*/ \ + /* GeneratedCommandList (index=135)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Refrigerator And Temperature Controlled Cabinet Mode (server) */\ - /* AcceptedCommandList (index=140) */ \ + /* AcceptedCommandList (index=137) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=142)*/ \ + /* GeneratedCommandList (index=139)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: RVC Run Mode (server) */\ - /* AcceptedCommandList (index=144) */ \ + /* AcceptedCommandList (index=141) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=146)*/ \ + /* GeneratedCommandList (index=143)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: RVC Clean Mode (server) */\ - /* AcceptedCommandList (index=148) */ \ + /* AcceptedCommandList (index=145) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=150)*/ \ + /* GeneratedCommandList (index=147)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Temperature Control (server) */\ - /* AcceptedCommandList (index=152) */ \ + /* AcceptedCommandList (index=149) */ \ 0x00000000 /* SetTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Dishwasher Mode (server) */\ - /* AcceptedCommandList (index=154) */ \ + /* AcceptedCommandList (index=151) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=156)*/ \ + /* GeneratedCommandList (index=153)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */\ - /* AcceptedCommandList (index=158) */ \ + /* AcceptedCommandList (index=155) */ \ 0x00000000 /* SelfTestRequest */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Dishwasher Alarm (server) */\ - /* AcceptedCommandList (index=160) */ \ + /* AcceptedCommandList (index=157) */ \ 0x00000000 /* Reset */, \ 0x00000001 /* ModifyEnabledAlarms */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Operational State (server) */\ - /* AcceptedCommandList (index=163) */ \ + /* AcceptedCommandList (index=160) */ \ 0x00000000 /* Pause */, \ 0x00000001 /* Stop */, \ 0x00000002 /* Start */, \ 0x00000003 /* Resume */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=168)*/ \ + /* GeneratedCommandList (index=165)*/ \ 0x00000004 /* OperationalCommandResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: RVC Operational State (server) */\ - /* AcceptedCommandList (index=170) */ \ + /* AcceptedCommandList (index=167) */ \ 0x00000000 /* Pause */, \ 0x00000003 /* Resume */, \ 0x00000080 /* GoHome */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=174)*/ \ + /* GeneratedCommandList (index=171)*/ \ 0x00000004 /* OperationalCommandResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Scenes Management (server) */\ - /* AcceptedCommandList (index=176) */ \ + /* AcceptedCommandList (index=173) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -2509,7 +2498,7 @@ 0x00000006 /* GetSceneMembership */, \ 0x00000040 /* CopyScene */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=185)*/ \ + /* GeneratedCommandList (index=182)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -2519,25 +2508,25 @@ 0x00000040 /* CopySceneResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: HEPA Filter Monitoring (server) */\ - /* AcceptedCommandList (index=193) */ \ + /* AcceptedCommandList (index=190) */ \ 0x00000000 /* ResetCondition */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Activated Carbon Filter Monitoring (server) */\ - /* AcceptedCommandList (index=195) */ \ + /* AcceptedCommandList (index=192) */ \ 0x00000000 /* ResetCondition */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Boolean State Configuration (server) */\ - /* AcceptedCommandList (index=197) */ \ + /* AcceptedCommandList (index=194) */ \ 0x00000000 /* SuppressAlarm */, \ 0x00000001 /* EnableDisableAlarm */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */\ - /* AcceptedCommandList (index=200) */ \ + /* AcceptedCommandList (index=197) */ \ 0x00000000 /* Open */, \ 0x00000001 /* Close */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Device Energy Management (server) */\ - /* AcceptedCommandList (index=203) */ \ + /* AcceptedCommandList (index=200) */ \ 0x00000000 /* PowerAdjustRequest */, \ 0x00000001 /* CancelPowerAdjustRequest */, \ 0x00000002 /* StartTimeAdjustRequest */, \ @@ -2548,7 +2537,7 @@ 0x00000007 /* CancelRequest */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Energy EVSE (server) */\ - /* AcceptedCommandList (index=212) */ \ + /* AcceptedCommandList (index=209) */ \ 0x00000001 /* Disable */, \ 0x00000002 /* EnableCharging */, \ 0x00000003 /* EnableDischarging */, \ @@ -2557,25 +2546,25 @@ 0x00000006 /* GetTargets */, \ 0x00000007 /* ClearTargets */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=220)*/ \ + /* GeneratedCommandList (index=217)*/ \ 0x00000000 /* GetTargetsResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Energy EVSE Mode (server) */\ - /* AcceptedCommandList (index=222) */ \ + /* AcceptedCommandList (index=219) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=224)*/ \ + /* GeneratedCommandList (index=221)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Device Energy Management Mode (server) */\ - /* AcceptedCommandList (index=226) */ \ + /* AcceptedCommandList (index=223) */ \ 0x00000000 /* ChangeToMode */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=228)*/ \ + /* GeneratedCommandList (index=225)*/ \ 0x00000001 /* ChangeToModeResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Window Covering (server) */\ - /* AcceptedCommandList (index=230) */ \ + /* AcceptedCommandList (index=227) */ \ 0x00000000 /* UpOrOpen */, \ 0x00000001 /* DownOrClose */, \ 0x00000002 /* StopMotion */, \ @@ -2585,26 +2574,26 @@ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=238) */ \ + /* AcceptedCommandList (index=235) */ \ 0x00000000 /* BarrierControlGoToPercent */, \ 0x00000001 /* BarrierControlStop */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=241) */ \ + /* AcceptedCommandList (index=238) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000005 /* SetActiveScheduleRequest */, \ 0x00000006 /* SetActivePresetRequest */, \ 0x000000FE /* AtomicRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=246)*/ \ + /* GeneratedCommandList (index=243)*/ \ 0x000000FD /* AtomicResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Fan Control (server) */\ - /* AcceptedCommandList (index=248) */ \ + /* AcceptedCommandList (index=245) */ \ 0x00000000 /* Step */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=250) */ \ + /* AcceptedCommandList (index=247) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -2626,11 +2615,11 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=270) */ \ + /* AcceptedCommandList (index=267) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Unit Testing (server) */\ - /* AcceptedCommandList (index=272) */ \ + /* AcceptedCommandList (index=269) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -2653,7 +2642,7 @@ 0x00000017 /* TestSecondBatchHelperRequest */, \ 0xFFF200AA /* TestDifferentVendorMeiRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=294)*/ \ + /* GeneratedCommandList (index=291)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -2667,12 +2656,12 @@ 0xFFF200BB /* TestDifferentVendorMeiResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=306) */ \ + /* AcceptedCommandList (index=303) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=309) */ \ + /* AcceptedCommandList (index=306) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2680,14 +2669,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=316)*/ \ + /* GeneratedCommandList (index=313)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=321) */ \ + /* AcceptedCommandList (index=318) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -2696,7 +2685,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Scenes Management (server) */\ - /* AcceptedCommandList (index=328) */ \ + /* AcceptedCommandList (index=325) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -2706,7 +2695,7 @@ 0x00000006 /* GetSceneMembership */, \ 0x00000040 /* CopyScene */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=337)*/ \ + /* GeneratedCommandList (index=334)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -2716,7 +2705,7 @@ 0x00000040 /* CopySceneResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=345) */ \ + /* AcceptedCommandList (index=342) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -2724,7 +2713,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=352)*/ \ + /* GeneratedCommandList (index=349)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -2734,39 +2723,26 @@ // clang-format on // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 112 +#define GENERATED_CLUSTER_COUNT 111 // clang-format off #define GENERATED_CLUSTERS { \ - { \ - /* Endpoint: 0, Cluster: Identify (server) */ \ - .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ - .attributeCount = 4, \ - .clusterSize = 9, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ - .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ), \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 0, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(4), \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 3 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 10 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(7), \ + .attributes = ZAP_ATTRIBUTE_INDEX(3), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2779,7 +2755,7 @@ { \ /* Endpoint: 0, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(14), \ + .attributes = ZAP_ATTRIBUTE_INDEX(10), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2792,7 +2768,7 @@ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(17), \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2805,7 +2781,7 @@ { \ /* Endpoint: 0, Cluster: Basic Information (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(24), \ + .attributes = ZAP_ATTRIBUTE_INDEX(20), \ .attributeCount = 24, \ .clusterSize = 40, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2818,7 +2794,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(44), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -2831,12 +2807,12 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributes = ZAP_ATTRIBUTE_INDEX(44), \ .attributeCount = 6, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 12 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 5 ), \ .eventCount = 3, \ @@ -2844,7 +2820,7 @@ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(54), \ + .attributes = ZAP_ATTRIBUTE_INDEX(50), \ .attributeCount = 4, \ .clusterSize = 42, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2857,7 +2833,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(58), \ + .attributes = ZAP_ATTRIBUTE_INDEX(54), \ .attributeCount = 5, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -2870,7 +2846,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(63), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2883,7 +2859,7 @@ { \ /* Endpoint: 0, Cluster: Power Source Configuration (server) */ \ .clusterId = 0x0000002E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(66), \ + .attributes = ZAP_ATTRIBUTE_INDEX(62), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2896,7 +2872,7 @@ { \ /* Endpoint: 0, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(69), \ + .attributes = ZAP_ATTRIBUTE_INDEX(65), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -2909,64 +2885,64 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(78), \ + .attributes = ZAP_ATTRIBUTE_INDEX(74), \ .attributeCount = 7, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 17 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(81), \ .attributeCount = 13, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 32 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(98), \ + .attributes = ZAP_ATTRIBUTE_INDEX(94), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(100), \ + .attributes = ZAP_ATTRIBUTE_INDEX(96), \ .attributeCount = 11, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 8 ), \ .eventCount = 4, \ },\ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(111), \ + .attributes = ZAP_ATTRIBUTE_INDEX(107), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 47 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 44 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 12 ), \ .eventCount = 1, \ @@ -2974,12 +2950,12 @@ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(117), \ + .attributes = ZAP_ATTRIBUTE_INDEX(113), \ .attributeCount = 65, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -2987,12 +2963,12 @@ { \ /* Endpoint: 0, Cluster: Wi-Fi Network Diagnostics (server) */ \ .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(182), \ + .attributes = ZAP_ATTRIBUTE_INDEX(178), \ .attributeCount = 15, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 51 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 13 ), \ .eventCount = 3, \ @@ -3000,12 +2976,12 @@ { \ /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(197), \ + .attributes = ZAP_ATTRIBUTE_INDEX(193), \ .attributeCount = 11, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 53 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3013,25 +2989,25 @@ { \ /* Endpoint: 0, Cluster: Time Synchronization (server) */ \ .clusterId = 0x00000038, \ - .attributes = ZAP_ATTRIBUTE_INDEX(208), \ + .attributes = ZAP_ATTRIBUTE_INDEX(204), \ .attributeCount = 14, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 61 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 16 ), \ .eventCount = 5, \ },\ { \ /* Endpoint: 0, Cluster: Administrator Commissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(222), \ + .attributes = ZAP_ATTRIBUTE_INDEX(218), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3039,33 +3015,33 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(227), \ + .attributes = ZAP_ATTRIBUTE_INDEX(223), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 76 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 73 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(235), \ + .attributes = ZAP_ATTRIBUTE_INDEX(231), \ .attributeCount = 6, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 81 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 83 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(241), \ + .attributes = ZAP_ATTRIBUTE_INDEX(237), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3078,7 +3054,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(244), \ + .attributes = ZAP_ATTRIBUTE_INDEX(240), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3091,7 +3067,7 @@ { \ /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(247), \ + .attributes = ZAP_ATTRIBUTE_INDEX(243), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3104,12 +3080,12 @@ { \ /* Endpoint: 0, Cluster: Fault Injection (server) */ \ .clusterId = 0xFFF1FC06, \ - .attributes = ZAP_ATTRIBUTE_INDEX(252), \ + .attributes = ZAP_ATTRIBUTE_INDEX(248), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 86 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3117,12 +3093,12 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(254), \ + .attributes = ZAP_ATTRIBUTE_INDEX(250), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 89 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3130,20 +3106,20 @@ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(258), \ + .attributes = ZAP_ATTRIBUTE_INDEX(254), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 95 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 102 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 92 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 99 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(261), \ + .attributes = ZAP_ATTRIBUTE_INDEX(257), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -3156,12 +3132,12 @@ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(261), \ + .attributes = ZAP_ATTRIBUTE_INDEX(257), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 107 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 104 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3169,7 +3145,7 @@ { \ /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(268), \ + .attributes = ZAP_ATTRIBUTE_INDEX(264), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3182,12 +3158,12 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(272), \ + .attributes = ZAP_ATTRIBUTE_INDEX(268), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 114 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 111 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3195,7 +3171,7 @@ { \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(288), \ + .attributes = ZAP_ATTRIBUTE_INDEX(284), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3208,7 +3184,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(293), \ + .attributes = ZAP_ATTRIBUTE_INDEX(289), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3221,7 +3197,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(300), \ + .attributes = ZAP_ATTRIBUTE_INDEX(296), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3234,7 +3210,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(303), \ + .attributes = ZAP_ATTRIBUTE_INDEX(299), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3247,7 +3223,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(308), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3260,7 +3236,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(317), \ + .attributes = ZAP_ATTRIBUTE_INDEX(313), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3273,7 +3249,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(321), \ + .attributes = ZAP_ATTRIBUTE_INDEX(317), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3286,7 +3262,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(324), \ + .attributes = ZAP_ATTRIBUTE_INDEX(320), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3299,7 +3275,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(327), \ + .attributes = ZAP_ATTRIBUTE_INDEX(323), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3312,33 +3288,33 @@ { \ /* Endpoint: 1, Cluster: Oven Cavity Operational State (server) */ \ .clusterId = 0x00000048, \ - .attributes = ZAP_ATTRIBUTE_INDEX(330), \ + .attributes = ZAP_ATTRIBUTE_INDEX(326), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 123 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 128 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 120 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 125 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 23 ), \ .eventCount = 2, \ },\ { \ /* Endpoint: 1, Cluster: Oven Mode (server) */ \ .clusterId = 0x00000049, \ - .attributes = ZAP_ATTRIBUTE_INDEX(338), \ + .attributes = ZAP_ATTRIBUTE_INDEX(334), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 130 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 132 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 129 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Laundry Dryer Controls (server) */ \ .clusterId = 0x0000004A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(342), \ + .attributes = ZAP_ATTRIBUTE_INDEX(338), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3351,12 +3327,12 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(346), \ + .attributes = ZAP_ATTRIBUTE_INDEX(342), \ .attributeCount = 9, \ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayModeSelectServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 134 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 131 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3364,33 +3340,33 @@ { \ /* Endpoint: 1, Cluster: Laundry Washer Mode (server) */ \ .clusterId = 0x00000051, \ - .attributes = ZAP_ATTRIBUTE_INDEX(355), \ + .attributes = ZAP_ATTRIBUTE_INDEX(351), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 136 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 138 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 133 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 135 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Refrigerator And Temperature Controlled Cabinet Mode (server) */ \ .clusterId = 0x00000052, \ - .attributes = ZAP_ATTRIBUTE_INDEX(361), \ + .attributes = ZAP_ATTRIBUTE_INDEX(357), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 140 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 142 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 137 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 139 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ .clusterId = 0x00000053, \ - .attributes = ZAP_ATTRIBUTE_INDEX(367), \ + .attributes = ZAP_ATTRIBUTE_INDEX(363), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3403,38 +3379,38 @@ { \ /* Endpoint: 1, Cluster: RVC Run Mode (server) */ \ .clusterId = 0x00000054, \ - .attributes = ZAP_ATTRIBUTE_INDEX(373), \ + .attributes = ZAP_ATTRIBUTE_INDEX(369), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 144 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 146 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 141 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 143 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: RVC Clean Mode (server) */ \ .clusterId = 0x00000055, \ - .attributes = ZAP_ATTRIBUTE_INDEX(377), \ + .attributes = ZAP_ATTRIBUTE_INDEX(373), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 148 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 150 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 145 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 147 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Temperature Control (server) */ \ .clusterId = 0x00000056, \ - .attributes = ZAP_ATTRIBUTE_INDEX(381), \ + .attributes = ZAP_ATTRIBUTE_INDEX(377), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 152 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 149 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3442,7 +3418,7 @@ { \ /* Endpoint: 1, Cluster: Refrigerator Alarm (server) */ \ .clusterId = 0x00000057, \ - .attributes = ZAP_ATTRIBUTE_INDEX(385), \ + .attributes = ZAP_ATTRIBUTE_INDEX(381), \ .attributeCount = 5, \ .clusterSize = 18, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3455,20 +3431,20 @@ { \ /* Endpoint: 1, Cluster: Dishwasher Mode (server) */ \ .clusterId = 0x00000059, \ - .attributes = ZAP_ATTRIBUTE_INDEX(390), \ + .attributes = ZAP_ATTRIBUTE_INDEX(386), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 154 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 151 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 153 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Air Quality (server) */ \ .clusterId = 0x0000005B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(396), \ + .attributes = ZAP_ATTRIBUTE_INDEX(392), \ .attributeCount = 3, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3481,12 +3457,12 @@ { \ /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ .clusterId = 0x0000005C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(399), \ + .attributes = ZAP_ATTRIBUTE_INDEX(395), \ .attributeCount = 15, \ .clusterSize = 22, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 158 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 155 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 26 ), \ .eventCount = 11, \ @@ -3494,12 +3470,12 @@ { \ /* Endpoint: 1, Cluster: Dishwasher Alarm (server) */ \ .clusterId = 0x0000005D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(414), \ + .attributes = ZAP_ATTRIBUTE_INDEX(410), \ .attributeCount = 6, \ .clusterSize = 22, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 157 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 37 ), \ .eventCount = 1, \ @@ -3507,7 +3483,7 @@ { \ /* Endpoint: 1, Cluster: Microwave Oven Mode (server) */ \ .clusterId = 0x0000005E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(420), \ + .attributes = ZAP_ATTRIBUTE_INDEX(416), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3520,51 +3496,51 @@ { \ /* Endpoint: 1, Cluster: Operational State (server) */ \ .clusterId = 0x00000060, \ - .attributes = ZAP_ATTRIBUTE_INDEX(424), \ + .attributes = ZAP_ATTRIBUTE_INDEX(420), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 163 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 168 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 160 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 165 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 38 ), \ .eventCount = 2, \ },\ { \ /* Endpoint: 1, Cluster: RVC Operational State (server) */ \ .clusterId = 0x00000061, \ - .attributes = ZAP_ATTRIBUTE_INDEX(432), \ + .attributes = ZAP_ATTRIBUTE_INDEX(428), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 170 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 174 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 167 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 171 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 40 ), \ .eventCount = 2, \ },\ { \ /* Endpoint: 1, Cluster: Scenes Management (server) */ \ .clusterId = 0x00000062, \ - .attributes = ZAP_ATTRIBUTE_INDEX(440), \ + .attributes = ZAP_ATTRIBUTE_INDEX(436), \ .attributeCount = 5, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayScenesManagementServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 176 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 185 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 173 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 182 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: HEPA Filter Monitoring (server) */ \ .clusterId = 0x00000071, \ - .attributes = ZAP_ATTRIBUTE_INDEX(445), \ + .attributes = ZAP_ATTRIBUTE_INDEX(441), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 193 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 190 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3572,12 +3548,12 @@ { \ /* Endpoint: 1, Cluster: Activated Carbon Filter Monitoring (server) */ \ .clusterId = 0x00000072, \ - .attributes = ZAP_ATTRIBUTE_INDEX(453), \ + .attributes = ZAP_ATTRIBUTE_INDEX(449), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 195 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 192 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3585,12 +3561,12 @@ { \ /* Endpoint: 1, Cluster: Boolean State Configuration (server) */ \ .clusterId = 0x00000080, \ - .attributes = ZAP_ATTRIBUTE_INDEX(461), \ + .attributes = ZAP_ATTRIBUTE_INDEX(457), \ .attributeCount = 10, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 197 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 194 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 42 ), \ .eventCount = 2, \ @@ -3598,12 +3574,12 @@ { \ /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ .clusterId = 0x00000081, \ - .attributes = ZAP_ATTRIBUTE_INDEX(471), \ + .attributes = ZAP_ATTRIBUTE_INDEX(467), \ .attributeCount = 13, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 197 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 44 ), \ .eventCount = 2, \ @@ -3611,7 +3587,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Power Measurement (server) */ \ .clusterId = 0x00000090, \ - .attributes = ZAP_ATTRIBUTE_INDEX(484), \ + .attributes = ZAP_ATTRIBUTE_INDEX(480), \ .attributeCount = 21, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3624,7 +3600,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Energy Measurement (server) */ \ .clusterId = 0x00000091, \ - .attributes = ZAP_ATTRIBUTE_INDEX(505), \ + .attributes = ZAP_ATTRIBUTE_INDEX(501), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3637,12 +3613,12 @@ { \ /* Endpoint: 1, Cluster: Device Energy Management (server) */ \ .clusterId = 0x00000098, \ - .attributes = ZAP_ATTRIBUTE_INDEX(513), \ + .attributes = ZAP_ATTRIBUTE_INDEX(509), \ .attributeCount = 10, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 203 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 200 ), \ .generatedCommandList = nullptr, \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 49 ), \ .eventCount = 4, \ @@ -3650,20 +3626,20 @@ { \ /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ .clusterId = 0x00000099, \ - .attributes = ZAP_ATTRIBUTE_INDEX(523), \ + .attributes = ZAP_ATTRIBUTE_INDEX(519), \ .attributeCount = 19, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 212 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 220 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 209 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 217 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 53 ), \ .eventCount = 6, \ },\ { \ /* Endpoint: 1, Cluster: Energy Preference (server) */ \ .clusterId = 0x0000009B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(542), \ + .attributes = ZAP_ATTRIBUTE_INDEX(538), \ .attributeCount = 7, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3676,7 +3652,7 @@ { \ /* Endpoint: 1, Cluster: Power Topology (server) */ \ .clusterId = 0x0000009C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(549), \ + .attributes = ZAP_ATTRIBUTE_INDEX(545), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3689,38 +3665,38 @@ { \ /* Endpoint: 1, Cluster: Energy EVSE Mode (server) */ \ .clusterId = 0x0000009D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(553), \ + .attributes = ZAP_ATTRIBUTE_INDEX(549), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 222 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 224 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 219 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 221 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Device Energy Management Mode (server) */ \ .clusterId = 0x0000009F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(557), \ + .attributes = ZAP_ATTRIBUTE_INDEX(553), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 226 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 228 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 223 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 225 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(561), \ + .attributes = ZAP_ATTRIBUTE_INDEX(557), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayWindowCoveringServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 230 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 227 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3728,12 +3704,12 @@ { \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(585), \ + .attributes = ZAP_ATTRIBUTE_INDEX(581), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayBarrierControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 238 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3741,7 +3717,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(591), \ + .attributes = ZAP_ATTRIBUTE_INDEX(587), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3754,25 +3730,25 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(616), \ + .attributes = ZAP_ATTRIBUTE_INDEX(612), \ .attributeCount = 26, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 246 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 238 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 243 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(642), \ + .attributes = ZAP_ATTRIBUTE_INDEX(638), \ .attributeCount = 14, \ .clusterSize = 18, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayFanControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 248 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 245 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3780,7 +3756,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(656), \ + .attributes = ZAP_ATTRIBUTE_INDEX(652), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3793,12 +3769,12 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(661), \ + .attributes = ZAP_ATTRIBUTE_INDEX(657), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 250 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 247 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3806,7 +3782,7 @@ { \ /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ .clusterId = 0x00000301, \ - .attributes = ZAP_ATTRIBUTE_INDEX(715), \ + .attributes = ZAP_ATTRIBUTE_INDEX(711), \ .attributeCount = 16, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3819,7 +3795,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(731), \ + .attributes = ZAP_ATTRIBUTE_INDEX(727), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3832,7 +3808,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(738), \ + .attributes = ZAP_ATTRIBUTE_INDEX(734), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3845,7 +3821,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(744), \ + .attributes = ZAP_ATTRIBUTE_INDEX(740), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3858,7 +3834,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(749), \ + .attributes = ZAP_ATTRIBUTE_INDEX(745), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3871,7 +3847,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(755), \ + .attributes = ZAP_ATTRIBUTE_INDEX(751), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3884,7 +3860,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(761), \ + .attributes = ZAP_ATTRIBUTE_INDEX(757), \ .attributeCount = 5, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3897,7 +3873,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Monoxide Concentration Measurement (server) */ \ .clusterId = 0x0000040C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(766), \ + .attributes = ZAP_ATTRIBUTE_INDEX(762), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3910,7 +3886,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Dioxide Concentration Measurement (server) */ \ .clusterId = 0x0000040D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(779), \ + .attributes = ZAP_ATTRIBUTE_INDEX(775), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3923,7 +3899,7 @@ { \ /* Endpoint: 1, Cluster: Nitrogen Dioxide Concentration Measurement (server) */ \ .clusterId = 0x00000413, \ - .attributes = ZAP_ATTRIBUTE_INDEX(792), \ + .attributes = ZAP_ATTRIBUTE_INDEX(788), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3936,7 +3912,7 @@ { \ /* Endpoint: 1, Cluster: Ozone Concentration Measurement (server) */ \ .clusterId = 0x00000415, \ - .attributes = ZAP_ATTRIBUTE_INDEX(805), \ + .attributes = ZAP_ATTRIBUTE_INDEX(801), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3949,7 +3925,7 @@ { \ /* Endpoint: 1, Cluster: PM2.5 Concentration Measurement (server) */ \ .clusterId = 0x0000042A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(818), \ + .attributes = ZAP_ATTRIBUTE_INDEX(814), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3962,7 +3938,7 @@ { \ /* Endpoint: 1, Cluster: Formaldehyde Concentration Measurement (server) */ \ .clusterId = 0x0000042B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(831), \ + .attributes = ZAP_ATTRIBUTE_INDEX(827), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3975,7 +3951,7 @@ { \ /* Endpoint: 1, Cluster: PM1 Concentration Measurement (server) */ \ .clusterId = 0x0000042C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(844), \ + .attributes = ZAP_ATTRIBUTE_INDEX(840), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3988,7 +3964,7 @@ { \ /* Endpoint: 1, Cluster: PM10 Concentration Measurement (server) */ \ .clusterId = 0x0000042D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(857), \ + .attributes = ZAP_ATTRIBUTE_INDEX(853), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4001,7 +3977,7 @@ { \ /* Endpoint: 1, Cluster: Total Volatile Organic Compounds Concentration Measurement (server) */ \ .clusterId = 0x0000042E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(870), \ + .attributes = ZAP_ATTRIBUTE_INDEX(866), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4014,7 +3990,7 @@ { \ /* Endpoint: 1, Cluster: Radon Concentration Measurement (server) */ \ .clusterId = 0x0000042F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(883), \ + .attributes = ZAP_ATTRIBUTE_INDEX(879), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4027,7 +4003,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(896), \ + .attributes = ZAP_ATTRIBUTE_INDEX(892), \ .attributeCount = 3, \ .clusterSize = 19, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4040,12 +4016,12 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(899), \ + .attributes = ZAP_ATTRIBUTE_INDEX(895), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 270 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 267 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4053,7 +4029,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(901), \ + .attributes = ZAP_ATTRIBUTE_INDEX(897), \ .attributeCount = 13, \ .clusterSize = 32, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4066,25 +4042,25 @@ { \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(914), \ + .attributes = ZAP_ATTRIBUTE_INDEX(910), \ .attributeCount = 84, \ .clusterSize = 2290, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 272 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 294 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 269 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 291 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 59 ), \ .eventCount = 3, \ },\ { \ /* Endpoint: 2, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(998), \ + .attributes = ZAP_ATTRIBUTE_INDEX(994), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 306 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 303 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4092,25 +4068,25 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1002), \ + .attributes = ZAP_ATTRIBUTE_INDEX(998), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 309 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 316 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 306 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 313 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1005), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1001), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 321 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 318 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4118,7 +4094,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1012), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1008), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4131,7 +4107,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1019), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1015), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4144,20 +4120,20 @@ { \ /* Endpoint: 2, Cluster: Scenes Management (server) */ \ .clusterId = 0x00000062, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1028), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1024), \ .attributeCount = 5, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayScenesManagementServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 328 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 337 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 325 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 334 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1033), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1029), \ .attributeCount = 5, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -4170,7 +4146,7 @@ { \ /* Endpoint: 65534, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1038), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1034), \ .attributeCount = 6, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4183,13 +4159,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1044), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1040), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 345 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 352 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 342 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 349 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -4197,13 +4173,13 @@ // clang-format on -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 110 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 109 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 29, 349 }, { ZAP_CLUSTER_INDEX(29), 74, 3517 }, { ZAP_CLUSTER_INDEX(103), 7, 122 }, \ - { ZAP_CLUSTER_INDEX(110), 2, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 28, 340 }, { ZAP_CLUSTER_INDEX(28), 74, 3517 }, { ZAP_CLUSTER_INDEX(102), 7, 122 }, \ + { ZAP_CLUSTER_INDEX(109), 2, 0 }, \ } // Largest attribute size is needed for various buffers @@ -4215,7 +4191,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (36) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3988) +#define ATTRIBUTE_MAX_SIZE (3979) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h index ec489b734afb7a..ccb66133d42412 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h @@ -21,7 +21,7 @@ #pragma once /**** Cluster endpoint counts ****/ -#define MATTER_DM_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (3) +#define MATTER_DM_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define MATTER_DM_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define MATTER_DM_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define MATTER_DM_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) diff --git a/src/app/tests/suites/TestDescriptorCluster.yaml b/src/app/tests/suites/TestDescriptorCluster.yaml index 39179e1143bd75..6f2725e0e98233 100644 --- a/src/app/tests/suites/TestDescriptorCluster.yaml +++ b/src/app/tests/suites/TestDescriptorCluster.yaml @@ -40,7 +40,6 @@ tests: attribute: "ServerList" response: value: [ - 0x0003, # Identify 0x0004, # Groups 0x001D, # Descriptor 0x001E, # Binding diff --git a/src/app/tests/suites/TestIdentifyCluster.yaml b/src/app/tests/suites/TestIdentifyCluster.yaml index 52e667ce4d0329..c373d1386149be 100644 --- a/src/app/tests/suites/TestIdentifyCluster.yaml +++ b/src/app/tests/suites/TestIdentifyCluster.yaml @@ -17,7 +17,7 @@ name: Identify Cluster Tests config: nodeId: 0x12344321 cluster: "Identify" - endpoint: 0 + endpoint: 1 tests: - label: "Wait for the commissioned device to be retrieved" From 04e21d978bfc71c43546289ff616b2264be6e1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Baczma=C5=84ski?= Date: Mon, 16 Sep 2024 12:01:47 +0200 Subject: [PATCH 24/42] [ICD] Implement storing of persistent keys in PSA for ICD server (#34925) * Refactor Key Attributes classes Implement `keyAttributesBase` and add persistent lifetime functionality. * Implement `FindFreeKeySlotInRange` for PSA key slots * Fix ICD CIP related build dependencies * Remake `ICDMonitoringTable::Find()` not to overwrite all entry fields If entry is not found its key handle field must not be filled with last checked entry when using PSA as it will cause key slot to be cleared by accident. * Add ICD CIP and DAC key slots for PSA * Implement `PersistICDKey` API * Implement setting key persitence for ICD server * Address PR comments Modify implementation of `PersistICDKey` not to depend on type of ICD key handle (AES, HMAC) --- src/app/icd/server/BUILD.gn | 2 +- src/app/icd/server/ICDManager.h | 8 +- src/app/icd/server/ICDMonitoringTable.cpp | 34 ++++-- src/app/server/BUILD.gn | 1 - src/app/server/Server.h | 8 +- src/crypto/BUILD.gn | 1 + src/crypto/CHIPCryptoPALPSA.cpp | 22 ++++ src/crypto/CHIPCryptoPALPSA.h | 47 ++++++++- src/crypto/PSASessionKeystore.cpp | 104 ++++++++++++------- src/crypto/PSASessionKeystore.h | 4 + src/crypto/SessionKeystore.h | 11 ++ src/lib/core/CHIPConfig.h | 16 +++ src/platform/nrfconnect/CHIPPlatformConfig.h | 8 ++ src/test_driver/nrfconnect/prj.conf | 2 + 14 files changed, 207 insertions(+), 61 deletions(-) diff --git a/src/app/icd/server/BUILD.gn b/src/app/icd/server/BUILD.gn index f69c25015592af..b30b79d3d4a1d0 100644 --- a/src/app/icd/server/BUILD.gn +++ b/src/app/icd/server/BUILD.gn @@ -93,7 +93,6 @@ source_set("manager") { deps = [ ":icd-server-config" ] public_deps = [ - ":check-in-back-off", ":configuration-data", ":notifier", ":observer", @@ -106,6 +105,7 @@ source_set("manager") { if (chip_enable_icd_checkin) { public_deps += [ + ":check-in-back-off", ":monitoring-table", ":sender", "${chip_root}/src/app:app_config", diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index 4ec1dfe65231d3..19f5f0abeda955 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -34,9 +33,10 @@ #include #if CHIP_CONFIG_ENABLE_ICD_CIP -#include // nogncheck -#include // nogncheck -#endif // CHIP_CONFIG_ENABLE_ICD_CIP +#include // nogncheck +#include // nogncheck +#include // nogncheck +#endif // CHIP_CONFIG_ENABLE_ICD_CIP namespace chip { namespace Crypto { diff --git a/src/app/icd/server/ICDMonitoringTable.cpp b/src/app/icd/server/ICDMonitoringTable.cpp index 8148a7fe33b237..c5543c74125f52 100644 --- a/src/app/icd/server/ICDMonitoringTable.cpp +++ b/src/app/icd/server/ICDMonitoringTable.cpp @@ -140,7 +140,6 @@ CHIP_ERROR ICDMonitoringEntry::SetKey(ByteSpan keyData) Crypto::Symmetric128BitsKeyByteArray keyMaterial; memcpy(keyMaterial, keyData.data(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); - // TODO - Add function to set PSA key lifetime ReturnErrorOnFailure(symmetricKeystore->CreateKey(keyMaterial, aesKeyHandle)); CHIP_ERROR error = symmetricKeystore->CreateKey(keyMaterial, hmacKeyHandle); @@ -242,15 +241,22 @@ CHIP_ERROR ICDMonitoringTable::Get(uint16_t index, ICDMonitoringEntry & entry) c CHIP_ERROR ICDMonitoringTable::Find(NodeId id, ICDMonitoringEntry & entry) { - uint16_t index = 0; - while (index < this->Limit()) + uint16_t index; + ICDMonitoringEntry tempEntry(mSymmetricKeystore); + + for (index = 0; index < this->Limit(); index++) { - ReturnErrorOnFailure(this->Get(index++, entry)); - if (id == entry.checkInNodeID) + if (this->Get(index, tempEntry) != CHIP_NO_ERROR) + { + break; + } + if (id == tempEntry.checkInNodeID) { + entry = tempEntry; return CHIP_NO_ERROR; } } + entry.index = index; return CHIP_ERROR_NOT_FOUND; } @@ -263,16 +269,26 @@ CHIP_ERROR ICDMonitoringTable::Set(uint16_t index, const ICDMonitoringEntry & en VerifyOrReturnError(entry.keyHandleValid, CHIP_ERROR_INVALID_ARGUMENT); ICDMonitoringEntry e(this->mFabric, index); - e.checkInNodeID = entry.checkInNodeID; - e.monitoredSubject = entry.monitoredSubject; - e.clientType = entry.clientType; - e.index = index; + e.checkInNodeID = entry.checkInNodeID; + e.monitoredSubject = entry.monitoredSubject; + e.clientType = entry.clientType; + e.index = index; + e.symmetricKeystore = entry.symmetricKeystore; memcpy(e.aesKeyHandle.AsMutable(), entry.aesKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); memcpy(e.hmacKeyHandle.AsMutable(), entry.hmacKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); + ReturnErrorOnFailure(e.symmetricKeystore->PersistICDKey(e.aesKeyHandle)); + CHIP_ERROR error = e.symmetricKeystore->PersistICDKey(e.hmacKeyHandle); + if (error != CHIP_NO_ERROR) + { + // If setting the persistence of the HmacKeyHandle failed, we need to delete the AesKeyHandle to avoid a key leak + e.symmetricKeystore->DestroyKey(e.aesKeyHandle); + return error; + } + return e.Save(this->mStorage); } diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index 58524c3a648aab..4addf8eea938e3 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -54,7 +54,6 @@ static_library("server") { public_deps = [ "${chip_root}/src/app", "${chip_root}/src/app:test-event-trigger", - "${chip_root}/src/app/icd/server:check-in-back-off", "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/app/icd/server:observer", "${chip_root}/src/lib/address_resolve", diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 27c850563f6e98..2f61197fcee2dd 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -72,14 +72,14 @@ #include #include -#include #if CHIP_CONFIG_ENABLE_ICD_SERVER #include // nogncheck #if CHIP_CONFIG_ENABLE_ICD_CIP #include // nogncheck -#endif -#endif +#include // nogncheck +#endif // CHIP_CONFIG_ENABLE_ICD_CIP +#endif // CHIP_CONFIG_ENABLE_ICD_SERVER namespace chip { @@ -183,9 +183,11 @@ struct ServerInitParams Credentials::OperationalCertificateStore * opCertStore = nullptr; // Required, if not provided, the Server::Init() WILL fail. app::reporting::ReportScheduler * reportScheduler = nullptr; +#if CHIP_CONFIG_ENABLE_ICD_CIP // Optional. Support for the ICD Check-In BackOff strategy. Must be initialized before being provided. // If the ICD Check-In protocol use-case is supported and no strategy is provided, server will use the default strategy. app::ICDCheckInBackOffStrategy * icdCheckInBackOffStrategy = nullptr; +#endif // CHIP_CONFIG_ENABLE_ICD_CIP }; /** diff --git a/src/crypto/BUILD.gn b/src/crypto/BUILD.gn index 1fb8b94f39a82f..6f82c93c191fa8 100644 --- a/src/crypto/BUILD.gn +++ b/src/crypto/BUILD.gn @@ -67,6 +67,7 @@ source_set("public_headers") { public_deps = [ ":crypto_buildconfig", + "${chip_root}/src/app/icd/server:icd-server-config", "${chip_root}/src/lib/asn1", "${chip_root}/src/lib/core", "${chip_root}/src/lib/core:types", diff --git a/src/crypto/CHIPCryptoPALPSA.cpp b/src/crypto/CHIPCryptoPALPSA.cpp index 6eccb1dde8f1ab..99b947c18f5c78 100644 --- a/src/crypto/CHIPCryptoPALPSA.cpp +++ b/src/crypto/CHIPCryptoPALPSA.cpp @@ -263,6 +263,28 @@ void Hash_SHA256_stream::Clear() psa_hash_abort(toHashOperation(&mContext)); } +CHIP_ERROR FindFreeKeySlotInRange(psa_key_id_t & keyId, psa_key_id_t start, uint32_t range) +{ + psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; + psa_key_id_t end = start + range; + + VerifyOrReturnError(start >= PSA_KEY_ID_USER_MIN && end - 1 <= PSA_KEY_ID_USER_MAX, CHIP_ERROR_INVALID_ARGUMENT); + + for (keyId = start; keyId < end; keyId++) + { + psa_status_t status = psa_get_key_attributes(keyId, &attributes); + if (status == PSA_ERROR_INVALID_HANDLE) + { + return CHIP_NO_ERROR; + } + else if (status != PSA_SUCCESS) + { + return CHIP_ERROR_INTERNAL; + } + } + return CHIP_ERROR_NOT_FOUND; +} + CHIP_ERROR PsaKdf::Init(const ByteSpan & secret, const ByteSpan & salt, const ByteSpan & info) { psa_status_t status = PSA_SUCCESS; diff --git a/src/crypto/CHIPCryptoPALPSA.h b/src/crypto/CHIPCryptoPALPSA.h index 8fa3dc57a54024..508f2c4c3cd248 100644 --- a/src/crypto/CHIPCryptoPALPSA.h +++ b/src/crypto/CHIPCryptoPALPSA.h @@ -55,19 +55,58 @@ namespace Crypto { #define CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE 0x30000 #endif // CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE +/** + * @def CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END + * + * @brief + * End of the PSA key identifier range used by Matter. + * + * This setting establishes the maximum limit for the key range specific to Matter, in order to + * prevent any overlap with other firmware components that also employ the PSA crypto API. + */ +#ifndef CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END +#define CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END 0x3FFFF +#endif // CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END + +static_assert(PSA_KEY_ID_USER_MIN <= CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE && CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END <= PSA_KEY_ID_USER_MAX, + "Matter specific PSA key range doesn't fit within PSA allowed range"); + +// Each ICD client requires storing two keys- AES and HMAC +static constexpr uint32_t kMaxICDClientKeys = 2 * CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS; + +static_assert(kMaxICDClientKeys >= CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC * CHIP_CONFIG_MAX_FABRICS, + "Number of allocated ICD key slots is lower than maximum number of supported ICD clients"); + /** * @brief Defines subranges of the PSA key identifier space used by Matter. */ enum class KeyIdBase : psa_key_id_t { - Minimum = CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE, - Operational = Minimum, ///< Base of the PSA key ID range for Node Operational Certificate private keys - Maximum = Operational + kMaxValidFabricIndex, + Minimum = CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE, + Operational = Minimum, ///< Base of the PSA key ID range for Node Operational Certificate private keys + DACPrivKey = Operational + kMaxValidFabricIndex + 1, + ICDKeyRangeStart = DACPrivKey + 1, + Maximum = ICDKeyRangeStart + kMaxICDClientKeys, }; -static_assert(to_underlying(KeyIdBase::Minimum) >= PSA_KEY_ID_USER_MIN && to_underlying(KeyIdBase::Maximum) <= PSA_KEY_ID_USER_MAX, +static_assert(to_underlying(KeyIdBase::Minimum) >= CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE && + to_underlying(KeyIdBase::Maximum) <= CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END, "PSA key ID base out of allowed range"); +/** + * @brief Finds first free persistent Key slot ID within range. + * + * @param[out] keyId Key ID handler to which free ID will be set. + * @param[in] start Starting ID in search range. + * @param[in] range Search range. + * + * @retval CHIP_NO_ERROR On success. + * @retval CHIP_ERROR_INTERNAL On PSA crypto API error. + * @retval CHIP_ERROR_NOT_FOUND On no free Key ID within range. + * @retval CHIP_ERROR_INVALID_ARGUMENT On search arguments out of PSA allowed range. + */ +CHIP_ERROR FindFreeKeySlotInRange(psa_key_id_t & keyId, psa_key_id_t start, uint32_t range); + /** * @brief Calculates PSA key ID for Node Operational Certificate private key for the given fabric. */ diff --git a/src/crypto/PSASessionKeystore.cpp b/src/crypto/PSASessionKeystore.cpp index 304fa10086daba..68f8029211e480 100644 --- a/src/crypto/PSASessionKeystore.cpp +++ b/src/crypto/PSASessionKeystore.cpp @@ -24,20 +24,18 @@ namespace Crypto { namespace { -class AesKeyAttributes +class KeyAttributesBase { public: - AesKeyAttributes() + KeyAttributesBase(psa_key_type_t type, psa_algorithm_t algorithm, psa_key_usage_t usageFlags, size_t bits) { - constexpr psa_algorithm_t kAlgorithm = PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG(PSA_ALG_CCM, 8); - - psa_set_key_type(&mAttrs, PSA_KEY_TYPE_AES); - psa_set_key_algorithm(&mAttrs, kAlgorithm); - psa_set_key_usage_flags(&mAttrs, PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT); - psa_set_key_bits(&mAttrs, CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES * 8); + psa_set_key_type(&mAttrs, type); + psa_set_key_algorithm(&mAttrs, algorithm); + psa_set_key_usage_flags(&mAttrs, usageFlags); + psa_set_key_bits(&mAttrs, bits); } - ~AesKeyAttributes() { psa_reset_key_attributes(&mAttrs); } + ~KeyAttributesBase() { psa_reset_key_attributes(&mAttrs); } const psa_key_attributes_t & Get() { return mAttrs; } @@ -45,49 +43,43 @@ class AesKeyAttributes psa_key_attributes_t mAttrs = PSA_KEY_ATTRIBUTES_INIT; }; -class HmacKeyAttributes +class AesKeyAttributes : public KeyAttributesBase { public: - HmacKeyAttributes() - { - psa_set_key_type(&mAttrs, PSA_KEY_TYPE_HMAC); - psa_set_key_algorithm(&mAttrs, PSA_ALG_HMAC(PSA_ALG_SHA_256)); - psa_set_key_usage_flags(&mAttrs, PSA_KEY_USAGE_SIGN_MESSAGE); - psa_set_key_bits(&mAttrs, CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES * 8); - } - - ~HmacKeyAttributes() { psa_reset_key_attributes(&mAttrs); } - - const psa_key_attributes_t & Get() { return mAttrs; } - -private: - psa_key_attributes_t mAttrs = PSA_KEY_ATTRIBUTES_INIT; + AesKeyAttributes() : + KeyAttributesBase(PSA_KEY_TYPE_AES, PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG(PSA_ALG_CCM, 8), + PSA_KEY_USAGE_ENCRYPT | PSA_KEY_USAGE_DECRYPT | PSA_KEY_USAGE_COPY, + CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES * 8) + {} }; -class HkdfKeyAttributes +class HmacKeyAttributes : public KeyAttributesBase { public: - HkdfKeyAttributes() - { - psa_set_key_type(&mAttrs, PSA_KEY_TYPE_DERIVE); - psa_set_key_algorithm(&mAttrs, PSA_ALG_HKDF(PSA_ALG_SHA_256)); - psa_set_key_usage_flags(&mAttrs, PSA_KEY_USAGE_DERIVE); - } - - ~HkdfKeyAttributes() { psa_reset_key_attributes(&mAttrs); } - - const psa_key_attributes_t & Get() { return mAttrs; } + HmacKeyAttributes() : + KeyAttributesBase(PSA_KEY_TYPE_HMAC, PSA_ALG_HMAC(PSA_ALG_SHA_256), PSA_KEY_USAGE_SIGN_MESSAGE | PSA_KEY_USAGE_COPY, + CHIP_CRYPTO_SYMMETRIC_KEY_LENGTH_BYTES * 8) + {} +}; -private: - psa_key_attributes_t mAttrs = PSA_KEY_ATTRIBUTES_INIT; +class HkdfKeyAttributes : public KeyAttributesBase +{ +public: + HkdfKeyAttributes() : KeyAttributesBase(PSA_KEY_TYPE_DERIVE, PSA_ALG_HKDF(PSA_ALG_SHA_256), PSA_KEY_USAGE_DERIVE, 0) {} }; +void SetKeyId(Symmetric128BitsKeyHandle & key, psa_key_id_t newKeyId) +{ + auto & KeyId = key.AsMutable(); + + KeyId = newKeyId; +} } // namespace CHIP_ERROR PSASessionKeystore::CreateKey(const Symmetric128BitsKeyByteArray & keyMaterial, Aes128KeyHandle & key) { // Destroy the old key if already allocated - psa_destroy_key(key.As()); + DestroyKey(key); AesKeyAttributes attrs; psa_status_t status = @@ -101,7 +93,7 @@ CHIP_ERROR PSASessionKeystore::CreateKey(const Symmetric128BitsKeyByteArray & ke CHIP_ERROR PSASessionKeystore::CreateKey(const Symmetric128BitsKeyByteArray & keyMaterial, Hmac128KeyHandle & key) { // Destroy the old key if already allocated - psa_destroy_key(key.As()); + DestroyKey(key); HmacKeyAttributes attrs; psa_status_t status = @@ -192,5 +184,39 @@ void PSASessionKeystore::DestroyKey(HkdfKeyHandle & key) keyId = PSA_KEY_ID_NULL; } +#if CHIP_CONFIG_ENABLE_ICD_CIP +CHIP_ERROR PSASessionKeystore::PersistICDKey(Symmetric128BitsKeyHandle & key) +{ + CHIP_ERROR err; + psa_key_id_t newKeyId = PSA_KEY_ID_NULL; + psa_key_attributes_t attrs; + + psa_get_key_attributes(key.As(), &attrs); + + // Exit early if key is already persistent + if (psa_get_key_lifetime(&attrs) == PSA_KEY_LIFETIME_PERSISTENT) + { + psa_reset_key_attributes(&attrs); + return CHIP_NO_ERROR; + } + + SuccessOrExit(err = Crypto::FindFreeKeySlotInRange(newKeyId, to_underlying(KeyIdBase::ICDKeyRangeStart), kMaxICDClientKeys)); + psa_set_key_lifetime(&attrs, PSA_KEY_LIFETIME_PERSISTENT); + psa_set_key_id(&attrs, newKeyId); + VerifyOrExit(psa_copy_key(key.As(), &attrs, &newKeyId) == PSA_SUCCESS, err = CHIP_ERROR_INTERNAL); + +exit: + DestroyKey(key); + psa_reset_key_attributes(&attrs); + + if (err == CHIP_NO_ERROR) + { + SetKeyId(key, newKeyId); + } + + return err; +} +#endif + } // namespace Crypto } // namespace chip diff --git a/src/crypto/PSASessionKeystore.h b/src/crypto/PSASessionKeystore.h index 1a55713b82d167..b4d2742ae069e8 100644 --- a/src/crypto/PSASessionKeystore.h +++ b/src/crypto/PSASessionKeystore.h @@ -17,6 +17,7 @@ #pragma once +#include #include #include @@ -38,6 +39,9 @@ class PSASessionKeystore : public SessionKeystore AttestationChallenge & attestationChallenge) override; void DestroyKey(Symmetric128BitsKeyHandle & key) override; void DestroyKey(HkdfKeyHandle & key) override; +#if CHIP_CONFIG_ENABLE_ICD_CIP + CHIP_ERROR PersistICDKey(Symmetric128BitsKeyHandle & key) override; +#endif private: CHIP_ERROR DeriveSessionKeys(PsaKdf & kdf, Aes128KeyHandle & i2rKey, Aes128KeyHandle & r2iKey, diff --git a/src/crypto/SessionKeystore.h b/src/crypto/SessionKeystore.h index d668524ac93aed..654100fb95b28b 100644 --- a/src/crypto/SessionKeystore.h +++ b/src/crypto/SessionKeystore.h @@ -140,6 +140,17 @@ class SessionKeystore virtual CHIP_ERROR DeriveSessionKeys(const HkdfKeyHandle & secretKey, const ByteSpan & salt, const ByteSpan & info, Aes128KeyHandle & i2rKey, Aes128KeyHandle & r2iKey, AttestationChallenge & attestationChallenge) = 0; + + /** + * @brief Persistently store an ICD key. + * + * If input is already a persistent key handle, the function is a no-op and the original handle is returned. + * If input is a volatile key handle, key is persisted and the handle may be updated. + * + * If the method returns no error, the application is responsible for destroying the handle + * using the DestroyKey() method when the key is no longer needed. + */ + virtual CHIP_ERROR PersistICDKey(Symmetric128BitsKeyHandle & key) { return CHIP_NO_ERROR; } }; /** diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 8936cc19c4f76d..7827f5a8c335f2 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1667,6 +1667,22 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC 2 #endif +/** + * @def CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS + * + * @brief + * Maximum number of ICD clients. Based on this number, platforms that utilize the + * PSA Crypto API should reserve key slot range. + * + * @note + * For platforms that utilize the PSA Crypto API, this configuration is used to + * compute the number of PSA key slots. It should remain unchanged during the device's lifetime, + * as alterations may lead to issues with backwards compatibility. + */ +#ifndef CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS +#define CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS 256 +#endif + /** * @def CHIP_CONFIG_ICD_MAXIMUM_CHECK_IN_BACKOFF * diff --git a/src/platform/nrfconnect/CHIPPlatformConfig.h b/src/platform/nrfconnect/CHIPPlatformConfig.h index 096bc3426c5fe3..7355d1a1834acb 100644 --- a/src/platform/nrfconnect/CHIPPlatformConfig.h +++ b/src/platform/nrfconnect/CHIPPlatformConfig.h @@ -59,6 +59,10 @@ #define CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE 0x30000 #endif // CHIP_CONFIG_CRYPTO_PSA_KEY_ID_BASE +#ifndef CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END +#define CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END 0x3FFFF +#endif // CHIP_CONFIG_CRYPTO_PSA_KEY_ID_END + // ==================== General Configuration Overrides ==================== #ifndef CHIP_CONFIG_MAX_UNSOLICITED_MESSAGE_HANDLERS @@ -142,6 +146,10 @@ #endif // CONFIG_CHIP_ICD_CLIENTS_PER_FABRIC #endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC +#ifndef CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS +#define CHIP_CONFIG_CRYPTO_PSA_ICD_MAX_CLIENTS 256 +#endif + #ifndef CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER #ifdef CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER #define CHIP_CONFIG_ENABLE_BDX_LOG_TRANSFER CONFIG_CHIP_ENABLE_BDX_LOG_TRANSFER diff --git a/src/test_driver/nrfconnect/prj.conf b/src/test_driver/nrfconnect/prj.conf index 8c9c4433d56086..97b7787fe93ac8 100644 --- a/src/test_driver/nrfconnect/prj.conf +++ b/src/test_driver/nrfconnect/prj.conf @@ -76,6 +76,8 @@ CONFIG_STD_CPP17=y CONFIG_CHIP=y CONFIG_CHIP_CRYPTO_PSA=y CONFIG_CHIP_BUILD_TESTS=y +CONFIG_CHIP_ICD_LIT_SUPPORT=y +CONFIG_CHIP_ENABLE_ICD_SUPPORT=y CONFIG_CHIP_ENABLE_READ_CLIENT=y CONFIG_CHIP_DEVICE_VENDOR_ID=65521 CONFIG_CHIP_DEVICE_PRODUCT_ID=32768 From 1dacd5d81e8d86c16f65cf2d88232008ee22de9d Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Mon, 16 Sep 2024 14:46:13 +0200 Subject: [PATCH 25/42] Bump Tizen QEMU Docker image to version 76 (#35595) * Update Tizen Docker image to 76 * Add user option to tizen qemu * Use console pool to print QEMU output in real-time --------- Co-authored-by: Jakub Latusek --- .github/workflows/qemu.yaml | 3 ++- src/test_driver/tizen/BUILD.gn | 4 ++++ third_party/tizen/tizen_sdk.gni | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 446632bb6d1a67..8e1ab281803e0e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -78,7 +78,8 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-tizen-qemu:54 + image: ghcr.io/project-chip/chip-build-tizen-qemu:76 + options: --user root volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/src/test_driver/tizen/BUILD.gn b/src/test_driver/tizen/BUILD.gn index 5374fa75ed82a6..541f2abb7ceb48 100644 --- a/src/test_driver/tizen/BUILD.gn +++ b/src/test_driver/tizen/BUILD.gn @@ -12,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +pool("console") { + depth = 1 +} + group("check") { testonly = true deps = [ diff --git a/third_party/tizen/tizen_sdk.gni b/third_party/tizen/tizen_sdk.gni index 7f711c693ea599..888b4660611221 100644 --- a/third_party/tizen/tizen_sdk.gni +++ b/third_party/tizen/tizen_sdk.gni @@ -250,6 +250,9 @@ template("tizen_qemu_run") { args += [ "--virtio-net" ] } + # Use console pool to print QEMU output in real-time. + pool = "//:console" + script = tizen_qemu } } From bb2c574be1df9e2e940a95b706a64350f0624e34 Mon Sep 17 00:00:00 2001 From: Axel Le Bourhis <45206070+axelnxp@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:16:20 +0200 Subject: [PATCH 26/42] [NXP] Migrate docker image to NXP Zephyr 3.7 downstream release (#35599) Signed-off-by: Axel Le Bourhis --- .../docker/images/base/chip-build/version | 2 +- .../stage-2/chip-build-nxp-zephyr/Dockerfile | 16 ++++++++-------- .../images/vscode/chip-build-vscode/Dockerfile | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index ab4dc8eb78bdf3..23a501b31c89e6 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -76 : [Telink] Update Docker image (Zephyr update) +77 : [NXP] Migrate docker image to NXP Zephyr 3.7 downstream release diff --git a/integrations/docker/images/stage-2/chip-build-nxp-zephyr/Dockerfile b/integrations/docker/images/stage-2/chip-build-nxp-zephyr/Dockerfile index 334ae622c88e08..09d55415760c06 100644 --- a/integrations/docker/images/stage-2/chip-build-nxp-zephyr/Dockerfile +++ b/integrations/docker/images/stage-2/chip-build-nxp-zephyr/Dockerfile @@ -10,23 +10,23 @@ RUN set -x \ WORKDIR /opt/nxp-zephyr RUN set -x \ - && wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.5/zephyr-sdk-0.16.5_linux-x86_64_minimal.tar.xz \ - && tar xvf zephyr-sdk-0.16.5_linux-x86_64_minimal.tar.xz \ - && rm -rf zephyr-sdk-0.16.5_linux-x86_64_minimal.tar.xz \ - && zephyr-sdk-0.16.5/setup.sh -t arm-zephyr-eabi \ + && wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.8/zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz \ + && tar xvf zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz \ + && rm -rf zephyr-sdk-0.16.8_linux-x86_64_minimal.tar.xz \ + && zephyr-sdk-0.16.8/setup.sh -t arm-zephyr-eabi \ && pip3 install --break-system-packages -U --no-cache-dir west \ - && west init zephyrproject -m https://github.com/nxp-zephyr-ear/zephyr.git --mr zephyr_rw61x_v3.6_RFP \ - && cd zephyrproject/zephyr \ + && west init zephyrproject -m https://github.com/nxp-zephyr/nxp-zsdk.git --mr nxp-v3.7.0 \ + && cd zephyrproject \ && west update -o=--depth=1 -n \ && west zephyr-export \ && : # last line FROM ghcr.io/project-chip/chip-build:${VERSION} -COPY --from=build /opt/nxp-zephyr/zephyr-sdk-0.16.5/ /opt/nxp-zephyr/zephyr-sdk-0.16.5/ +COPY --from=build /opt/nxp-zephyr/zephyr-sdk-0.16.8/ /opt/nxp-zephyr/zephyr-sdk-0.16.8/ COPY --from=build /opt/nxp-zephyr/zephyrproject/ /opt/nxp-zephyr/zephyrproject/ WORKDIR /opt/nxp-zephyr ENV ZEPHYR_NXP_BASE=/opt/nxp-zephyr/zephyrproject/zephyr -ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.16.5 +ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.16.8 diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index 37726292c8db6c..b9cc5f1b38cab9 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -54,7 +54,7 @@ COPY --from=rw61x /opt/sdk /opt/nxp-sdk COPY --from=nxp /opt/nxp /opt/nxp -COPY --from=nxpzephyr /opt/nxp-zephyr/zephyr-sdk-0.16.5/ /opt/nxp-zephyr/zephyr-sdk-0.16.5/ +COPY --from=nxpzephyr /opt/nxp-zephyr/zephyr-sdk-0.16.8/ /opt/nxp-zephyr/zephyr-sdk-0.16.8/ COPY --from=nxpzephyr /opt/nxp-zephyr/zephyrproject/ /opt/nxp-zephyr/zephyrproject/ COPY --from=imx /opt/fsl-imx-xwayland /opt/fsl-imx-xwayland @@ -140,7 +140,7 @@ ENV ZEPHYR_BASE=/opt/NordicSemiconductor/nrfconnect/zephyr ENV ZEPHYR_SDK_INSTALL_DIR=/opt/NordicSemiconductor/nRF5_tools/zephyr-sdk-0.16.5 ENV ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb ENV ZEPHYR_NXP_BASE=/opt/nxp-zephyr/zephyrproject/zephyr -ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.16.5 +ENV ZEPHYR_NXP_SDK_INSTALL_DIR=/opt/nxp-zephyr/zephyr-sdk-0.16.8 ENV NXP_UPDATE_SDK_SCRIPT_DOCKER=/opt/nxp/nxp_matter_support/scripts/update_nxp_sdk.py # Places bootstrap files there instead of the default one which is `.environment`. From fb72066906dcd0681f1b531dabe3999ccce0d717 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Mon, 16 Sep 2024 17:20:17 +0300 Subject: [PATCH 27/42] [scripts][zap] Add Windows support for ZAP generate and download scripts (#35598) Signed-off-by: marius-alex-tache --- scripts/tools/zap/generate.py | 19 ++++++++++++++++--- scripts/tools/zap/zap_download.py | 18 ++++++++++++++---- 2 files changed, 30 insertions(+), 7 deletions(-) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index fef1fa38465d23..b979573682f017 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -16,7 +16,6 @@ # import argparse -import fcntl import json import os import shutil @@ -338,16 +337,30 @@ def __enter__(self): return self.lock_file = open(self.lock_file_path, 'wb') - fcntl.lockf(self.lock_file, fcntl.LOCK_EX) + self._lock() def __exit__(self, *args): if not self.lock_file: return - fcntl.lockf(self.lock_file, fcntl.LOCK_UN) + self._unlock() self.lock_file.close() self.lock_file = None + def _lock(self): + if sys.platform == 'linux' or sys.platform == 'darwin': + import fcntl + fcntl.lockf(self.lock_file, fcntl.LOCK_EX) + else: + print(f"Warning: lock does nothing on {sys.platform} platform") + + def _unlock(self): + if sys.platform == 'linux' or sys.platform == 'darwin': + import fcntl + fcntl.lockf(self.lock_file, fcntl.LOCK_UN) + else: + print(f"Warning: unlock does nothing on {sys.platform} platform") + def main(): checkPythonVersion() diff --git a/scripts/tools/zap/zap_download.py b/scripts/tools/zap/zap_download.py index 9d1a553feac0e8..016a2ed073d202 100755 --- a/scripts/tools/zap/zap_download.py +++ b/scripts/tools/zap/zap_download.py @@ -106,15 +106,21 @@ def _SetupReleaseZap(install_directory: str, zap_version: str): if sys.platform == 'linux': zap_platform = 'linux' + arch = os.uname().machine elif sys.platform == 'darwin': zap_platform = 'mac' + arch = os.uname().machine + elif sys.platform == 'win32': + zap_platform = 'win' + # os.uname is not implemented on Windows, so use an alternative instead. + import platform + arch = platform.uname().machine else: raise Exception('Unknown platform - do not know what zip file to download.') - arch = os.uname().machine if arch == 'arm64': zap_arch = 'arm64' - elif arch == 'x86_64': + elif arch == 'x86_64' or arch == 'AMD64': zap_arch = 'x64' else: raise Exception(f'Unknown architecture "${arch}" - do not know what zip file to download.') @@ -228,17 +234,21 @@ def main(log_level: str, sdk_root: str, extract_root: str, zap_version: Optional install_directory = os.path.join(extract_root, f"zap-{zap_version}") + export_cmd = "export" + if sys.platform == 'win32': + export_cmd = "set" + if zap == DownloadType.SOURCE: install_directory = install_directory + "-src" _SetupSourceZap(install_directory, zap_version) # Make sure the results can be used in scripts - print(f"export ZAP_DEVELOPMENT_PATH={shlex.quote(install_directory)}") + print(f"{export_cmd} ZAP_DEVELOPMENT_PATH={shlex.quote(install_directory)}") else: _SetupReleaseZap(install_directory, zap_version) # Make sure the results can be used in scripts - print(f"export ZAP_INSTALL_PATH={shlex.quote(install_directory)}") + print(f"{export_cmd} ZAP_INSTALL_PATH={shlex.quote(install_directory)}") if __name__ == '__main__': From 54127b91de428642262339e04f2a895db6acd842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20BOU=C3=89?= Date: Mon, 16 Sep 2024 16:31:37 +0200 Subject: [PATCH 28/42] [Chef] Add WaterValve (#35214) * Update matter_device_types.json Add Water Valve * Chef WaterValve * Remove Groups and Scenes management clusters * Update rootnode_watervalve_6bb39f1f67.matter * Manual correction of device type order due to ZAP tool bug. * Manual correction of device type order due to ZAP tool bug * Remove Groups cluster * Update rootnode_watervalve_6bb39f1f67.zap * Update rootnode_watervalve_6bb39f1f67.matter * Update rootnode_watervalve_6bb39f1f67.zap --- .../rootnode_watervalve_6bb39f1f67.matter | 1845 ++++++++++ .../rootnode_watervalve_6bb39f1f67.zap | 2986 +++++++++++++++++ .../sample_app_util/matter_device_types.json | 1 + 3 files changed, 4832 insertions(+) create mode 100644 examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter create mode 100644 examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter new file mode 100644 index 00000000000000..28a5183881afbb --- /dev/null +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter @@ -0,0 +1,1845 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing common languages, units of measurements, and numerical formatting + standards. As such, Nodes that visually or audibly convey information need a mechanism by which + they can be configured to use a user’s preferred language, units, etc */ +cluster LocalizationConfiguration = 43 { + revision 1; // NOTE: Default/not specifically set + + attribute access(write: manage) char_string<35> activeLocale = 0; + readonly attribute char_string supportedLocales[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ +cluster PowerSource = 47 { + revision 1; // NOTE: Default/not specifically set + + enum BatApprovedChemistryEnum : enum16 { + kUnspecified = 0; + kAlkaline = 1; + kLithiumCarbonFluoride = 2; + kLithiumChromiumOxide = 3; + kLithiumCopperOxide = 4; + kLithiumIronDisulfide = 5; + kLithiumManganeseDioxide = 6; + kLithiumThionylChloride = 7; + kMagnesium = 8; + kMercuryOxide = 9; + kNickelOxyhydride = 10; + kSilverOxide = 11; + kZincAir = 12; + kZincCarbon = 13; + kZincChloride = 14; + kZincManganeseDioxide = 15; + kLeadAcid = 16; + kLithiumCobaltOxide = 17; + kLithiumIon = 18; + kLithiumIonPolymer = 19; + kLithiumIronPhosphate = 20; + kLithiumSulfur = 21; + kLithiumTitanate = 22; + kNickelCadmium = 23; + kNickelHydrogen = 24; + kNickelIron = 25; + kNickelMetalHydride = 26; + kNickelZinc = 27; + kSilverZinc = 28; + kSodiumIon = 29; + kSodiumSulfur = 30; + kZincBromide = 31; + kZincCerium = 32; + } + + enum BatChargeFaultEnum : enum8 { + kUnspecified = 0; + kAmbientTooHot = 1; + kAmbientTooCold = 2; + kBatteryTooHot = 3; + kBatteryTooCold = 4; + kBatteryAbsent = 5; + kBatteryOverVoltage = 6; + kBatteryUnderVoltage = 7; + kChargerOverVoltage = 8; + kChargerUnderVoltage = 9; + kSafetyTimeout = 10; + } + + enum BatChargeLevelEnum : enum8 { + kOK = 0; + kWarning = 1; + kCritical = 2; + } + + enum BatChargeStateEnum : enum8 { + kUnknown = 0; + kIsCharging = 1; + kIsAtFullCharge = 2; + kIsNotCharging = 3; + } + + enum BatCommonDesignationEnum : enum16 { + kUnspecified = 0; + kAAA = 1; + kAA = 2; + kC = 3; + kD = 4; + k4v5 = 5; + k6v0 = 6; + k9v0 = 7; + k12AA = 8; + kAAAA = 9; + kA = 10; + kB = 11; + kF = 12; + kN = 13; + kNo6 = 14; + kSubC = 15; + kA23 = 16; + kA27 = 17; + kBA5800 = 18; + kDuplex = 19; + k4SR44 = 20; + k523 = 21; + k531 = 22; + k15v0 = 23; + k22v5 = 24; + k30v0 = 25; + k45v0 = 26; + k67v5 = 27; + kJ = 28; + kCR123A = 29; + kCR2 = 30; + k2CR5 = 31; + kCRP2 = 32; + kCRV3 = 33; + kSR41 = 34; + kSR43 = 35; + kSR44 = 36; + kSR45 = 37; + kSR48 = 38; + kSR54 = 39; + kSR55 = 40; + kSR57 = 41; + kSR58 = 42; + kSR59 = 43; + kSR60 = 44; + kSR63 = 45; + kSR64 = 46; + kSR65 = 47; + kSR66 = 48; + kSR67 = 49; + kSR68 = 50; + kSR69 = 51; + kSR516 = 52; + kSR731 = 53; + kSR712 = 54; + kLR932 = 55; + kA5 = 56; + kA10 = 57; + kA13 = 58; + kA312 = 59; + kA675 = 60; + kAC41E = 61; + k10180 = 62; + k10280 = 63; + k10440 = 64; + k14250 = 65; + k14430 = 66; + k14500 = 67; + k14650 = 68; + k15270 = 69; + k16340 = 70; + kRCR123A = 71; + k17500 = 72; + k17670 = 73; + k18350 = 74; + k18500 = 75; + k18650 = 76; + k19670 = 77; + k25500 = 78; + k26650 = 79; + k32600 = 80; + } + + enum BatFaultEnum : enum8 { + kUnspecified = 0; + kOverTemp = 1; + kUnderTemp = 2; + } + + enum BatReplaceabilityEnum : enum8 { + kUnspecified = 0; + kNotReplaceable = 1; + kUserReplaceable = 2; + kFactoryReplaceable = 3; + } + + enum PowerSourceStatusEnum : enum8 { + kUnspecified = 0; + kActive = 1; + kStandby = 2; + kUnavailable = 3; + } + + enum WiredCurrentTypeEnum : enum8 { + kAC = 0; + kDC = 1; + } + + enum WiredFaultEnum : enum8 { + kUnspecified = 0; + kOverVoltage = 1; + kUnderVoltage = 2; + } + + bitmap Feature : bitmap32 { + kWired = 0x1; + kBattery = 0x2; + kRechargeable = 0x4; + kReplaceable = 0x8; + } + + struct BatChargeFaultChangeType { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + struct BatFaultChangeType { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + struct WiredFaultChangeType { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event WiredFaultChange = 0 { + WiredFaultEnum current[] = 0; + WiredFaultEnum previous[] = 1; + } + + info event BatFaultChange = 1 { + BatFaultEnum current[] = 0; + BatFaultEnum previous[] = 1; + } + + info event BatChargeFaultChange = 2 { + BatChargeFaultEnum current[] = 0; + BatChargeFaultEnum previous[] = 1; + } + + readonly attribute PowerSourceStatusEnum status = 0; + readonly attribute int8u order = 1; + readonly attribute char_string<60> description = 2; + readonly attribute optional nullable int32u wiredAssessedInputVoltage = 3; + readonly attribute optional nullable int16u wiredAssessedInputFrequency = 4; + readonly attribute optional WiredCurrentTypeEnum wiredCurrentType = 5; + readonly attribute optional nullable int32u wiredAssessedCurrent = 6; + readonly attribute optional int32u wiredNominalVoltage = 7; + readonly attribute optional int32u wiredMaximumCurrent = 8; + readonly attribute optional boolean wiredPresent = 9; + readonly attribute optional WiredFaultEnum activeWiredFaults[] = 10; + readonly attribute optional nullable int32u batVoltage = 11; + readonly attribute optional nullable int8u batPercentRemaining = 12; + readonly attribute optional nullable int32u batTimeRemaining = 13; + readonly attribute optional BatChargeLevelEnum batChargeLevel = 14; + readonly attribute optional boolean batReplacementNeeded = 15; + readonly attribute optional BatReplaceabilityEnum batReplaceability = 16; + readonly attribute optional boolean batPresent = 17; + readonly attribute optional BatFaultEnum activeBatFaults[] = 18; + readonly attribute optional char_string<60> batReplacementDescription = 19; + readonly attribute optional BatCommonDesignationEnum batCommonDesignation = 20; + readonly attribute optional char_string<20> batANSIDesignation = 21; + readonly attribute optional char_string<20> batIECDesignation = 22; + readonly attribute optional BatApprovedChemistryEnum batApprovedChemistry = 23; + readonly attribute optional int32u batCapacity = 24; + readonly attribute optional int8u batQuantity = 25; + readonly attribute optional BatChargeStateEnum batChargeState = 26; + readonly attribute optional nullable int32u batTimeToFullCharge = 27; + readonly attribute optional boolean batFunctionalWhileCharging = 28; + readonly attribute optional nullable int32u batChargingCurrent = 29; + readonly attribute optional BatChargeFaultEnum activeBatChargeFaults[] = 30; + readonly attribute endpoint_no endpointList[] = 31; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** This cluster is used to configure a valve. */ +cluster ValveConfigurationAndControl = 129 { + revision 1; + + enum StatusCodeEnum : enum8 { + kFailureDueToFault = 2; + } + + enum ValveStateEnum : enum8 { + kClosed = 0; + kOpen = 1; + kTransitioning = 2; + } + + bitmap Feature : bitmap32 { + kTimeSync = 0x1; + kLevel = 0x2; + } + + bitmap ValveFaultBitmap : bitmap16 { + kGeneralFault = 0x1; + kBlocked = 0x2; + kLeaking = 0x4; + kNotConnected = 0x8; + kShortCircuit = 0x10; + kCurrentExceeded = 0x20; + } + + info event ValveStateChanged = 0 { + ValveStateEnum valveState = 0; + optional percent valveLevel = 1; + } + + info event ValveFault = 1 { + ValveFaultBitmap valveFault = 0; + } + + readonly attribute nullable elapsed_s openDuration = 0; + attribute nullable elapsed_s defaultOpenDuration = 1; + readonly attribute optional nullable epoch_us autoCloseTime = 2; + readonly attribute nullable elapsed_s remainingDuration = 3; + readonly attribute nullable ValveStateEnum currentState = 4; + readonly attribute nullable ValveStateEnum targetState = 5; + readonly attribute optional nullable percent currentLevel = 6; + readonly attribute optional nullable percent targetLevel = 7; + attribute optional percent defaultOpenLevel = 8; + readonly attribute optional ValveFaultBitmap valveFault = 9; + readonly attribute optional int8u levelStep = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenRequest { + optional nullable elapsed_s openDuration = 0; + optional percent targetLevel = 1; + } + + /** This command is used to set the valve to its open position. */ + command Open(OpenRequest): DefaultSuccess = 0; + /** This command is used to set the valve to its closed position. */ + command Close(): DefaultSuccess = 1; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster LocalizationConfiguration { + ram attribute activeLocale; + callback attribute supportedLocales; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_powersource = 66, version 1; + device type ma_water_valve = 17, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster PowerSource { + ram attribute status default = 1; + ram attribute order default = 1; + ram attribute description default = "Primary Battery"; + ram attribute batVoltage default = 4100; + ram attribute batPercentRemaining default = 95; + ram attribute batTimeRemaining default = 518400; + ram attribute batChargeLevel default = 0; + ram attribute batReplacementNeeded default = 0; + ram attribute batReplaceability default = 1; + ram attribute batPresent default = 1; + ram attribute batCapacity default = 350; + ram attribute batChargeState default = 4; + ram attribute batFunctionalWhileCharging default = 1; + callback attribute endpointList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster ValveConfigurationAndControl { + ram attribute openDuration; + ram attribute defaultOpenDuration; + callback attribute remainingDuration; + ram attribute currentState; + ram attribute targetState; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command Open; + handle command Close; + } +} + + diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap new file mode 100644 index 00000000000000..6650dbe1d56300 --- /dev/null +++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap @@ -0,0 +1,2986 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 66, + "profileId": 259, + "label": "MA-water-valve", + "name": "MA-water-valve" + }, + "deviceTypes": [ + { + "code": 66, + "profileId": 259, + "label": "MA-water-valve", + "name": "MA-water-valve" + }, + { + "code": 17, + "profileId": 259, + "label": "MA-powersource", + "name": "MA-powersource" + } + ], + "deviceVersions": [ + 1, + 1 + ], + "deviceIdentifiers": [ + 17, + 66 + ], + "deviceTypeName": "MA-water-valve", + "deviceTypeCode": 66, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Power Source", + "code": 47, + "mfgCode": null, + "define": "POWER_SOURCE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Status", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PowerSourceStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Order", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Description", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "Primary Battery", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatVoltage", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4100", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPercentRemaining", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "95", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatTimeRemaining", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "518400", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeLevel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "BatChargeLevelEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplacementNeeded", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatReplaceability", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "BatReplaceabilityEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatPresent", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatCapacity", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "350", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatChargeState", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "BatChargeStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BatFunctionalWhileCharging", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EndpointList", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Valve Configuration and Control", + "code": 129, + "mfgCode": null, + "define": "VALVE_CONFIGURATION_AND_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Open", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "Close", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "OpenDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultOpenDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RemainingDuration", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentState", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "ValveStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetState", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "ValveStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": 0 + } + ] +} diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index e8ed949033d41f..c8af1528642ae7 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -49,5 +49,6 @@ "Robotic Vacuum Cleaner": 116, "Dishwasher": 117, "Smoke CO Alarm": 118, + "Water Valve": 66, "Water Leak Detector": 67 } From c4d468610015a4c12d63af980529596e25ca11d5 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 16 Sep 2024 14:12:38 -0400 Subject: [PATCH 29/42] Deprecate some clusters in Matter.framework that should never have shipped (#35584) * Temporarily add clusters that should never have shipped to availability.yaml as deprecated. BarrierControl, BinaryInputBasic, ElectricalMeasurement, OnOffSwitchConfiguration were never certifiable and should not have shipped. Add them as deprecated with a dummy release that has some future-enough version numbers. * Regenerate generated code with deprecations. * Mark these clusters as removed and move them out of generated code and into manual shims. This should only have moved code, not new code. * Regenerate generated code with the clusters removed. This has no changes to API headers. * Regenerate darwin-framework-tool. --- .../Framework/CHIP/MTRBackwardsCompatShims.h | 3197 + .../Framework/CHIP/MTRBackwardsCompatShims.mm | 14888 ++ .../CHIP/templates/MTRBaseClusters.zapt | 22 +- .../CHIP/templates/MTRClusterConstants.zapt | 6 + .../Framework/CHIP/templates/MTRClusters.zapt | 14 +- .../MTRCommandPayloads_Internal.zapt | 2 +- .../CHIP/templates/availability.yaml | 5 + .../partials/attribute_id_shims.zapt | 691 + .../templates/partials/cluster_id_shims.zapt | 8 + .../templates/partials/command_id_shims.zapt | 31 + .../Framework/CHIP/templates/templates.json | 12 + .../MTRAttributeSpecifiedCheck.mm | 567 - .../MTRAttributeTLVValueDecoder.mm | 1746 +- .../CHIP/zap-generated/MTRBaseClusters.h | 20704 ++- .../CHIP/zap-generated/MTRBaseClusters.mm | 105767 ++++++------- .../CHIP/zap-generated/MTRClusterConstants.h | 1697 +- .../CHIP/zap-generated/MTRClusterNames.mm | 788 - .../CHIP/zap-generated/MTRClusters.h | 532 - .../CHIP/zap-generated/MTRClusters.mm | 1446 +- .../zap-generated/MTRCommandPayloadsObjc.h | 204 - .../zap-generated/MTRCommandPayloadsObjc.mm | 554 - .../MTRCommandPayloads_Internal.h | 38 +- .../zap-generated/MTRCommandTimedCheck.mm | 48 - .../zap-generated/MTREventTLVValueDecoder.mm | 60 - .../zap-generated/cluster/Commands.h | 121659 +++++++-------- 25 files changed, 128114 insertions(+), 146572 deletions(-) create mode 100644 src/darwin/Framework/CHIP/templates/partials/attribute_id_shims.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/cluster_id_shims.zapt create mode 100644 src/darwin/Framework/CHIP/templates/partials/command_id_shims.zapt diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h index 1a183c83def9b5..e1b935ca665810 100644 --- a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.h @@ -16,6 +16,8 @@ #import +#import +#import #import #import #import @@ -188,4 +190,3199 @@ typedef NS_ENUM(uint8_t, MTRColorControlSaturationStepMode) { } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepMode"); +#pragma mark - Clusters that were removed wholesale: OnOffSwitchConfiguration + +/** + * Cluster On/off Switch Configuration + * + * Attributes and commands for configuring On/Off switching devices. + */ +MTR_DEPRECATED("OnOffSwitchConfiguration is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBaseClusterOnOffSwitchConfiguration : MTRGenericBaseCluster + +- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterOnOffSwitchConfiguration (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("OnOffSwitchConfiguration is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRBaseClusterOnOffSwitchConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSwitchTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchActionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSwitchActionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchActionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +/** + * Cluster On/off Switch Configuration + * Attributes and commands for configuring On/Off switching devices. + */ +MTR_DEPRECATED("OnOffSwitchConfiguration is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRClusterOnOffSwitchConfiguration : MTRGenericCluster + +- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterOnOffSwitchConfiguration (Availability) + +/** + * The queue is currently unused, but may be used in the future for calling completions + * for command invocations if commands are added to this cluster. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("OnOffSwitchConfiguration is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRClusterOnOffSwitchConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +#pragma mark - Clusters that were removed wholesale: BinaryInputBasic + +/** + * Cluster Binary Input (Basic) + * + * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. + */ +MTR_DEPRECATED("BinaryInputBasic is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBaseClusterBinaryInputBasic : MTRGenericBaseCluster + +- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterBinaryInputBasic (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("BinaryInputBasic is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRBaseClusterBinaryInputBasic (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveTextWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveTextWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDescriptionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDescriptionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInactiveTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInactiveTextWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInactiveTextWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInactiveTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInactiveTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutOfServiceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutOfServiceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutOfServiceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePolarityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePolarityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePolarityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePolarityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePresentValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePresentValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePresentValueWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePresentValueWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePresentValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePresentValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReliabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeReliabilityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeReliabilityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReliabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReliabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusFlagsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusFlagsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusFlagsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +/** + * Cluster Binary Input (Basic) + * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. + */ +MTR_DEPRECATED("BinaryInputBasic is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRClusterBinaryInputBasic : MTRGenericCluster + +- (NSDictionary * _Nullable)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterBinaryInputBasic (Availability) + +/** + * The queue is currently unused, but may be used in the future for calling completions + * for command invocations if commands are added to this cluster. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("BinaryInputBasic is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRClusterBinaryInputBasic (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +#pragma mark - Clusters that were removed wholesale: BarrierControl + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull percentOpen MTR_DEPRECATED("The percentOpen field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +/** + * Cluster Barrier Control + * + * This cluster provides control of a barrier (garage door). + */ +MTR_DEPRECATED("BarrierControl is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBaseClusterBarrierControl : MTRGenericBaseCluster + +/** + * Command BarrierControlGoToPercent + * + * Command to instruct a barrier to go to a percent open state. + */ +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +/** + * Command BarrierControlStop + * + * Command that instructs the barrier to stop moving. + */ +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion + MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterBarrierControl (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("BarrierControl is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRBaseClusterBarrierControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use barrierControlGoToPercentWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use barrierControlStopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use barrierControlStopWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierMovingStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierMovingStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierMovingStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierSafetyStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCapabilitiesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCloseEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCloseEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCloseEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCommandOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCommandCloseEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierOpenPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierClosePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierClosePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierClosePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +/** + * Cluster Barrier Control + * This cluster provides control of a barrier (garage door). + */ +MTR_DEPRECATED("BarrierControl is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRClusterBarrierControl : MTRGenericCluster + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterBarrierControl (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("BarrierControl is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRClusterBarrierControl (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlGoToPercentWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlStopWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlStopWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + +#pragma mark - Clusters that were removed wholesale: ElectricalMeasurement + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull profileCount MTR_DEPRECATED("The profileCount field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod MTR_DEPRECATED("The profileIntervalPeriod field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull maxNumberOfIntervals MTR_DEPRECATED("The maxNumberOfIntervals field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSArray * _Nonnull listOfAttributes MTR_DEPRECATED("The listOfAttributes field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_DEPRECATED("This command has been removed", ios(17.0, 18.2), macos(14.0, 15.2), watchos(10.0, 11.2), tvos(17.0, 18.2)); +@end + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_DEPRECATED("The startTime field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull status MTR_DEPRECATED("The status field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod MTR_DEPRECATED("The profileIntervalPeriod field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervalsDelivered MTR_DEPRECATED("The numberOfIntervalsDelivered field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull attributeId MTR_DEPRECATED("The attributeId field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSArray * _Nonnull intervals MTR_DEPRECATED("The intervals field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +/** + * Initialize an MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_DEPRECATED("This command has been removed", ios(17.0, 18.2), macos(14.0, 15.2), watchos(10.0, 11.2), tvos(17.0, 18.2)); +@end + +MTR_DEPRECATED("This command has been removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull attributeId MTR_DEPRECATED("The attributeId field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_DEPRECATED("The startTime field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervals MTR_DEPRECATED("The numberOfIntervals field will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +/** + * Cluster Electrical Measurement + * + * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. + */ +MTR_DEPRECATED("ElectricalMeasurement is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRBaseClusterElectricalMeasurement : MTRGenericBaseCluster + +/** + * Command GetProfileInfoCommand + * + * A function which retrieves the power profiling information from the electrical measurement server. + */ +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion + MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +/** + * Command GetMeasurementProfileCommand + * + * A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. + */ +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_DEPRECATED("This attribute is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRBaseClusterElectricalMeasurement (Availability) + +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("ElectricalMeasurement is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRBaseClusterElectricalMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use getProfileInfoCommandWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use getProfileInfoCommandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use getMeasurementProfileCommandWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasurementTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasurementTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasurementTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeutralCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNeutralCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeutralCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalActivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalActivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalActivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalReactivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalReactivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalReactivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalApparentPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalApparentPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalApparentPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured1stHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured3rdHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured5thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured7thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured9thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured11thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHarmonicCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousLineCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousActiveCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousReactiveCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcPowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcPowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverloadAlarmsMaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVoltageOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVoltageOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVoltageOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcOverloadAlarmsMaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcActivePowerOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcReactivePowerOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +/** + * Cluster Electrical Measurement + * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. + */ +MTR_DEPRECATED("ElectricalMeasurement is deprecated and will be removed", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)) +@interface MTRClusterElectricalMeasurement : MTRGenericCluster + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_DEPRECATED("This command is deprecated", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_DEPRECATED("This attribute is deprecated", ios(16.1, 18.2), macos(13.0, 15.2), watchos(9.1, 11.2), tvos(16.1, 18.2)); + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +@interface MTRClusterElectricalMeasurement (Availability) + +/** + * For all instance methods that take a completion (i.e. command invocations), + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_DEPRECATED("ElectricalMeasurement is deprecated and will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)); + +@end + +@interface MTRClusterElectricalMeasurement (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getProfileInfoCommandWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getProfileInfoCommandWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getMeasurementProfileCommandWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end + +// Note: Add new shims that are not entire cluster removals above the "Clusters that were removed wholesale:" bits + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm index d74b24b8194939..81c535db6ddf75 100644 --- a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm @@ -17,8 +17,14896 @@ #import #import +#import + +#import "MTRBaseClusters_Internal.h" +#import "MTRBaseDevice_Internal.h" + +#import "MTRCallbackBridgeBase.h" +#import "MTRClusterStateCacheContainer_Internal.h" +#import "MTRCluster_Internal.h" +#import "MTRCommandPayloadsObjc.h" +#import "MTRDefines_Internal.h" +#import "MTRDevice_Internal.h" +#import "MTRLogging_Internal.h" +#import "MTRStructsObjc.h" +#import "NSDataSpanConversion.h" +#import "NSStringSpanConversion.h" + +#include +#include +#include +#include +#include + +#include + +using namespace chip::app::Clusters; +using chip::SessionHandle; +using chip::Messaging::ExchangeManager; /** * This file defines implementations of manual backwards-compat shims of various sorts to handle * API changes that happened. */ + +namespace { + +typedef void (*DefaultSuccessCallbackType)(void *); + +class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { +public: + MTRDefaultSuccessCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) + : MTRCallbackBridge(queue, handler, action, OnSuccessFn) {}; + + static void OnSuccessFn(void * context) + { + DispatchSuccess(context, nil); + } +}; + +} // anonymous namespace + +#pragma mark - Clusters that were removed wholesale: OnOffSwitchConfiguration + +@implementation MTRBaseClusterOnOffSwitchConfiguration + +- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterOnOffSwitchConfiguration (Deprecated) + +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSwitchTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchActionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSwitchActionsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSwitchActionsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSwitchActionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSwitchActionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterOnOffSwitchConfiguration + +- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; +} + +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSwitchActionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterOnOffSwitchConfiguration (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +#pragma mark - Clusters that were removed wholesale: BinaryInputBasic + +@implementation MTRBaseClusterBinaryInputBasic + +- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterBinaryInputBasic (Deprecated) + +- (void)readAttributeActiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveTextWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveTextWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveTextWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDescriptionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDescriptionWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInactiveTextWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInactiveTextWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInactiveTextWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInactiveTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInactiveTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutOfServiceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOutOfServiceWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOutOfServiceWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOutOfServiceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutOfServiceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePolarityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePolarityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePolarityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePolarityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePresentValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePresentValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePresentValueWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePresentValueWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePresentValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePresentValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReliabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReliabilityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeReliabilityWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeReliabilityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReliabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReliabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusFlagsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStatusFlagsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusFlagsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeApplicationTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApplicationTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterBinaryInputBasic + +- (NSDictionary * _Nullable)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; +} + +- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeActiveTextWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; +} + +- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDescriptionWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; +} + +- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeInactiveTextWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; +} + +- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOutOfServiceWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; +} + +- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePresentValueWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; +} + +- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeReliabilityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterBinaryInputBasic (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +#pragma mark - Clusters that were removed wholesale: BarrierControl + +@implementation MTRBaseClusterBarrierControl + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion +{ + [self barrierControlStopWithParams:nil completion:completion]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBarrierControlClusterBarrierControlStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BarrierControl::Commands::BarrierControlStop::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterBarrierControl (Deprecated) + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlGoToPercentWithParams:params completion: + completionHandler]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:params completion: + completionHandler]; +} +- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:nil completionHandler:completionHandler]; +} + +- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierMovingStateWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierMovingStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierMovingStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierSafetyStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierSafetyStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCapabilitiesWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierCapabilitiesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenEventsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierOpenEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCloseEventsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCloseEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCloseEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierCloseEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandOpenEventsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierCommandOpenEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandCloseEventsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierCommandCloseEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierCommandCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenPeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierOpenPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierOpenPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBarrierClosePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierClosePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierClosePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierPositionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBarrierPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBarrierPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterBarrierControl + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRBarrierControlClusterBarrierControlStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BarrierControl::Commands::BarrierControlStop::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; +} + +- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; +} + +- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierCloseEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; +} + +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierCommandOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; +} + +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierCommandCloseEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; +} + +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; +} + +- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeBarrierClosePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterBarrierControl (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlGoToPercentWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +} +@end + +@interface MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams +- (instancetype)init +{ + if (self = [super init]) { + + _percentOpen = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + + other.percentOpen = self.percentOpen; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; + return descriptionString; +} + +@end + +@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRBarrierControlClusterBarrierControlStopParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +#pragma mark - Clusters that were removed wholesale: ElectricalMeasurement + +@implementation MTRBaseClusterElectricalMeasurement + +- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion +{ + [self getProfileInfoCommandWithParams:nil completion:completion]; +} +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterElectricalMeasurement (Deprecated) + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:params completion: + completionHandler]; +} +- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; +} +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getMeasurementProfileCommandWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasurementTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasurementTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasurementTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcVoltageMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcVoltageMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcCurrentMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcCurrentMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcPowerMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcPowerMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcVoltageMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcVoltageDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcVoltageDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcCurrentDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcCurrentDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcPowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDcPowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDcPowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcFrequencyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcFrequencyMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcFrequencyMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeutralCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNeutralCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeutralCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalActivePowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTotalActivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalActivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalReactivePowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTotalReactivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalReactivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalApparentPowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTotalApparentPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalApparentPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured1stHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured1stHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured3rdHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured3rdHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured5thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured5thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured7thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured7thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured9thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured9thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured11thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasured11thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcFrequencyMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcFrequencyDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcFrequencyDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHarmonicCurrentMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHarmonicCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHarmonicCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhaseHarmonicCurrentMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstantaneousVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousLineCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstantaneousLineCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousLineCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousActiveCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstantaneousActiveCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousActiveCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousReactiveCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstantaneousReactiveCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousReactiveCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousPowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstantaneousPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInstantaneousPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReactivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeApparentPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerFactorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsUnderVoltageCounterWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSagPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSwellPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcVoltageMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcVoltageDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcCurrentDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerMultiplierWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcPowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerDivisorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcPowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcPowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverloadAlarmsMaskWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOverloadAlarmsMaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverloadAlarmsMaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVoltageOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeVoltageOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVoltageOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcOverloadAlarmsMaskWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcOverloadAlarmsMaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcOverloadAlarmsMaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcVoltageOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcVoltageOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcCurrentOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcCurrentOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcActivePowerOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcActivePowerOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcActivePowerOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcReactivePowerOverloadWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcReactivePowerOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcReactivePowerOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsOverVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsUnderVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeOverVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeUnderVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSagWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSwellWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLineCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReactiveCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltagePhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReactivePowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeApparentPowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerFactorPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLineCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReactiveCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactiveCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltagePhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltagePhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsCurrentMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActivePowerMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActivePowerMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReactivePowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReactivePowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeApparentPowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerFactorPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRClusterElectricalMeasurement + +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; +} + +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; +} + +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAverageRmsUnderVoltageCounterWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; +} + +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; +} + +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; +} + +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeRmsVoltageSagPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; +} + +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeRmsVoltageSwellPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; +} + +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeOverloadAlarmsMaskWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; +} + +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeAcOverloadAlarmsMaskWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterElectricalMeasurement (Deprecated) + +- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; +} +- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler +{ + [self getMeasurementProfileCommandWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: + completionHandler]; +} +@end + +@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct; + +@end + +@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct; + +@end + +@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams +- (instancetype)init +{ + if (self = [super init]) { + + _profileCount = @(0); + + _profileIntervalPeriod = @(0); + + _maxNumberOfIntervals = @(0); + + _listOfAttributes = [NSArray array]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; + + other.profileCount = self.profileCount; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.maxNumberOfIntervals = self.maxNumberOfIntervals; + other.listOfAttributes = self.listOfAttributes; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: profileCount:%@; profileIntervalPeriod:%@; maxNumberOfIntervals:%@; listOfAttributes:%@; >", NSStringFromClass([self class]), _profileCount, _profileIntervalPeriod, _maxNumberOfIntervals, _listOfAttributes]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct +{ + { + self.profileCount = [NSNumber numberWithUnsignedChar:decodableStruct.profileCount]; + } + { + self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; + } + { + self.maxNumberOfIntervals = [NSNumber numberWithUnsignedChar:decodableStruct.maxNumberOfIntervals]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.listOfAttributes.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.listOfAttributes = array_0; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +@implementation MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams +- (instancetype)init +{ + if (self = [super init]) { + + _startTime = @(0); + + _status = @(0); + + _profileIntervalPeriod = @(0); + + _numberOfIntervalsDelivered = @(0); + + _attributeId = @(0); + + _intervals = [NSArray array]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; + + other.startTime = self.startTime; + other.status = self.status; + other.profileIntervalPeriod = self.profileIntervalPeriod; + other.numberOfIntervalsDelivered = self.numberOfIntervalsDelivered; + other.attributeId = self.attributeId; + other.intervals = self.intervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; status:%@; profileIntervalPeriod:%@; numberOfIntervalsDelivered:%@; attributeId:%@; intervals:%@; >", NSStringFromClass([self class]), _startTime, _status, _profileIntervalPeriod, _numberOfIntervalsDelivered, _attributeId, _intervals]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct +{ + { + self.startTime = [NSNumber numberWithUnsignedInt:decodableStruct.startTime]; + } + { + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; + } + { + self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; + } + { + self.numberOfIntervalsDelivered = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfIntervalsDelivered]; + } + { + self.attributeId = [NSNumber numberWithUnsignedShort:decodableStruct.attributeId]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.intervals.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.intervals = array_0; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams +- (instancetype)init +{ + if (self = [super init]) { + + _attributeId = @(0); + + _startTime = @(0); + + _numberOfIntervals = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; + + other.attributeId = self.attributeId; + other.startTime = self.startTime; + other.numberOfIntervals = self.numberOfIntervals; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; startTime:%@; numberOfIntervals:%@; >", NSStringFromClass([self class]), _attributeId, _startTime, _numberOfIntervals]; + return descriptionString; +} + +@end + +@implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.attributeId = self.attributeId.unsignedShortValue; + } + { + encodableStruct.startTime = self.startTime.unsignedIntValue; + } + { + encodableStruct.numberOfIntervals = self.numberOfIntervals.unsignedCharValue; + } + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + +// Note: Add new shims that are not entire cluster removals above the "Clusters that were removed wholesale:" bits diff --git a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt index 1f5c8dd3404f6a..6ca88e84dcad1a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN * * {{description}} */ -{{availability (asUpperCamelCase name preserveAcronyms=true)}} +{{availability (asUpperCamelCase name preserveAcronyms=true) deprecationMessage=(concat (asUpperCamelCase name preserveAcronyms=true) " is deprecated and will be removed")}} @interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRGenericBaseCluster {{#zcl_commands}} @@ -29,20 +29,20 @@ NS_ASSUME_NONNULL_BEGIN * * {{description}} */ -- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField }}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField }}_Nullable{{/unless}})params completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This command is deprecated"}}; {{#unless commandHasRequiredField}} - (void){{asLowerCamelCase name}}WithCompletion:({{>command_completion_type command=.}})completion {{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} {{#if (and (isStrEqual command "KeySetReadAllIndices") (isStrEqual cluster "GroupKeyManagement"))}} -{{availability cluster command=command minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691"}}; +{{availability cluster command=command minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691" deprecationMessage="This command is deprecated"}}; {{else}} {{#if (isInConfigList (concat (asUpperCamelCase cluster preserveAcronyms=true) "::" (asUpperCamelCase command preserveAcronyms=true)) "LegacyCommandsWithOnlyOptionalArguments")}} -{{availability cluster command=command minimalRelease="ADDB2DC1-4701-4696-87EB-87CD1123BE1A"}}; +{{availability cluster command=command minimalRelease="ADDB2DC1-4701-4696-87EB-87CD1123BE1A" deprecationMessage="This command is deprecated"}}; {{else}} -{{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +{{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This command is deprecated"}}; {{/if}} {{/if}} {{/unless}} @@ -62,16 +62,16 @@ NS_ASSUME_NONNULL_BEGIN {{~else~}} Completion: {{~/if_is_fabric_scoped_struct~}} -(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This attribute is deprecated"}}; {{#if (or isWritableAttribute (isInConfigList (concat (asUpperCamelCase parent.name) "::" label) "DarwinForceWritable"))}} -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; -- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value completion:(MTRStatusCompletion)completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This attribute is deprecated"}}; +- (void)write{{>attribute}}WithValue:({{asObjectiveCType type parent.name}})value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This attribute is deprecated"}}; {{/if}} {{#if isReportableAttribute}} - (void) subscribe{{>attribute}}WithParams:(MTRSubscribeParams *)params -subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; -+ (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))reportHandler {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This attribute is deprecated"}}; ++ (void) read{{>attribute}}WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)({{asObjectiveCClass type parent.name}} * _Nullable value, NSError * _Nullable error))completion {{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This attribute is deprecated"}}; {{/if}} {{/if}} {{/zcl_attributes_server}} @@ -89,7 +89,7 @@ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptio */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; + queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage=(concat (asUpperCamelCase name preserveAcronyms=true) " is deprecated and will be removed")}}; @end {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt index 98d6d6b35431b1..c6157548049cce 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusterConstants.zapt @@ -18,6 +18,8 @@ MTRCluster{{compatClusterNameRemapping label}}ID {{availability (compatClusterNa MTRClusterIDType{{>cluster}}ID {{availability (asUpperCamelCase label preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" isForIds=true deprecationMessage=(concat "The " (asUpperCamelCase label preserveAcronyms=true) " cluster will be removed")}} = {{asMEI manufacturerCode code}}, {{/if}} {{/zcl_clusters}} + +{{> cluster_id_shims}} }; #pragma mark - Attributes IDs @@ -112,6 +114,8 @@ MTRAttributeIDTypeCluster{{compatClusterNameRemapping ../clusterName}}Attribute{ {{> attributeIDs clusterName=label}} {{/zcl_clusters}} + +{{> attribute_id_shims}} }; #pragma mark - Commands IDs @@ -174,6 +178,8 @@ MTRCommandIDTypeCluster{{cluster}}Command{{command}}ID {{availability cluster co {{> commandIDs clusterName=label}} {{/zcl_clusters}} + +{{> command_id_shims}} }; #pragma mark - Events IDs diff --git a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt index ebcd299d0871f4..7133770c7efb8c 100644 --- a/src/darwin/Framework/CHIP/templates/MTRClusters.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRClusters.zapt @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN * Cluster {{name}} * {{description}} */ -{{availability (asUpperCamelCase name preserveAcronyms=true)}} +{{availability (asUpperCamelCase name preserveAcronyms=true) deprecationMessage=(concat (asUpperCamelCase name preserveAcronyms=true) " is deprecated and will be removed")}} @interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRGenericCluster {{#zcl_commands}} @@ -24,20 +24,20 @@ NS_ASSUME_NONNULL_BEGIN {{! Takes two arguments: cluster name and command name, plus the ambient state where the command is "this" }} {{#*inline "commandDecl"}} {{#if (isSupported cluster command=command)}} -- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +- (void){{asLowerCamelCase name}}WithParams:(MTR{{cluster}}Cluster{{command}}Params * {{#unless commandHasRequiredField}}_Nullable{{/unless}})params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This command is deprecated"}}; {{#unless commandHasRequiredField}} - (void){{asLowerCamelCase name}}WithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:({{>command_completion_type command=.}})completion {{! KeySetReadAllIndices grew this params-less API later _after_ it had already been shipped, so it needs to be special-cased here }} {{#if (and (isStrEqual command "KeySetReadAllIndices") (isStrEqual cluster "GroupKeyManagement"))}} -{{availability cluster command=command minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691"}}; +{{availability cluster command=command minimalRelease="3C23F160-13CE-4397-BC65-122B61E4D691" deprecationMessage="This command is deprecated"}}; {{else}} {{#if (isInConfigList (concat (asUpperCamelCase cluster preserveAcronyms=true) "::" (asUpperCamelCase command preserveAcronyms=true)) "LegacyCommandsWithOnlyOptionalArguments")}} -{{availability cluster command=command minimalRelease="ADDB2DC1-4701-4696-87EB-87CD1123BE1A"}}; +{{availability cluster command=command minimalRelease="ADDB2DC1-4701-4696-87EB-87CD1123BE1A" deprecationMessage="This command is deprecated"}}; {{else}} -{{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; +{{availability cluster command=command minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage="This command is deprecated"}}; {{/if}} {{/if}} {{/unless}} @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN (isSupported (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)))}} {{#*inline "attribute"}}Attribute{{asUpperCamelCase name preserveAcronyms=true}}{{/inline}} {{#*inline "availability"}} -{{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true)}} +{{availability (asUpperCamelCase parent.name preserveAcronyms=true) attribute=(asUpperCamelCase name preserveAcronyms=true) deprecationMessage="This attribute is deprecated"}} {{/inline}} - (NSDictionary * _Nullable)read{{>attribute}}WithParams:(MTRReadParams * _Nullable)params {{> availability}}; {{#if (or isWritableAttribute @@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN */ - (instancetype _Nullable)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE"}}; + queue:(dispatch_queue_t)queue {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="267F4B03-3256-4056-A62D-5237640FDCFE" deprecationMessage=(concat (asUpperCamelCase name preserveAcronyms=true) " is deprecated and will be removed")}}; @end diff --git a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt index 098769fe0a4995..ea67a6b8d4cf7a 100644 --- a/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt +++ b/src/darwin/Framework/CHIP/templates/MTRCommandPayloads_Internal.zapt @@ -36,4 +36,4 @@ NS_ASSUME_NONNULL_BEGIN - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index b46832a986d264..a8d32569d1aa92 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9937,6 +9937,11 @@ - ColorCapabilities - ColorLoopUpdateFlags removed: + clusters: + - BarrierControl + - BinaryInputBasic + - ElectricalMeasurement + - OnOffSwitchConfiguration enum values: ColorControl: # Don't expose the new value names on the old enum names diff --git a/src/darwin/Framework/CHIP/templates/partials/attribute_id_shims.zapt b/src/darwin/Framework/CHIP/templates/partials/attribute_id_shims.zapt new file mode 100644 index 00000000000000..293ba8db5f4087 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/attribute_id_shims.zapt @@ -0,0 +1,691 @@ + // Cluster BarrierControl deprecated attribute names + MTRClusterBarrierControlAttributeBarrierMovingStateID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + MTRClusterBarrierControlAttributeBarrierSafetyStatusID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000002, + MTRClusterBarrierControlAttributeBarrierCapabilitiesID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000003, + MTRClusterBarrierControlAttributeBarrierOpenEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000004, + MTRClusterBarrierControlAttributeBarrierCloseEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000005, + MTRClusterBarrierControlAttributeBarrierCommandOpenEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000006, + MTRClusterBarrierControlAttributeBarrierCommandCloseEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000007, + MTRClusterBarrierControlAttributeBarrierOpenPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000008, + MTRClusterBarrierControlAttributeBarrierClosePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000009, + MTRClusterBarrierControlAttributeBarrierPositionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000000A, + MTRClusterBarrierControlAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBarrierControlAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBarrierControlAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBarrierControlAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBarrierControlAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster BarrierControl attributes + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID MTR_DEPRECATED("The BarrierMovingState attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID MTR_DEPRECATED("The BarrierSafetyStatus attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000002, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID MTR_DEPRECATED("The BarrierCapabilities attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000003, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID MTR_DEPRECATED("The BarrierOpenEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000004, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID MTR_DEPRECATED("The BarrierCloseEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000005, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID MTR_DEPRECATED("The BarrierCommandOpenEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000006, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID MTR_DEPRECATED("The BarrierCommandCloseEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000007, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID MTR_DEPRECATED("The BarrierOpenPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000008, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID MTR_DEPRECATED("The BarrierClosePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000009, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID MTR_DEPRECATED("The BarrierPosition attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000000A, + MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster BinaryInputBasic deprecated attribute names + MTRClusterBinaryInputBasicAttributeActiveTextID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000004, + MTRClusterBinaryInputBasicAttributeDescriptionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000001C, + MTRClusterBinaryInputBasicAttributeInactiveTextID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000002E, + MTRClusterBinaryInputBasicAttributeOutOfServiceID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000051, + MTRClusterBinaryInputBasicAttributePolarityID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000054, + MTRClusterBinaryInputBasicAttributePresentValueID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000055, + MTRClusterBinaryInputBasicAttributeReliabilityID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000067, + MTRClusterBinaryInputBasicAttributeStatusFlagsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000006F, + MTRClusterBinaryInputBasicAttributeApplicationTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000100, + MTRClusterBinaryInputBasicAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBinaryInputBasicAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBinaryInputBasicAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBinaryInputBasicAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBinaryInputBasicAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster BinaryInputBasic attributes + MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID MTR_DEPRECATED("The ActiveText attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000004, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID MTR_DEPRECATED("The Description attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000001C, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID MTR_DEPRECATED("The InactiveText attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000002E, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID MTR_DEPRECATED("The OutOfService attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000051, + MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID MTR_DEPRECATED("The Polarity attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000054, + MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID MTR_DEPRECATED("The PresentValue attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000055, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID MTR_DEPRECATED("The Reliability attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000067, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID MTR_DEPRECATED("The StatusFlags attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000006F, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID MTR_DEPRECATED("The ApplicationType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000100, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ElectricalMeasurement deprecated attribute names + MTRClusterElectricalMeasurementAttributeMeasurementTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementAttributeDcVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000100, + MTRClusterElectricalMeasurementAttributeDcVoltageMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000101, + MTRClusterElectricalMeasurementAttributeDcVoltageMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000102, + MTRClusterElectricalMeasurementAttributeDcCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000103, + MTRClusterElectricalMeasurementAttributeDcCurrentMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000104, + MTRClusterElectricalMeasurementAttributeDcCurrentMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000105, + MTRClusterElectricalMeasurementAttributeDcPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000106, + MTRClusterElectricalMeasurementAttributeDcPowerMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000107, + MTRClusterElectricalMeasurementAttributeDcPowerMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000108, + MTRClusterElectricalMeasurementAttributeDcVoltageMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000200, + MTRClusterElectricalMeasurementAttributeDcVoltageDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000201, + MTRClusterElectricalMeasurementAttributeDcCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000202, + MTRClusterElectricalMeasurementAttributeDcCurrentDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000203, + MTRClusterElectricalMeasurementAttributeDcPowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000204, + MTRClusterElectricalMeasurementAttributeDcPowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000205, + MTRClusterElectricalMeasurementAttributeAcFrequencyID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000300, + MTRClusterElectricalMeasurementAttributeAcFrequencyMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000301, + MTRClusterElectricalMeasurementAttributeAcFrequencyMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000302, + MTRClusterElectricalMeasurementAttributeNeutralCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000303, + MTRClusterElectricalMeasurementAttributeTotalActivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000304, + MTRClusterElectricalMeasurementAttributeTotalReactivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000305, + MTRClusterElectricalMeasurementAttributeTotalApparentPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000306, + MTRClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000307, + MTRClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000308, + MTRClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000309, + MTRClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030A, + MTRClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030B, + MTRClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030C, + MTRClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030D, + MTRClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030E, + MTRClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030F, + MTRClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000310, + MTRClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000311, + MTRClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000312, + MTRClusterElectricalMeasurementAttributeAcFrequencyMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000400, + MTRClusterElectricalMeasurementAttributeAcFrequencyDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000401, + MTRClusterElectricalMeasurementAttributePowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000402, + MTRClusterElectricalMeasurementAttributePowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000403, + MTRClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000404, + MTRClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000405, + MTRClusterElectricalMeasurementAttributeInstantaneousVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000500, + MTRClusterElectricalMeasurementAttributeInstantaneousLineCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000501, + MTRClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000502, + MTRClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000503, + MTRClusterElectricalMeasurementAttributeInstantaneousPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000504, + MTRClusterElectricalMeasurementAttributeRmsVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000505, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000506, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000507, + MTRClusterElectricalMeasurementAttributeRmsCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000508, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000509, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050A, + MTRClusterElectricalMeasurementAttributeActivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050B, + MTRClusterElectricalMeasurementAttributeActivePowerMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050D, + MTRClusterElectricalMeasurementAttributeReactivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050E, + MTRClusterElectricalMeasurementAttributeApparentPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050F, + MTRClusterElectricalMeasurementAttributePowerFactorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000510, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000511, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000513, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000514, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000515, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000516, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000517, + MTRClusterElectricalMeasurementAttributeAcVoltageMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000600, + MTRClusterElectricalMeasurementAttributeAcVoltageDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000601, + MTRClusterElectricalMeasurementAttributeAcCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000602, + MTRClusterElectricalMeasurementAttributeAcCurrentDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000603, + MTRClusterElectricalMeasurementAttributeAcPowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000604, + MTRClusterElectricalMeasurementAttributeAcPowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000605, + MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000700, + MTRClusterElectricalMeasurementAttributeVoltageOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000701, + MTRClusterElectricalMeasurementAttributeCurrentOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000702, + MTRClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000800, + MTRClusterElectricalMeasurementAttributeAcVoltageOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000801, + MTRClusterElectricalMeasurementAttributeAcCurrentOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000802, + MTRClusterElectricalMeasurementAttributeAcActivePowerOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000803, + MTRClusterElectricalMeasurementAttributeAcReactivePowerOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000804, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000805, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000806, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000807, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000808, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000809, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000080A, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000901, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000902, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000903, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000905, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000906, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000907, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000908, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000909, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000910, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000911, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000912, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000913, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000914, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000915, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000916, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000917, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A01, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A02, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A03, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A05, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A06, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A07, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A08, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A09, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A10, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A11, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A12, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A13, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A14, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A15, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A16, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A17, + MTRClusterElectricalMeasurementAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterElectricalMeasurementAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterElectricalMeasurementAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterElectricalMeasurementAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterElectricalMeasurementAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster ElectricalMeasurement attributes + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID MTR_DEPRECATED("The MeasurementType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID MTR_DEPRECATED("The DcVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000100, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID MTR_DEPRECATED("The DcVoltageMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000101, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID MTR_DEPRECATED("The DcVoltageMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000102, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID MTR_DEPRECATED("The DcCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000103, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID MTR_DEPRECATED("The DcCurrentMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000104, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID MTR_DEPRECATED("The DcCurrentMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000105, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID MTR_DEPRECATED("The DcPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000106, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID MTR_DEPRECATED("The DcPowerMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000107, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID MTR_DEPRECATED("The DcPowerMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000108, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID MTR_DEPRECATED("The DcVoltageMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000200, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID MTR_DEPRECATED("The DcVoltageDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000201, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID MTR_DEPRECATED("The DcCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000202, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID MTR_DEPRECATED("The DcCurrentDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000203, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID MTR_DEPRECATED("The DcPowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000204, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID MTR_DEPRECATED("The DcPowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000205, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID MTR_DEPRECATED("The AcFrequency attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000300, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID MTR_DEPRECATED("The AcFrequencyMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000301, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID MTR_DEPRECATED("The AcFrequencyMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000302, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID MTR_DEPRECATED("The NeutralCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000303, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID MTR_DEPRECATED("The TotalActivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000304, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID MTR_DEPRECATED("The TotalReactivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000305, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID MTR_DEPRECATED("The TotalApparentPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000306, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID MTR_DEPRECATED("The Measured1stHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000307, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID MTR_DEPRECATED("The Measured3rdHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000308, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID MTR_DEPRECATED("The Measured5thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000309, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID MTR_DEPRECATED("The Measured7thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID MTR_DEPRECATED("The Measured9thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID MTR_DEPRECATED("The Measured11thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase1stHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase3rdHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase5thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase7thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000310, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase9thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000311, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase11thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000312, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID MTR_DEPRECATED("The AcFrequencyMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000400, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID MTR_DEPRECATED("The AcFrequencyDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000401, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID MTR_DEPRECATED("The PowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000402, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID MTR_DEPRECATED("The PowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000403, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID MTR_DEPRECATED("The HarmonicCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000404, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID MTR_DEPRECATED("The PhaseHarmonicCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000405, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID MTR_DEPRECATED("The InstantaneousVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000500, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID MTR_DEPRECATED("The InstantaneousLineCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000501, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID MTR_DEPRECATED("The InstantaneousActiveCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000502, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID MTR_DEPRECATED("The InstantaneousReactiveCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000503, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID MTR_DEPRECATED("The InstantaneousPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000504, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID MTR_DEPRECATED("The RmsVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000505, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID MTR_DEPRECATED("The RmsVoltageMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000506, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID MTR_DEPRECATED("The RmsVoltageMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000507, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID MTR_DEPRECATED("The RmsCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000508, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID MTR_DEPRECATED("The RmsCurrentMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000509, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID MTR_DEPRECATED("The RmsCurrentMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID MTR_DEPRECATED("The ActivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID MTR_DEPRECATED("The ActivePowerMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID MTR_DEPRECATED("The ActivePowerMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID MTR_DEPRECATED("The ReactivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID MTR_DEPRECATED("The ApparentPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID MTR_DEPRECATED("The PowerFactor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000510, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000511, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID MTR_DEPRECATED("The AverageRmsUnderVoltageCounter attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000513, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000514, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000515, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID MTR_DEPRECATED("The RmsVoltageSagPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000516, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID MTR_DEPRECATED("The RmsVoltageSwellPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000517, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID MTR_DEPRECATED("The AcVoltageMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000600, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID MTR_DEPRECATED("The AcVoltageDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000601, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID MTR_DEPRECATED("The AcCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000602, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID MTR_DEPRECATED("The AcCurrentDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000603, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID MTR_DEPRECATED("The AcPowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000604, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID MTR_DEPRECATED("The AcPowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000605, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID MTR_DEPRECATED("The OverloadAlarmsMask attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000700, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID MTR_DEPRECATED("The VoltageOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000701, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID MTR_DEPRECATED("The CurrentOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000702, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID MTR_DEPRECATED("The AcOverloadAlarmsMask attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000800, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID MTR_DEPRECATED("The AcVoltageOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000801, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID MTR_DEPRECATED("The AcCurrentOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000802, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID MTR_DEPRECATED("The AcActivePowerOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000803, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID MTR_DEPRECATED("The AcReactivePowerOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000804, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID MTR_DEPRECATED("The AverageRmsOverVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000805, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID MTR_DEPRECATED("The AverageRmsUnderVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000806, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID MTR_DEPRECATED("The RmsExtremeOverVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000807, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID MTR_DEPRECATED("The RmsExtremeUnderVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000808, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID MTR_DEPRECATED("The RmsVoltageSag attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000809, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID MTR_DEPRECATED("The RmsVoltageSwell attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000080A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID MTR_DEPRECATED("The LineCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000901, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID MTR_DEPRECATED("The ActiveCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000902, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID MTR_DEPRECATED("The ReactiveCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000903, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID MTR_DEPRECATED("The RmsVoltagePhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000905, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID MTR_DEPRECATED("The RmsVoltageMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000906, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID MTR_DEPRECATED("The RmsVoltageMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000907, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID MTR_DEPRECATED("The RmsCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000908, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID MTR_DEPRECATED("The RmsCurrentMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000909, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID MTR_DEPRECATED("The RmsCurrentMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID MTR_DEPRECATED("The ActivePowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID MTR_DEPRECATED("The ActivePowerMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID MTR_DEPRECATED("The ActivePowerMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID MTR_DEPRECATED("The ReactivePowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID MTR_DEPRECATED("The ApparentPowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID MTR_DEPRECATED("The PowerFactorPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000910, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000911, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID MTR_DEPRECATED("The AverageRmsOverVoltageCounterPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000912, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID MTR_DEPRECATED("The AverageRmsUnderVoltageCounterPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000913, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000914, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000915, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID MTR_DEPRECATED("The RmsVoltageSagPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000916, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID MTR_DEPRECATED("The RmsVoltageSwellPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000917, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID MTR_DEPRECATED("The LineCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A01, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID MTR_DEPRECATED("The ActiveCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A02, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID MTR_DEPRECATED("The ReactiveCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A03, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID MTR_DEPRECATED("The RmsVoltagePhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A05, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID MTR_DEPRECATED("The RmsVoltageMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A06, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID MTR_DEPRECATED("The RmsVoltageMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A07, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID MTR_DEPRECATED("The RmsCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A08, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID MTR_DEPRECATED("The RmsCurrentMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A09, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID MTR_DEPRECATED("The RmsCurrentMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID MTR_DEPRECATED("The ActivePowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID MTR_DEPRECATED("The ActivePowerMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID MTR_DEPRECATED("The ActivePowerMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID MTR_DEPRECATED("The ReactivePowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID MTR_DEPRECATED("The ApparentPowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID MTR_DEPRECATED("The PowerFactorPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A10, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A11, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID MTR_DEPRECATED("The AverageRmsOverVoltageCounterPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A12, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID MTR_DEPRECATED("The AverageRmsUnderVoltageCounterPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A13, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A14, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A15, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID MTR_DEPRECATED("The RmsVoltageSagPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A16, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID MTR_DEPRECATED("The RmsVoltageSwellPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A17, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster OnOffSwitchConfiguration deprecated attribute names + MTRClusterOnOffSwitchConfigurationAttributeSwitchTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000010, + MTRClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOnOffSwitchConfigurationAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOnOffSwitchConfigurationAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster OnOffSwitchConfiguration attributes + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID MTR_DEPRECATED("The SwitchType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID MTR_DEPRECATED("The SwitchActions attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000010, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, diff --git a/src/darwin/Framework/CHIP/templates/partials/cluster_id_shims.zapt b/src/darwin/Framework/CHIP/templates/partials/cluster_id_shims.zapt new file mode 100644 index 00000000000000..449c806256c024 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/cluster_id_shims.zapt @@ -0,0 +1,8 @@ + MTRClusterBarrierControlID MTR_DEPRECATED("Please use MTRClusterIDTypeBarrierControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000103, + MTRClusterIDTypeBarrierControlID MTR_DEPRECATED("The BarrierControl cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000103, + MTRClusterBinaryInputBasicID MTR_DEPRECATED("Please use MTRClusterIDTypeBinaryInputBasicID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000000F, + MTRClusterIDTypeBinaryInputBasicID MTR_DEPRECATED("The BinaryInputBasic cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000000F, + MTRClusterElectricalMeasurementID MTR_DEPRECATED("Please use MTRClusterIDTypeElectricalMeasurementID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000B04, + MTRClusterIDTypeElectricalMeasurementID MTR_DEPRECATED("The ElectricalMeasurement cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000B04, + MTRClusterOnOffSwitchConfigurationID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffSwitchConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000007, + MTRClusterIDTypeOnOffSwitchConfigurationID MTR_DEPRECATED("The OnOffSwitchConfiguration cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000007, diff --git a/src/darwin/Framework/CHIP/templates/partials/command_id_shims.zapt b/src/darwin/Framework/CHIP/templates/partials/command_id_shims.zapt new file mode 100644 index 00000000000000..4e63f41a26c8e1 --- /dev/null +++ b/src/darwin/Framework/CHIP/templates/partials/command_id_shims.zapt @@ -0,0 +1,31 @@ + // Cluster BarrierControl deprecated command id names + MTRClusterBarrierControlCommandBarrierControlGoToPercentID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterBarrierControlCommandBarrierControlStopID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + + // Cluster BarrierControl commands + MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID MTR_DEPRECATED("The BarrierControlGoToPercent command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID MTR_DEPRECATED("The BarrierControlStop command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + + // Cluster ElectricalMeasurement deprecated command id names + MTRClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementCommandGetProfileInfoCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + + // Cluster ElectricalMeasurement commands + MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID MTR_DEPRECATED("The GetProfileInfoResponseCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID MTR_DEPRECATED("The GetProfileInfoCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID MTR_DEPRECATED("The GetMeasurementProfileResponseCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID MTR_DEPRECATED("The GetMeasurementProfileCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, diff --git a/src/darwin/Framework/CHIP/templates/templates.json b/src/darwin/Framework/CHIP/templates/templates.json index df731d72ee2c4c..d7e4b2106bc98e 100644 --- a/src/darwin/Framework/CHIP/templates/templates.json +++ b/src/darwin/Framework/CHIP/templates/templates.json @@ -59,6 +59,18 @@ { "name": "renamed_struct_field_impl", "path": "partials/renamed_struct_field_impl.zapt" + }, + { + "name": "cluster_id_shims", + "path": "partials/cluster_id_shims.zapt" + }, + { + "name": "attribute_id_shims", + "path": "partials/attribute_id_shims.zapt" + }, + { + "name": "command_id_shims", + "path": "partials/command_id_shims.zapt" } ], "templates": [ diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index b2da0cf9db04ad..6c1548f5159b70 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -128,39 +128,6 @@ static BOOL AttributeIsSpecifiedInOnOffCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInOnOffSwitchConfigurationCluster(AttributeId aAttributeId) -{ - using namespace Clusters::OnOffSwitchConfiguration; - switch (aAttributeId) { - case Attributes::SwitchType::Id: { - return YES; - } - case Attributes::SwitchActions::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInLevelControlCluster(AttributeId aAttributeId) { using namespace Clusters::LevelControl; @@ -230,60 +197,6 @@ static BOOL AttributeIsSpecifiedInLevelControlCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInBinaryInputBasicCluster(AttributeId aAttributeId) -{ - using namespace Clusters::BinaryInputBasic; - switch (aAttributeId) { - case Attributes::ActiveText::Id: { - return YES; - } - case Attributes::Description::Id: { - return YES; - } - case Attributes::InactiveText::Id: { - return YES; - } - case Attributes::OutOfService::Id: { - return YES; - } - case Attributes::Polarity::Id: { - return YES; - } - case Attributes::PresentValue::Id: { - return YES; - } - case Attributes::Reliability::Id: { - return YES; - } - case Attributes::StatusFlags::Id: { - return YES; - } - case Attributes::ApplicationType::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInPulseWidthModulationCluster(AttributeId aAttributeId) { using namespace Clusters::PulseWidthModulation; @@ -3800,63 +3713,6 @@ static BOOL AttributeIsSpecifiedInWindowCoveringCluster(AttributeId aAttributeId } } } -static BOOL AttributeIsSpecifiedInBarrierControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::BarrierControl; - switch (aAttributeId) { - case Attributes::BarrierMovingState::Id: { - return YES; - } - case Attributes::BarrierSafetyStatus::Id: { - return YES; - } - case Attributes::BarrierCapabilities::Id: { - return YES; - } - case Attributes::BarrierOpenEvents::Id: { - return YES; - } - case Attributes::BarrierCloseEvents::Id: { - return YES; - } - case Attributes::BarrierCommandOpenEvents::Id: { - return YES; - } - case Attributes::BarrierCommandCloseEvents::Id: { - return YES; - } - case Attributes::BarrierOpenPeriod::Id: { - return YES; - } - case Attributes::BarrierClosePeriod::Id: { - return YES; - } - case Attributes::BarrierPosition::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInServiceAreaCluster(AttributeId aAttributeId) { using namespace Clusters::ServiceArea; @@ -6119,417 +5975,6 @@ static BOOL AttributeIsSpecifiedInCommissionerControlCluster(AttributeId aAttrib } } } -static BOOL AttributeIsSpecifiedInElectricalMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::ElectricalMeasurement; - switch (aAttributeId) { - case Attributes::MeasurementType::Id: { - return YES; - } - case Attributes::DcVoltage::Id: { - return YES; - } - case Attributes::DcVoltageMin::Id: { - return YES; - } - case Attributes::DcVoltageMax::Id: { - return YES; - } - case Attributes::DcCurrent::Id: { - return YES; - } - case Attributes::DcCurrentMin::Id: { - return YES; - } - case Attributes::DcCurrentMax::Id: { - return YES; - } - case Attributes::DcPower::Id: { - return YES; - } - case Attributes::DcPowerMin::Id: { - return YES; - } - case Attributes::DcPowerMax::Id: { - return YES; - } - case Attributes::DcVoltageMultiplier::Id: { - return YES; - } - case Attributes::DcVoltageDivisor::Id: { - return YES; - } - case Attributes::DcCurrentMultiplier::Id: { - return YES; - } - case Attributes::DcCurrentDivisor::Id: { - return YES; - } - case Attributes::DcPowerMultiplier::Id: { - return YES; - } - case Attributes::DcPowerDivisor::Id: { - return YES; - } - case Attributes::AcFrequency::Id: { - return YES; - } - case Attributes::AcFrequencyMin::Id: { - return YES; - } - case Attributes::AcFrequencyMax::Id: { - return YES; - } - case Attributes::NeutralCurrent::Id: { - return YES; - } - case Attributes::TotalActivePower::Id: { - return YES; - } - case Attributes::TotalReactivePower::Id: { - return YES; - } - case Attributes::TotalApparentPower::Id: { - return YES; - } - case Attributes::Measured1stHarmonicCurrent::Id: { - return YES; - } - case Attributes::Measured3rdHarmonicCurrent::Id: { - return YES; - } - case Attributes::Measured5thHarmonicCurrent::Id: { - return YES; - } - case Attributes::Measured7thHarmonicCurrent::Id: { - return YES; - } - case Attributes::Measured9thHarmonicCurrent::Id: { - return YES; - } - case Attributes::Measured11thHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { - return YES; - } - case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { - return YES; - } - case Attributes::AcFrequencyMultiplier::Id: { - return YES; - } - case Attributes::AcFrequencyDivisor::Id: { - return YES; - } - case Attributes::PowerMultiplier::Id: { - return YES; - } - case Attributes::PowerDivisor::Id: { - return YES; - } - case Attributes::HarmonicCurrentMultiplier::Id: { - return YES; - } - case Attributes::PhaseHarmonicCurrentMultiplier::Id: { - return YES; - } - case Attributes::InstantaneousVoltage::Id: { - return YES; - } - case Attributes::InstantaneousLineCurrent::Id: { - return YES; - } - case Attributes::InstantaneousActiveCurrent::Id: { - return YES; - } - case Attributes::InstantaneousReactiveCurrent::Id: { - return YES; - } - case Attributes::InstantaneousPower::Id: { - return YES; - } - case Attributes::RmsVoltage::Id: { - return YES; - } - case Attributes::RmsVoltageMin::Id: { - return YES; - } - case Attributes::RmsVoltageMax::Id: { - return YES; - } - case Attributes::RmsCurrent::Id: { - return YES; - } - case Attributes::RmsCurrentMin::Id: { - return YES; - } - case Attributes::RmsCurrentMax::Id: { - return YES; - } - case Attributes::ActivePower::Id: { - return YES; - } - case Attributes::ActivePowerMin::Id: { - return YES; - } - case Attributes::ActivePowerMax::Id: { - return YES; - } - case Attributes::ReactivePower::Id: { - return YES; - } - case Attributes::ApparentPower::Id: { - return YES; - } - case Attributes::PowerFactor::Id: { - return YES; - } - case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { - return YES; - } - case Attributes::AverageRmsUnderVoltageCounter::Id: { - return YES; - } - case Attributes::RmsExtremeOverVoltagePeriod::Id: { - return YES; - } - case Attributes::RmsExtremeUnderVoltagePeriod::Id: { - return YES; - } - case Attributes::RmsVoltageSagPeriod::Id: { - return YES; - } - case Attributes::RmsVoltageSwellPeriod::Id: { - return YES; - } - case Attributes::AcVoltageMultiplier::Id: { - return YES; - } - case Attributes::AcVoltageDivisor::Id: { - return YES; - } - case Attributes::AcCurrentMultiplier::Id: { - return YES; - } - case Attributes::AcCurrentDivisor::Id: { - return YES; - } - case Attributes::AcPowerMultiplier::Id: { - return YES; - } - case Attributes::AcPowerDivisor::Id: { - return YES; - } - case Attributes::OverloadAlarmsMask::Id: { - return YES; - } - case Attributes::VoltageOverload::Id: { - return YES; - } - case Attributes::CurrentOverload::Id: { - return YES; - } - case Attributes::AcOverloadAlarmsMask::Id: { - return YES; - } - case Attributes::AcVoltageOverload::Id: { - return YES; - } - case Attributes::AcCurrentOverload::Id: { - return YES; - } - case Attributes::AcActivePowerOverload::Id: { - return YES; - } - case Attributes::AcReactivePowerOverload::Id: { - return YES; - } - case Attributes::AverageRmsOverVoltage::Id: { - return YES; - } - case Attributes::AverageRmsUnderVoltage::Id: { - return YES; - } - case Attributes::RmsExtremeOverVoltage::Id: { - return YES; - } - case Attributes::RmsExtremeUnderVoltage::Id: { - return YES; - } - case Attributes::RmsVoltageSag::Id: { - return YES; - } - case Attributes::RmsVoltageSwell::Id: { - return YES; - } - case Attributes::LineCurrentPhaseB::Id: { - return YES; - } - case Attributes::ActiveCurrentPhaseB::Id: { - return YES; - } - case Attributes::ReactiveCurrentPhaseB::Id: { - return YES; - } - case Attributes::RmsVoltagePhaseB::Id: { - return YES; - } - case Attributes::RmsVoltageMinPhaseB::Id: { - return YES; - } - case Attributes::RmsVoltageMaxPhaseB::Id: { - return YES; - } - case Attributes::RmsCurrentPhaseB::Id: { - return YES; - } - case Attributes::RmsCurrentMinPhaseB::Id: { - return YES; - } - case Attributes::RmsCurrentMaxPhaseB::Id: { - return YES; - } - case Attributes::ActivePowerPhaseB::Id: { - return YES; - } - case Attributes::ActivePowerMinPhaseB::Id: { - return YES; - } - case Attributes::ActivePowerMaxPhaseB::Id: { - return YES; - } - case Attributes::ReactivePowerPhaseB::Id: { - return YES; - } - case Attributes::ApparentPowerPhaseB::Id: { - return YES; - } - case Attributes::PowerFactorPhaseB::Id: { - return YES; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { - return YES; - } - case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { - return YES; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { - return YES; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { - return YES; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { - return YES; - } - case Attributes::RmsVoltageSagPeriodPhaseB::Id: { - return YES; - } - case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { - return YES; - } - case Attributes::LineCurrentPhaseC::Id: { - return YES; - } - case Attributes::ActiveCurrentPhaseC::Id: { - return YES; - } - case Attributes::ReactiveCurrentPhaseC::Id: { - return YES; - } - case Attributes::RmsVoltagePhaseC::Id: { - return YES; - } - case Attributes::RmsVoltageMinPhaseC::Id: { - return YES; - } - case Attributes::RmsVoltageMaxPhaseC::Id: { - return YES; - } - case Attributes::RmsCurrentPhaseC::Id: { - return YES; - } - case Attributes::RmsCurrentMinPhaseC::Id: { - return YES; - } - case Attributes::RmsCurrentMaxPhaseC::Id: { - return YES; - } - case Attributes::ActivePowerPhaseC::Id: { - return YES; - } - case Attributes::ActivePowerMinPhaseC::Id: { - return YES; - } - case Attributes::ActivePowerMaxPhaseC::Id: { - return YES; - } - case Attributes::ReactivePowerPhaseC::Id: { - return YES; - } - case Attributes::ApparentPowerPhaseC::Id: { - return YES; - } - case Attributes::PowerFactorPhaseC::Id: { - return YES; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - return YES; - } - case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - return YES; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - return YES; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - return YES; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - return YES; - } - case Attributes::RmsVoltageSagPeriodPhaseC::Id: { - return YES; - } - case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId) { using namespace Clusters::UnitTesting; @@ -6867,15 +6312,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::OnOff::Id: { return AttributeIsSpecifiedInOnOffCluster(aAttributeId); } - case Clusters::OnOffSwitchConfiguration::Id: { - return AttributeIsSpecifiedInOnOffSwitchConfigurationCluster(aAttributeId); - } case Clusters::LevelControl::Id: { return AttributeIsSpecifiedInLevelControlCluster(aAttributeId); } - case Clusters::BinaryInputBasic::Id: { - return AttributeIsSpecifiedInBinaryInputBasicCluster(aAttributeId); - } case Clusters::PulseWidthModulation::Id: { return AttributeIsSpecifiedInPulseWidthModulationCluster(aAttributeId); } @@ -7086,9 +6525,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::WindowCovering::Id: { return AttributeIsSpecifiedInWindowCoveringCluster(aAttributeId); } - case Clusters::BarrierControl::Id: { - return AttributeIsSpecifiedInBarrierControlCluster(aAttributeId); - } case Clusters::ServiceArea::Id: { return AttributeIsSpecifiedInServiceAreaCluster(aAttributeId); } @@ -7215,9 +6651,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::CommissionerControl::Id: { return AttributeIsSpecifiedInCommissionerControlCluster(aAttributeId); } - case Clusters::ElectricalMeasurement::Id: { - return AttributeIsSpecifiedInElectricalMeasurementCluster(aAttributeId); - } case Clusters::UnitTesting::Id: { return AttributeIsSpecifiedInUnitTestingCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index de61e4dd22cf7d..4affde0367f59a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -299,40 +299,6 @@ static id _Nullable DecodeAttributeValueForOnOffCluster(AttributeId aAttributeId *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForOnOffSwitchConfigurationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OnOffSwitchConfiguration; - switch (aAttributeId) { - case Attributes::SwitchType::Id: { - using TypeInfo = Attributes::SwitchType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::SwitchActions::Id: { - using TypeInfo = Attributes::SwitchActions::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} static id _Nullable DecodeAttributeValueForLevelControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::LevelControl; @@ -523,132 +489,6 @@ static id _Nullable DecodeAttributeValueForLevelControlCluster(AttributeId aAttr *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForBinaryInputBasicCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BinaryInputBasic; - switch (aAttributeId) { - case Attributes::ActiveText::Id: { - using TypeInfo = Attributes::ActiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::InactiveText::Id: { - using TypeInfo = Attributes::InactiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSString * _Nonnull value; - value = AsString(cppValue); - if (value == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return nil; - } - return value; - } - case Attributes::OutOfService::Id: { - using TypeInfo = Attributes::OutOfService::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Polarity::Id: { - using TypeInfo = Attributes::Polarity::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::PresentValue::Id: { - using TypeInfo = Attributes::PresentValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Reliability::Id: { - using TypeInfo = Attributes::Reliability::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::StatusFlags::Id: { - using TypeInfo = Attributes::StatusFlags::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::ApplicationType::Id: { - using TypeInfo = Attributes::ApplicationType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} static id _Nullable DecodeAttributeValueForPulseWidthModulationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::PulseWidthModulation; @@ -11050,128 +10890,6 @@ static id _Nullable DecodeAttributeValueForWindowCoveringCluster(AttributeId aAt *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForBarrierControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BarrierControl; - switch (aAttributeId) { - case Attributes::BarrierMovingState::Id: { - using TypeInfo = Attributes::BarrierMovingState::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BarrierSafetyStatus::Id: { - using TypeInfo = Attributes::BarrierSafetyStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCapabilities::Id: { - using TypeInfo = Attributes::BarrierCapabilities::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::BarrierOpenEvents::Id: { - using TypeInfo = Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCommandOpenEvents::Id: { - using TypeInfo = Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierCommandCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierOpenPeriod::Id: { - using TypeInfo = Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierClosePeriod::Id: { - using TypeInfo = Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::BarrierPosition::Id: { - using TypeInfo = Attributes::BarrierPosition::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ServiceArea; @@ -17351,1476 +17069,56 @@ static id _Nullable DecodeAttributeValueForCommissionerControlCluster(AttributeI *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForElectricalMeasurementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) +static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { - using namespace Clusters::ElectricalMeasurement; + using namespace Clusters::UnitTesting; switch (aAttributeId) { - case Attributes::MeasurementType::Id: { - using TypeInfo = Attributes::MeasurementType::TypeInfo; + case Attributes::Boolean::Id: { + using TypeInfo = Attributes::Boolean::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::DcVoltage::Id: { - using TypeInfo = Attributes::DcVoltage::TypeInfo; + case Attributes::Bitmap8::Id: { + using TypeInfo = Attributes::Bitmap8::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::DcVoltageMin::Id: { - using TypeInfo = Attributes::DcVoltageMin::TypeInfo; + case Attributes::Bitmap16::Id: { + using TypeInfo = Attributes::Bitmap16::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } - case Attributes::DcVoltageMax::Id: { - using TypeInfo = Attributes::DcVoltageMax::TypeInfo; + case Attributes::Bitmap32::Id: { + using TypeInfo = Attributes::Bitmap32::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::DcCurrent::Id: { - using TypeInfo = Attributes::DcCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcCurrentMin::Id: { - using TypeInfo = Attributes::DcCurrentMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcCurrentMax::Id: { - using TypeInfo = Attributes::DcCurrentMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcPower::Id: { - using TypeInfo = Attributes::DcPower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcPowerMin::Id: { - using TypeInfo = Attributes::DcPowerMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcPowerMax::Id: { - using TypeInfo = Attributes::DcPowerMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::DcVoltageMultiplier::Id: { - using TypeInfo = Attributes::DcVoltageMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DcVoltageDivisor::Id: { - using TypeInfo = Attributes::DcVoltageDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DcCurrentMultiplier::Id: { - using TypeInfo = Attributes::DcCurrentMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DcCurrentDivisor::Id: { - using TypeInfo = Attributes::DcCurrentDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DcPowerMultiplier::Id: { - using TypeInfo = Attributes::DcPowerMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::DcPowerDivisor::Id: { - using TypeInfo = Attributes::DcPowerDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcFrequency::Id: { - using TypeInfo = Attributes::AcFrequency::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcFrequencyMin::Id: { - using TypeInfo = Attributes::AcFrequencyMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcFrequencyMax::Id: { - using TypeInfo = Attributes::AcFrequencyMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::NeutralCurrent::Id: { - using TypeInfo = Attributes::NeutralCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::TotalActivePower::Id: { - using TypeInfo = Attributes::TotalActivePower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithInt:cppValue]; - return value; - } - case Attributes::TotalReactivePower::Id: { - using TypeInfo = Attributes::TotalReactivePower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithInt:cppValue]; - return value; - } - case Attributes::TotalApparentPower::Id: { - using TypeInfo = Attributes::TotalApparentPower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::Measured1stHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured1stHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::Measured3rdHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured3rdHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::Measured5thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured5thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::Measured7thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured7thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::Measured9thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured9thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::Measured11thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured11thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AcFrequencyMultiplier::Id: { - using TypeInfo = Attributes::AcFrequencyMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcFrequencyDivisor::Id: { - using TypeInfo = Attributes::AcFrequencyDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PowerMultiplier::Id: { - using TypeInfo = Attributes::PowerMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::PowerDivisor::Id: { - using TypeInfo = Attributes::PowerDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::HarmonicCurrentMultiplier::Id: { - using TypeInfo = Attributes::HarmonicCurrentMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::PhaseHarmonicCurrentMultiplier::Id: { - using TypeInfo = Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::InstantaneousVoltage::Id: { - using TypeInfo = Attributes::InstantaneousVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::InstantaneousLineCurrent::Id: { - using TypeInfo = Attributes::InstantaneousLineCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::InstantaneousActiveCurrent::Id: { - using TypeInfo = Attributes::InstantaneousActiveCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::InstantaneousReactiveCurrent::Id: { - using TypeInfo = Attributes::InstantaneousReactiveCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::InstantaneousPower::Id: { - using TypeInfo = Attributes::InstantaneousPower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsVoltage::Id: { - using TypeInfo = Attributes::RmsVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMin::Id: { - using TypeInfo = Attributes::RmsVoltageMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMax::Id: { - using TypeInfo = Attributes::RmsVoltageMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrent::Id: { - using TypeInfo = Attributes::RmsCurrent::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMin::Id: { - using TypeInfo = Attributes::RmsCurrentMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMax::Id: { - using TypeInfo = Attributes::RmsCurrentMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ActivePower::Id: { - using TypeInfo = Attributes::ActivePower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMin::Id: { - using TypeInfo = Attributes::ActivePowerMin::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMax::Id: { - using TypeInfo = Attributes::ActivePowerMax::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactivePower::Id: { - using TypeInfo = Attributes::ReactivePower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ApparentPower::Id: { - using TypeInfo = Attributes::ApparentPower::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PowerFactor::Id: { - using TypeInfo = Attributes::PowerFactor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsUnderVoltageCounter::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeOverVoltagePeriod::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriod::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSagPeriod::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSwellPeriod::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcVoltageMultiplier::Id: { - using TypeInfo = Attributes::AcVoltageMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcVoltageDivisor::Id: { - using TypeInfo = Attributes::AcVoltageDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcCurrentMultiplier::Id: { - using TypeInfo = Attributes::AcCurrentMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcCurrentDivisor::Id: { - using TypeInfo = Attributes::AcCurrentDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcPowerMultiplier::Id: { - using TypeInfo = Attributes::AcPowerMultiplier::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcPowerDivisor::Id: { - using TypeInfo = Attributes::AcPowerDivisor::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::OverloadAlarmsMask::Id: { - using TypeInfo = Attributes::OverloadAlarmsMask::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::VoltageOverload::Id: { - using TypeInfo = Attributes::VoltageOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::CurrentOverload::Id: { - using TypeInfo = Attributes::CurrentOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AcOverloadAlarmsMask::Id: { - using TypeInfo = Attributes::AcOverloadAlarmsMask::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AcVoltageOverload::Id: { - using TypeInfo = Attributes::AcVoltageOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AcCurrentOverload::Id: { - using TypeInfo = Attributes::AcCurrentOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AcActivePowerOverload::Id: { - using TypeInfo = Attributes::AcActivePowerOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AcReactivePowerOverload::Id: { - using TypeInfo = Attributes::AcReactivePowerOverload::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AverageRmsOverVoltage::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::AverageRmsUnderVoltage::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsExtremeOverVoltage::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsExtremeUnderVoltage::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltage::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSag::Id: { - using TypeInfo = Attributes::RmsVoltageSag::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSwell::Id: { - using TypeInfo = Attributes::RmsVoltageSwell::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::LineCurrentPhaseB::Id: { - using TypeInfo = Attributes::LineCurrentPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ActiveCurrentPhaseB::Id: { - using TypeInfo = Attributes::ActiveCurrentPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactiveCurrentPhaseB::Id: { - using TypeInfo = Attributes::ReactiveCurrentPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsVoltagePhaseB::Id: { - using TypeInfo = Attributes::RmsVoltagePhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMinPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageMinPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMaxPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageMaxPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMinPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentMinPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMaxPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentMaxPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ActivePowerPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMinPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerMinPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMaxPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerMaxPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactivePowerPhaseB::Id: { - using TypeInfo = Attributes::ReactivePowerPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ApparentPowerPhaseB::Id: { - using TypeInfo = Attributes::ApparentPowerPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PowerFactorPhaseB::Id: { - using TypeInfo = Attributes::PowerFactorPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSagPeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::LineCurrentPhaseC::Id: { - using TypeInfo = Attributes::LineCurrentPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ActiveCurrentPhaseC::Id: { - using TypeInfo = Attributes::ActiveCurrentPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactiveCurrentPhaseC::Id: { - using TypeInfo = Attributes::ReactiveCurrentPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::RmsVoltagePhaseC::Id: { - using TypeInfo = Attributes::RmsVoltagePhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMinPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageMinPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageMaxPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageMaxPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMinPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentMinPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsCurrentMaxPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentMaxPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::ActivePowerPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMinPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerMinPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ActivePowerMaxPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerMaxPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ReactivePowerPhaseC::Id: { - using TypeInfo = Attributes::ReactivePowerPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithShort:cppValue]; - return value; - } - case Attributes::ApparentPowerPhaseC::Id: { - using TypeInfo = Attributes::ApparentPowerPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::PowerFactorPhaseC::Id: { - using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSagPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} -static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::UnitTesting; - switch (aAttributeId) { - case Attributes::Boolean::Id: { - using TypeInfo = Attributes::Boolean::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithBool:cppValue]; - return value; - } - case Attributes::Bitmap8::Id: { - using TypeInfo = Attributes::Bitmap8::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; - return value; - } - case Attributes::Bitmap16::Id: { - using TypeInfo = Attributes::Bitmap16::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; - return value; - } - case Attributes::Bitmap32::Id: { - using TypeInfo = Attributes::Bitmap32::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; - return value; - } - case Attributes::Bitmap64::Id: { - using TypeInfo = Attributes::Bitmap64::TypeInfo; + case Attributes::Bitmap64::Id: { + using TypeInfo = Attributes::Bitmap64::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -20377,15 +18675,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::OnOff::Id: { return DecodeAttributeValueForOnOffCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::OnOffSwitchConfiguration::Id: { - return DecodeAttributeValueForOnOffSwitchConfigurationCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::LevelControl::Id: { return DecodeAttributeValueForLevelControlCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::BinaryInputBasic::Id: { - return DecodeAttributeValueForBinaryInputBasicCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::PulseWidthModulation::Id: { return DecodeAttributeValueForPulseWidthModulationCluster(aPath.mAttributeId, aReader, aError); } @@ -20596,9 +18888,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::WindowCovering::Id: { return DecodeAttributeValueForWindowCoveringCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::BarrierControl::Id: { - return DecodeAttributeValueForBarrierControlCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::ServiceArea::Id: { return DecodeAttributeValueForServiceAreaCluster(aPath.mAttributeId, aReader, aError); } @@ -20725,9 +19014,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::CommissionerControl::Id: { return DecodeAttributeValueForCommissionerControlCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::ElectricalMeasurement::Id: { - return DecodeAttributeValueForElectricalMeasurementCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::UnitTesting::Id: { return DecodeAttributeValueForUnitTestingCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 2273d8ab191bd3..bcf76c978cb480 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -358,81 +358,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster On/off Switch Configuration - * - * Attributes and commands for configuring On/Off switching devices. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterOnOffSwitchConfiguration : MTRGenericBaseCluster - -- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRBaseClusterOnOffSwitchConfiguration (Availability) - -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Level Control * @@ -648,133 +573,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Binary Input (Basic) - * - * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterBinaryInputBasic : MTRGenericBaseCluster - -- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRBaseClusterBinaryInputBasic (Availability) - -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Pulse Width Modulation * @@ -9539,154 +9337,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Barrier Control - * - * This cluster provides control of a barrier (garage door). - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterBarrierControl : MTRGenericBaseCluster - -/** - * Command BarrierControlGoToPercent - * - * Command to instruct a barrier to go to a percent open state. - */ -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command BarrierControlStop - * - * Command that instructs the barrier to stop moving. - */ -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRBaseClusterBarrierControl (Availability) - -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Service Area * @@ -15260,823 +14910,1022 @@ MTR_PROVISIONALLY_AVAILABLE @end /** - * Cluster Electrical Measurement + * Cluster Unit Testing * - * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. + * The Test Cluster is meant to validate the generated code */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBaseClusterElectricalMeasurement : MTRGenericBaseCluster +MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTRBaseClusterUnitTesting : MTRGenericBaseCluster /** - * Command GetProfileInfoCommand + * Command Test * - * A function which retrieves the power profiling information from the electrical measurement server. + * Simple command without any parameters and without a specific response. + To aid in unit testing, this command will re-initialize attribute storage to defaults. */ -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion +- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testWithCompletion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); /** - * Command GetMeasurementProfileCommand + * Command TestNotHandled * - * A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. + * Simple command without any parameters and without a specific response not handled by the server */ -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestSpecific + * + * Simple command without any parameters and with a specific response + */ +- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testSpecificWithCompletion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestUnknownCommand + * + * Simple command that should not be added to the server. + */ +- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestAddArguments + * + * Command that takes two arguments and returns their sum. + */ +- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestSimpleArgumentRequest + * + * Command that takes an argument which is bool + */ +- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestStructArrayArgumentRequest + * + * Command that takes various arguments that are arrays, including an array of structs which have a list member. + */ +- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestStructArgumentRequest + * + * Command that takes an argument which is struct. The response echoes the + 'b' field of the single arg. + */ +- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestNestedStructArgumentRequest + * + * Command that takes an argument which is nested struct. The response + echoes the 'b' field of ar1.c. + */ +- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestListStructArgumentRequest + * + * Command that takes an argument which is a list of structs. The response + returns false if there is some struct in the list whose 'b' field is + false, and true otherwise (including if the list is empty). + */ +- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestListInt8UArgumentRequest + * + * Command that takes an argument which is a list of INT8U. The response + returns false if the list contains a 0 in it, true otherwise (including + if the list is empty). + */ +- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestNestedStructListArgumentRequest + * + * Command that takes an argument which is a Nested Struct List. The + response returns false if there is some struct in arg1 (either directly + in arg1.c or in the arg1.d list) whose 'b' field is false, and true + otherwise. + */ +- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestListNestedStructListArgumentRequest + * + * Command that takes an argument which is a list of Nested Struct List. + The response returns false if there is some struct in arg1 (either + directly in as the 'c' field of an entry 'd' list of an entry) whose 'b' + field is false, and true otherwise (including if the list is empty). + */ +- (void)testListNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestListInt8UReverseRequest + * + * Command that takes an argument which is a list of INT8U and expects a + response that reverses the list. + */ +- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestEnumsRequest + * + * Command that sends a vendor id and an enum. The server is expected to + echo them back. + */ +- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestNullableOptionalRequest + * + * Command that takes an argument which is nullable and optional. The + response returns a boolean indicating whether the argument was present, + if that's true a boolean indicating whether the argument was null, and + if that' false the argument it received. + */ +- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testNullableOptionalRequestWithCompletion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +/** + * Command TestComplexNullableOptionalRequest + * + * Command that takes various arguments which can be nullable and/or optional. The + response returns information about which things were received and what + their state was. + */ +- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command SimpleStructEchoRequest + * + * Command that takes an argument which is a struct. The response echoes + the struct back. + */ +- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TimedInvokeRequest + * + * Command that just responds with a success status if the timed invoke + conditions are met. + */ +- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion + MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestSimpleOptionalArgumentRequest + * + * Command that takes an optional argument which is bool. It responds with a success value if the optional is set to any value. + */ +- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)testSimpleOptionalArgumentRequestWithCompletion:(MTRStatusCompletion)completion + MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +/** + * Command TestEmitTestEventRequest + * + * Command that takes identical arguments to the fields of the TestEvent and logs the TestEvent to the buffer. Command returns an event ID as the response. + */ +- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestEmitTestFabricScopedEventRequest + * + * Command that takes identical arguments to the fields of the TestFabricScopedEvent and logs the TestFabricScopedEvent to the buffer. Command returns an event ID as the response. + */ +- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command TestBatchHelperRequest + * + * Command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. + */ +- (void)testBatchHelperRequestWithParams:(MTRUnitTestingClusterTestBatchHelperRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command TestSecondBatchHelperRequest + * + * Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. + */ +- (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondBatchHelperRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StringEchoRequest + * + * Command that takes an argument which is an octet string. The response echoes + the string back. If the string is large then it would require a session that + supports large payloads. + */ +- (void)stringEchoRequestWithParams:(MTRUnitTestingClusterStringEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterStringEchoResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command GlobalEchoRequest + * + * Command that takes arguments that are global structs/enums and the + response just echoes them back. + */ +- (void)globalEchoRequestWithParams:(MTRUnitTestingClusterGlobalEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterGlobalEchoResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command TestDifferentVendorMeiRequest + * + * Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. + */ +- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams *)params +- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams *)params +- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListStructOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams *)params +- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeLongCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeEpochUsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeEpochSWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListNullablesAndOptionalsStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams *)params +- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeStructAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeListFabricScopedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeTimedWriteBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeGeneralErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeClusterErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeGlobalEnumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeGlobalEnumWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeGlobalEnumWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGlobalEnumWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGlobalEnumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams *)params +- (void)readAttributeGlobalStructWithCompletion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGlobalStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGlobalStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeReadFailureCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeReadFailureCodeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeReadFailureCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFailureInt32UWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFailureInt32UWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFailureInt32UWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams *)params +- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeNullableRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeWriteOnlyInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableGlobalEnumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNullableGlobalEnumWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNullableGlobalEnumWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNullableGlobalEnumWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNullableGlobalEnumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeNullableGlobalStructWithCompletion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNullableGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeNullableGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNullableGlobalStructWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNullableGlobalStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeMeiInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMeiInt8uWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMeiInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@end -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@interface MTRBaseClusterUnitTesting (Availability) -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * For all instance methods (reads, writes, commands) that take a completion, + * the completion will be called on the provided queue. + */ +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@end -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Cluster Sample MEI + * + * The Sample MEI cluster showcases a cluster manufacturer extensions + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterSampleMEI : MTRGenericBaseCluster -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command Ping + * + * Simple command without any parameters and without a response. + */ +- (void)pingWithParams:(MTRSampleMEIClusterPingParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)pingWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command AddArguments + * + * Command that takes two uint8 arguments and returns their sum. + */ +- (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params completion:(void (^)(MTRSampleMEIClusterAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFlipFlopWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFlipFlopWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFlipFlopWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFlipFlopWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFlipFlopWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params @@ -16084,30 +15933,30 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; @end -@interface MTRBaseClusterElectricalMeasurement (Availability) +@interface MTRBaseClusterSampleMEI (Availability) /** * For all instance methods (reads, writes, commands) that take a completion, @@ -16115,6561 +15964,4229 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; @end -/** - * Cluster Unit Testing - * - * The Test Cluster is meant to validate the generated code - */ -MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRBaseClusterUnitTesting : MTRGenericBaseCluster +MTR_DEPRECATED("Please use MTRBaseClusterBasicInformation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBaseClusterBasic : MTRBaseClusterBasicInformation +@end -/** - * Command Test - * - * Simple command without any parameters and without a specific response. - To aid in unit testing, this command will re-initialize attribute storage to defaults. - */ -- (void)testWithParams:(MTRUnitTestingClusterTestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestNotHandled - * - * Simple command without any parameters and without a specific response not handled by the server - */ -- (void)testNotHandledWithParams:(MTRUnitTestingClusterTestNotHandledParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testNotHandledWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestSpecific - * - * Simple command without any parameters and with a specific response - */ -- (void)testSpecificWithParams:(MTRUnitTestingClusterTestSpecificParams * _Nullable)params completion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testSpecificWithCompletion:(void (^)(MTRUnitTestingClusterTestSpecificResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestUnknownCommand - * - * Simple command that should not be added to the server. - */ -- (void)testUnknownCommandWithParams:(MTRUnitTestingClusterTestUnknownCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testUnknownCommandWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestAddArguments - * - * Command that takes two arguments and returns their sum. - */ -- (void)testAddArgumentsWithParams:(MTRUnitTestingClusterTestAddArgumentsParams *)params completion:(void (^)(MTRUnitTestingClusterTestAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestSimpleArgumentRequest - * - * Command that takes an argument which is bool - */ -- (void)testSimpleArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestSimpleArgumentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestStructArrayArgumentRequest - * - * Command that takes various arguments that are arrays, including an array of structs which have a list member. - */ -- (void)testStructArrayArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArrayArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestStructArrayArgumentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestStructArgumentRequest - * - * Command that takes an argument which is struct. The response echoes the - 'b' field of the single arg. - */ -- (void)testStructArgumentRequestWithParams:(MTRUnitTestingClusterTestStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestNestedStructArgumentRequest - * - * Command that takes an argument which is nested struct. The response - echoes the 'b' field of ar1.c. - */ -- (void)testNestedStructArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestListStructArgumentRequest - * - * Command that takes an argument which is a list of structs. The response - returns false if there is some struct in the list whose 'b' field is - false, and true otherwise (including if the list is empty). - */ -- (void)testListStructArgumentRequestWithParams:(MTRUnitTestingClusterTestListStructArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestListInt8UArgumentRequest - * - * Command that takes an argument which is a list of INT8U. The response - returns false if the list contains a 0 in it, true otherwise (including - if the list is empty). - */ -- (void)testListInt8UArgumentRequestWithParams:(MTRUnitTestingClusterTestListInt8UArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestNestedStructListArgumentRequest - * - * Command that takes an argument which is a Nested Struct List. The - response returns false if there is some struct in arg1 (either directly - in arg1.c or in the arg1.d list) whose 'b' field is false, and true - otherwise. - */ -- (void)testNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestNestedStructListArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestListNestedStructListArgumentRequest - * - * Command that takes an argument which is a list of Nested Struct List. - The response returns false if there is some struct in arg1 (either - directly in as the 'c' field of an entry 'd' list of an entry) whose 'b' - field is false, and true otherwise (including if the list is empty). - */ -- (void)testListNestedStructListArgumentRequestWithParams:(MTRUnitTestingClusterTestListNestedStructListArgumentRequestParams *)params completion:(void (^)(MTRUnitTestingClusterBooleanResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestListInt8UReverseRequest - * - * Command that takes an argument which is a list of INT8U and expects a - response that reverses the list. - */ -- (void)testListInt8UReverseRequestWithParams:(MTRUnitTestingClusterTestListInt8UReverseRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestListInt8UReverseResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestEnumsRequest - * - * Command that sends a vendor id and an enum. The server is expected to - echo them back. - */ -- (void)testEnumsRequestWithParams:(MTRUnitTestingClusterTestEnumsRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEnumsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestNullableOptionalRequest - * - * Command that takes an argument which is nullable and optional. The - response returns a boolean indicating whether the argument was present, - if that's true a boolean indicating whether the argument was null, and - if that' false the argument it received. - */ -- (void)testNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestNullableOptionalRequestParams * _Nullable)params completion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testNullableOptionalRequestWithCompletion:(void (^)(MTRUnitTestingClusterTestNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -/** - * Command TestComplexNullableOptionalRequest - * - * Command that takes various arguments which can be nullable and/or optional. The - response returns information about which things were received and what - their state was. - */ -- (void)testComplexNullableOptionalRequestWithParams:(MTRUnitTestingClusterTestComplexNullableOptionalRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestComplexNullableOptionalResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command SimpleStructEchoRequest - * - * Command that takes an argument which is a struct. The response echoes - the struct back. - */ -- (void)simpleStructEchoRequestWithParams:(MTRUnitTestingClusterSimpleStructEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterSimpleStructResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TimedInvokeRequest - * - * Command that just responds with a success status if the timed invoke - conditions are met. - */ -- (void)timedInvokeRequestWithParams:(MTRUnitTestingClusterTimedInvokeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)timedInvokeRequestWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestSimpleOptionalArgumentRequest - * - * Command that takes an optional argument which is bool. It responds with a success value if the optional is set to any value. - */ -- (void)testSimpleOptionalArgumentRequestWithParams:(MTRUnitTestingClusterTestSimpleOptionalArgumentRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)testSimpleOptionalArgumentRequestWithCompletion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -/** - * Command TestEmitTestEventRequest - * - * Command that takes identical arguments to the fields of the TestEvent and logs the TestEvent to the buffer. Command returns an event ID as the response. - */ -- (void)testEmitTestEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestEventRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEmitTestEventResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestEmitTestFabricScopedEventRequest - * - * Command that takes identical arguments to the fields of the TestFabricScopedEvent and logs the TestFabricScopedEvent to the buffer. Command returns an event ID as the response. - */ -- (void)testEmitTestFabricScopedEventRequestWithParams:(MTRUnitTestingClusterTestEmitTestFabricScopedEventRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestEmitTestFabricScopedEventResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command TestBatchHelperRequest - * - * Command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. - */ -- (void)testBatchHelperRequestWithParams:(MTRUnitTestingClusterTestBatchHelperRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command TestSecondBatchHelperRequest - * - * Second command that responds after sleepBeforeResponseTimeMs with an octet_string the size requested with fillCharacter. - */ -- (void)testSecondBatchHelperRequestWithParams:(MTRUnitTestingClusterTestSecondBatchHelperRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestBatchHelperResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command StringEchoRequest - * - * Command that takes an argument which is an octet string. The response echoes - the string back. If the string is large then it would require a session that - supports large payloads. - */ -- (void)stringEchoRequestWithParams:(MTRUnitTestingClusterStringEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterStringEchoResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command GlobalEchoRequest - * - * Command that takes arguments that are global structs/enums and the - response just echoes them back. - */ -- (void)globalEchoRequestWithParams:(MTRUnitTestingClusterGlobalEchoRequestParams *)params completion:(void (^)(MTRUnitTestingClusterGlobalEchoResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -/** - * Command TestDifferentVendorMeiRequest - * - * Command having a different MEI vendor ID than the cluster. Also emits TestDifferentVendorMeiEvent. - */ -- (void)testDifferentVendorMeiRequestWithParams:(MTRUnitTestingClusterTestDifferentVendorMeiRequestParams *)params completion:(void (^)(MTRUnitTestingClusterTestDifferentVendorMeiResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +MTR_DEPRECATED("Please use MTRBaseClusterOTASoftwareUpdateProvider", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBaseClusterOtaSoftwareUpdateProvider : MTRBaseClusterOTASoftwareUpdateProvider +@end -- (void)readAttributeBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_DEPRECATED("Please use MTRBaseClusterOTASoftwareUpdateRequestor", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBaseClusterOtaSoftwareUpdateRequestor : MTRBaseClusterOTASoftwareUpdateRequestor +@end -- (void)readAttributeBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBitmap8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_DEPRECATED("Please use MTRBaseClusterBridgedDeviceBasicInformation", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) +@interface MTRBaseClusterBridgedDeviceBasic : MTRBaseClusterBridgedDeviceBasicInformation +@end -- (void)readAttributeBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBitmap16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_DEPRECATED("Please use MTRBaseClusterWakeOnLAN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBaseClusterWakeOnLan : MTRBaseClusterWakeOnLAN +@end -- (void)readAttributeBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBitmap32WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +MTR_DEPRECATED("Please use MTRBaseClusterUnitTesting", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) +@interface MTRBaseClusterTestCluster : MTRBaseClusterUnitTesting +@end -- (void)readAttributeBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeBitmap64WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeAreaTypeTag) { + MTRDataTypeAreaTypeTagAisle MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeAreaTypeTagAttic MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeAreaTypeTagBackDoor MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeAreaTypeTagBackYard MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeAreaTypeTagBalcony MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypeAreaTypeTagBallroom MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypeAreaTypeTagBathroom MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDataTypeAreaTypeTagBedroom MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDataTypeAreaTypeTagBorder MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDataTypeAreaTypeTagBoxroom MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDataTypeAreaTypeTagBreakfastRoom MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDataTypeAreaTypeTagCarport MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDataTypeAreaTypeTagCellar MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDataTypeAreaTypeTagCloakroom MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRDataTypeAreaTypeTagCloset MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRDataTypeAreaTypeTagConservatory MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRDataTypeAreaTypeTagCorridor MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDataTypeAreaTypeTagCraftRoom MTR_PROVISIONALLY_AVAILABLE = 0x11, + MTRDataTypeAreaTypeTagCupboard MTR_PROVISIONALLY_AVAILABLE = 0x12, + MTRDataTypeAreaTypeTagDeck MTR_PROVISIONALLY_AVAILABLE = 0x13, + MTRDataTypeAreaTypeTagDen MTR_PROVISIONALLY_AVAILABLE = 0x14, + MTRDataTypeAreaTypeTagDining MTR_PROVISIONALLY_AVAILABLE = 0x15, + MTRDataTypeAreaTypeTagDrawingRoom MTR_PROVISIONALLY_AVAILABLE = 0x16, + MTRDataTypeAreaTypeTagDressingRoom MTR_PROVISIONALLY_AVAILABLE = 0x17, + MTRDataTypeAreaTypeTagDriveway MTR_PROVISIONALLY_AVAILABLE = 0x18, + MTRDataTypeAreaTypeTagElevator MTR_PROVISIONALLY_AVAILABLE = 0x19, + MTRDataTypeAreaTypeTagEnsuite MTR_PROVISIONALLY_AVAILABLE = 0x1A, + MTRDataTypeAreaTypeTagEntrance MTR_PROVISIONALLY_AVAILABLE = 0x1B, + MTRDataTypeAreaTypeTagEntryway MTR_PROVISIONALLY_AVAILABLE = 0x1C, + MTRDataTypeAreaTypeTagFamilyRoom MTR_PROVISIONALLY_AVAILABLE = 0x1D, + MTRDataTypeAreaTypeTagFoyer MTR_PROVISIONALLY_AVAILABLE = 0x1E, + MTRDataTypeAreaTypeTagFrontDoor MTR_PROVISIONALLY_AVAILABLE = 0x1F, + MTRDataTypeAreaTypeTagFrontYard MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDataTypeAreaTypeTagGameRoom MTR_PROVISIONALLY_AVAILABLE = 0x21, + MTRDataTypeAreaTypeTagGarage MTR_PROVISIONALLY_AVAILABLE = 0x22, + MTRDataTypeAreaTypeTagGarageDoor MTR_PROVISIONALLY_AVAILABLE = 0x23, + MTRDataTypeAreaTypeTagGarden MTR_PROVISIONALLY_AVAILABLE = 0x24, + MTRDataTypeAreaTypeTagGardenDoor MTR_PROVISIONALLY_AVAILABLE = 0x25, + MTRDataTypeAreaTypeTagGuestBathroom MTR_PROVISIONALLY_AVAILABLE = 0x26, + MTRDataTypeAreaTypeTagGuestBedroom MTR_PROVISIONALLY_AVAILABLE = 0x27, + MTRDataTypeAreaTypeTagGuestRestroom MTR_PROVISIONALLY_AVAILABLE = 0x28, + MTRDataTypeAreaTypeTagGuestRoom MTR_PROVISIONALLY_AVAILABLE = 0x29, + MTRDataTypeAreaTypeTagGym MTR_PROVISIONALLY_AVAILABLE = 0x2A, + MTRDataTypeAreaTypeTagHallway MTR_PROVISIONALLY_AVAILABLE = 0x2B, + MTRDataTypeAreaTypeTagHearthRoom MTR_PROVISIONALLY_AVAILABLE = 0x2C, + MTRDataTypeAreaTypeTagKidsRoom MTR_PROVISIONALLY_AVAILABLE = 0x2D, + MTRDataTypeAreaTypeTagKidsBedroom MTR_PROVISIONALLY_AVAILABLE = 0x2E, + MTRDataTypeAreaTypeTagKitchen MTR_PROVISIONALLY_AVAILABLE = 0x2F, + MTRDataTypeAreaTypeTagLarder MTR_PROVISIONALLY_AVAILABLE = 0x30, + MTRDataTypeAreaTypeTagLaundryRoom MTR_PROVISIONALLY_AVAILABLE = 0x31, + MTRDataTypeAreaTypeTagLawn MTR_PROVISIONALLY_AVAILABLE = 0x32, + MTRDataTypeAreaTypeTagLibrary MTR_PROVISIONALLY_AVAILABLE = 0x33, + MTRDataTypeAreaTypeTagLivingRoom MTR_PROVISIONALLY_AVAILABLE = 0x34, + MTRDataTypeAreaTypeTagLounge MTR_PROVISIONALLY_AVAILABLE = 0x35, + MTRDataTypeAreaTypeTagMediaTVRoom MTR_PROVISIONALLY_AVAILABLE = 0x36, + MTRDataTypeAreaTypeTagMudRoom MTR_PROVISIONALLY_AVAILABLE = 0x37, + MTRDataTypeAreaTypeTagMusicRoom MTR_PROVISIONALLY_AVAILABLE = 0x38, + MTRDataTypeAreaTypeTagNursery MTR_PROVISIONALLY_AVAILABLE = 0x39, + MTRDataTypeAreaTypeTagOffice MTR_PROVISIONALLY_AVAILABLE = 0x3A, + MTRDataTypeAreaTypeTagOutdoorKitchen MTR_PROVISIONALLY_AVAILABLE = 0x3B, + MTRDataTypeAreaTypeTagOutside MTR_PROVISIONALLY_AVAILABLE = 0x3C, + MTRDataTypeAreaTypeTagPantry MTR_PROVISIONALLY_AVAILABLE = 0x3D, + MTRDataTypeAreaTypeTagParkingLot MTR_PROVISIONALLY_AVAILABLE = 0x3E, + MTRDataTypeAreaTypeTagParlor MTR_PROVISIONALLY_AVAILABLE = 0x3F, + MTRDataTypeAreaTypeTagPatio MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRDataTypeAreaTypeTagPlayRoom MTR_PROVISIONALLY_AVAILABLE = 0x41, + MTRDataTypeAreaTypeTagPoolRoom MTR_PROVISIONALLY_AVAILABLE = 0x42, + MTRDataTypeAreaTypeTagPorch MTR_PROVISIONALLY_AVAILABLE = 0x43, + MTRDataTypeAreaTypeTagPrimaryBathroom MTR_PROVISIONALLY_AVAILABLE = 0x44, + MTRDataTypeAreaTypeTagPrimaryBedroom MTR_PROVISIONALLY_AVAILABLE = 0x45, + MTRDataTypeAreaTypeTagRamp MTR_PROVISIONALLY_AVAILABLE = 0x46, + MTRDataTypeAreaTypeTagReceptionRoom MTR_PROVISIONALLY_AVAILABLE = 0x47, + MTRDataTypeAreaTypeTagRecreationRoom MTR_PROVISIONALLY_AVAILABLE = 0x48, + MTRDataTypeAreaTypeTagRestroom MTR_PROVISIONALLY_AVAILABLE = 0x49, + MTRDataTypeAreaTypeTagRoof MTR_PROVISIONALLY_AVAILABLE = 0x4A, + MTRDataTypeAreaTypeTagSauna MTR_PROVISIONALLY_AVAILABLE = 0x4B, + MTRDataTypeAreaTypeTagScullery MTR_PROVISIONALLY_AVAILABLE = 0x4C, + MTRDataTypeAreaTypeTagSewingRoom MTR_PROVISIONALLY_AVAILABLE = 0x4D, + MTRDataTypeAreaTypeTagShed MTR_PROVISIONALLY_AVAILABLE = 0x4E, + MTRDataTypeAreaTypeTagSideDoor MTR_PROVISIONALLY_AVAILABLE = 0x4F, + MTRDataTypeAreaTypeTagSideYard MTR_PROVISIONALLY_AVAILABLE = 0x50, + MTRDataTypeAreaTypeTagSittingRoom MTR_PROVISIONALLY_AVAILABLE = 0x51, + MTRDataTypeAreaTypeTagSnug MTR_PROVISIONALLY_AVAILABLE = 0x52, + MTRDataTypeAreaTypeTagSpa MTR_PROVISIONALLY_AVAILABLE = 0x53, + MTRDataTypeAreaTypeTagStaircase MTR_PROVISIONALLY_AVAILABLE = 0x54, + MTRDataTypeAreaTypeTagSteamRoom MTR_PROVISIONALLY_AVAILABLE = 0x55, + MTRDataTypeAreaTypeTagStorageRoom MTR_PROVISIONALLY_AVAILABLE = 0x56, + MTRDataTypeAreaTypeTagStudio MTR_PROVISIONALLY_AVAILABLE = 0x57, + MTRDataTypeAreaTypeTagStudy MTR_PROVISIONALLY_AVAILABLE = 0x58, + MTRDataTypeAreaTypeTagSunRoom MTR_PROVISIONALLY_AVAILABLE = 0x59, + MTRDataTypeAreaTypeTagSwimmingPool MTR_PROVISIONALLY_AVAILABLE = 0x5A, + MTRDataTypeAreaTypeTagTerrace MTR_PROVISIONALLY_AVAILABLE = 0x5B, + MTRDataTypeAreaTypeTagUtilityRoom MTR_PROVISIONALLY_AVAILABLE = 0x5C, + MTRDataTypeAreaTypeTagWard MTR_PROVISIONALLY_AVAILABLE = 0x5D, + MTRDataTypeAreaTypeTagWorkshop MTR_PROVISIONALLY_AVAILABLE = 0x5E, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeAtomicRequestTypeEnum) { + MTRDataTypeAtomicRequestTypeEnumBeginWrite MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeAtomicRequestTypeEnumCommitWrite MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeAtomicRequestTypeEnumRollbackWrite MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeFloorSurfaceTag) { + MTRDataTypeFloorSurfaceTagCarpet MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeFloorSurfaceTagCeramic MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeFloorSurfaceTagConcrete MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeFloorSurfaceTagCork MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeFloorSurfaceTagDeepCarpet MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypeFloorSurfaceTagDirt MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypeFloorSurfaceTagEngineeredWood MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDataTypeFloorSurfaceTagGlass MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDataTypeFloorSurfaceTagGrass MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDataTypeFloorSurfaceTagHardwood MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDataTypeFloorSurfaceTagLaminate MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDataTypeFloorSurfaceTagLinoleum MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDataTypeFloorSurfaceTagMat MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDataTypeFloorSurfaceTagMetal MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRDataTypeFloorSurfaceTagPlastic MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRDataTypeFloorSurfaceTagPolishedConcrete MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRDataTypeFloorSurfaceTagRubber MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDataTypeFloorSurfaceTagRug MTR_PROVISIONALLY_AVAILABLE = 0x11, + MTRDataTypeFloorSurfaceTagSand MTR_PROVISIONALLY_AVAILABLE = 0x12, + MTRDataTypeFloorSurfaceTagStone MTR_PROVISIONALLY_AVAILABLE = 0x13, + MTRDataTypeFloorSurfaceTagTatami MTR_PROVISIONALLY_AVAILABLE = 0x14, + MTRDataTypeFloorSurfaceTagTerrazzo MTR_PROVISIONALLY_AVAILABLE = 0x15, + MTRDataTypeFloorSurfaceTagTile MTR_PROVISIONALLY_AVAILABLE = 0x16, + MTRDataTypeFloorSurfaceTagVinyl MTR_PROVISIONALLY_AVAILABLE = 0x17, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt24uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt24uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeLandmarkTag) { + MTRDataTypeLandmarkTagAirConditioner MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeLandmarkTagAirPurifier MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeLandmarkTagBackDoor MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeLandmarkTagBarStool MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeLandmarkTagBathMat MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypeLandmarkTagBathtub MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypeLandmarkTagBed MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDataTypeLandmarkTagBookshelf MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDataTypeLandmarkTagChair MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDataTypeLandmarkTagChristmasTree MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDataTypeLandmarkTagCoatRack MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDataTypeLandmarkTagCoffeeTable MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDataTypeLandmarkTagCookingRange MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDataTypeLandmarkTagCouch MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRDataTypeLandmarkTagCountertop MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRDataTypeLandmarkTagCradle MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRDataTypeLandmarkTagCrib MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDataTypeLandmarkTagDesk MTR_PROVISIONALLY_AVAILABLE = 0x11, + MTRDataTypeLandmarkTagDiningTable MTR_PROVISIONALLY_AVAILABLE = 0x12, + MTRDataTypeLandmarkTagDishwasher MTR_PROVISIONALLY_AVAILABLE = 0x13, + MTRDataTypeLandmarkTagDoor MTR_PROVISIONALLY_AVAILABLE = 0x14, + MTRDataTypeLandmarkTagDresser MTR_PROVISIONALLY_AVAILABLE = 0x15, + MTRDataTypeLandmarkTagLaundryDryer MTR_PROVISIONALLY_AVAILABLE = 0x16, + MTRDataTypeLandmarkTagFan MTR_PROVISIONALLY_AVAILABLE = 0x17, + MTRDataTypeLandmarkTagFireplace MTR_PROVISIONALLY_AVAILABLE = 0x18, + MTRDataTypeLandmarkTagFreezer MTR_PROVISIONALLY_AVAILABLE = 0x19, + MTRDataTypeLandmarkTagFrontDoor MTR_PROVISIONALLY_AVAILABLE = 0x1A, + MTRDataTypeLandmarkTagHighChair MTR_PROVISIONALLY_AVAILABLE = 0x1B, + MTRDataTypeLandmarkTagKitchenIsland MTR_PROVISIONALLY_AVAILABLE = 0x1C, + MTRDataTypeLandmarkTagLamp MTR_PROVISIONALLY_AVAILABLE = 0x1D, + MTRDataTypeLandmarkTagLitterBox MTR_PROVISIONALLY_AVAILABLE = 0x1E, + MTRDataTypeLandmarkTagMirror MTR_PROVISIONALLY_AVAILABLE = 0x1F, + MTRDataTypeLandmarkTagNightstand MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDataTypeLandmarkTagOven MTR_PROVISIONALLY_AVAILABLE = 0x21, + MTRDataTypeLandmarkTagPetBed MTR_PROVISIONALLY_AVAILABLE = 0x22, + MTRDataTypeLandmarkTagPetBowl MTR_PROVISIONALLY_AVAILABLE = 0x23, + MTRDataTypeLandmarkTagPetCrate MTR_PROVISIONALLY_AVAILABLE = 0x24, + MTRDataTypeLandmarkTagRefrigerator MTR_PROVISIONALLY_AVAILABLE = 0x25, + MTRDataTypeLandmarkTagScratchingPost MTR_PROVISIONALLY_AVAILABLE = 0x26, + MTRDataTypeLandmarkTagShoeRack MTR_PROVISIONALLY_AVAILABLE = 0x27, + MTRDataTypeLandmarkTagShower MTR_PROVISIONALLY_AVAILABLE = 0x28, + MTRDataTypeLandmarkTagSideDoor MTR_PROVISIONALLY_AVAILABLE = 0x29, + MTRDataTypeLandmarkTagSink MTR_PROVISIONALLY_AVAILABLE = 0x2A, + MTRDataTypeLandmarkTagSofa MTR_PROVISIONALLY_AVAILABLE = 0x2B, + MTRDataTypeLandmarkTagStove MTR_PROVISIONALLY_AVAILABLE = 0x2C, + MTRDataTypeLandmarkTagTable MTR_PROVISIONALLY_AVAILABLE = 0x2D, + MTRDataTypeLandmarkTagToilet MTR_PROVISIONALLY_AVAILABLE = 0x2E, + MTRDataTypeLandmarkTagTrashCan MTR_PROVISIONALLY_AVAILABLE = 0x2F, + MTRDataTypeLandmarkTagLaundryWasher MTR_PROVISIONALLY_AVAILABLE = 0x30, + MTRDataTypeLandmarkTagWindow MTR_PROVISIONALLY_AVAILABLE = 0x31, + MTRDataTypeLandmarkTagWineCooler MTR_PROVISIONALLY_AVAILABLE = 0x32, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt32uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt32uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypePositionTag) { + MTRDataTypePositionTagLeft MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypePositionTagRight MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypePositionTagTop MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypePositionTagBottom MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypePositionTagMiddle MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypePositionTagRow MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypePositionTagColumn MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt40uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt40uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeRelativePositionTag) { + MTRDataTypeRelativePositionTagUnder MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeRelativePositionTagNextTo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeRelativePositionTagAround MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDataTypeRelativePositionTagOn MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDataTypeRelativePositionTagAbove MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDataTypeRelativePositionTagFrontOf MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDataTypeRelativePositionTagBehind MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt48uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt48uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) { + MTRDataTypeTestGlobalEnumSomeValue MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDataTypeTestGlobalEnumSomeOtherValue MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDataTypeTestGlobalEnumFinalValue MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt56uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt56uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { + MTRIdentifyEffectIdentifierBlink MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRIdentifyEffectIdentifierBreathe MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRIdentifyEffectIdentifierOkay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRIdentifyEffectIdentifierChannelChange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRIdentifyEffectIdentifierFinishEffect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFE, + MTRIdentifyEffectIdentifierStopEffect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt64uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt64uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRIdentifyEffectVariant) { + MTRIdentifyEffectVariantDefault MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRIdentifyType) { + MTRIdentifyTypeNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRIdentifyTypeLightOutput MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRIdentifyTypeVisibleLight MTR_DEPRECATED("Please use MTRIdentifyTypeLightOutput", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, + MTRIdentifyTypeVisibleIndicator MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRIdentifyTypeVisibleLED MTR_DEPRECATED("Please use MTRIdentifyTypeVisibleIndicator", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, + MTRIdentifyTypeAudibleBeep MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRIdentifyTypeDisplay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRIdentifyTypeActuator MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRGroupsFeature) { + MTRGroupsFeatureGroupNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt24sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt24sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRGroupsGroupClusterFeature) { + MTRGroupsGroupClusterFeatureGroupNames MTR_DEPRECATED("Please use MTRGroupsFeatureGroupNames", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, +} MTR_DEPRECATED("Please use MTRGroupsFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt32sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt32sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { + MTRGroupsNameSupportBitmapGroupNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x80, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt40sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt40sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROnOffDelayedAllOffEffectVariant) { + MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROnOffDelayedAllOffEffectVariantFadeToOffIn0p8Seconds MTR_DEPRECATED("Please use MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x00, + MTROnOffDelayedAllOffEffectVariantNoFade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTROnOffDelayedAllOffEffectVariantDelayedOffSlowFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROnOffDelayedAllOffEffectVariant50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds MTR_DEPRECATED("Please use MTROnOffDelayedAllOffEffectVariantDelayedOffSlowFade", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt48sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt48sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROnOffDyingLightEffectVariant) { + MTROnOffDyingLightEffectVariantDyingLightFadeOff MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROnOffDyingLightEffectVariant20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second MTR_DEPRECATED("Please use MTROnOffDyingLightEffectVariantDyingLightFadeOff", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x00, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt56sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt56sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROnOffEffectIdentifier) { + MTROnOffEffectIdentifierDelayedAllOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTROnOffEffectIdentifierDyingLight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeInt64sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeInt64sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROnOffStartUpOnOff) { + MTROnOffStartUpOnOffOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTROnOffStartUpOnOffOn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTROnOffStartUpOnOffToggle MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROnOffStartUpOnOffTogglePreviousOnOff MTR_DEPRECATED("Please use MTROnOffStartUpOnOffToggle", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnum8WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnum8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnum16WithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnum16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFloatSingleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFloatSingleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTROnOffFeature) { + MTROnOffFeatureLighting MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTROnOffFeatureDeadFrontBehavior MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x2, + MTROnOffFeatureDeadFront MTR_DEPRECATED("Please use MTROnOffFeatureDeadFrontBehavior", ios(17.1, 17.2), macos(14.1, 14.2), watchos(10.1, 10.2), tvos(17.1, 17.2)) = 0x2, + MTROnOffFeatureOffOnly MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeFloatDoubleWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFloatDoubleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTROnOffControlBitmap) { + MTROnOffControlBitmapAcceptOnlyWhenOn MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x1, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTROnOffControl) { + MTROnOffControlAcceptOnlyWhenOn MTR_DEPRECATED("Please use MTROnOffControlBitmapAcceptOnlyWhenOn", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x1, +} MTR_DEPRECATED("Please use MTROnOffControlBitmap", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)); -- (void)readAttributeListInt8uWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListInt8uWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRLevelControlMoveMode) { + MTRLevelControlMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRLevelControlMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeListOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRLevelControlStepMode) { + MTRLevelControlStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRLevelControlStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeListStructOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListStructOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListStructOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListStructOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRLevelControlFeature) { + MTRLevelControlFeatureOnOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRLevelControlFeatureLighting MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRLevelControlFeatureFrequency MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeLongOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLongOctetStringWithValue:(NSData * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLongOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTRLevelControlOptionsBitmap) { + MTRLevelControlOptionsBitmapExecuteIfOff MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, + MTRLevelControlOptionsBitmapCoupleColorTempToLevel MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTRLevelControlOptions) { + MTRLevelControlOptionsExecuteIfOff MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmapExecuteIfOff", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x1, + MTRLevelControlOptionsCoupleColorTempToLevel MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmapCoupleColorTempToLevel", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x2, +} MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmap", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)); -- (void)readAttributeLongCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeLongCharStringWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeLongCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeLongCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRDescriptorFeature) { + MTRDescriptorFeatureTagList MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeEpochUsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEpochUsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEpochUsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEpochUsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlEntryAuthMode) { + MTRAccessControlEntryAuthModePASE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRAccessControlEntryAuthModeCASE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRAccessControlEntryAuthModeGroup MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeEpochSWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEpochSWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEpochSWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEpochSWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlAuthMode) { + MTRAccessControlAuthModePASE MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModePASE", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRAccessControlAuthModeCASE MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModeCASE", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRAccessControlAuthModeGroup MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModeGroup", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTRAccessControlEntryAuthMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeVendorIdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeVendorIdWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlEntryPrivilege) { + MTRAccessControlEntryPrivilegeView MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRAccessControlEntryPrivilegeProxyView MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRAccessControlEntryPrivilegeOperate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRAccessControlEntryPrivilegeManage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRAccessControlEntryPrivilegeAdminister MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeListNullablesAndOptionalsStructWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListNullablesAndOptionalsStructWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListNullablesAndOptionalsStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListNullablesAndOptionalsStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlPrivilege) { + MTRAccessControlPrivilegeView MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeView", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRAccessControlPrivilegeProxyView MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeProxyView", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRAccessControlPrivilegeOperate MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeOperate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRAccessControlPrivilegeManage MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeManage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRAccessControlPrivilegeAdminister MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeAdminister", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, +} MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilege", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeEnumAttrWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeEnumAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlAccessRestrictionType) { + MTRAccessControlAccessRestrictionTypeAttributeAccessForbidden MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRAccessControlAccessRestrictionTypeAttributeWriteForbidden MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRAccessControlAccessRestrictionTypeCommandForbidden MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRAccessControlAccessRestrictionTypeEventForbidden MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStructAttrWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeStructAttrWithValue:(MTRUnitTestingClusterSimpleStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeStructAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeStructAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRAccessControlChangeType) { + MTRAccessControlChangeTypeChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRAccessControlChangeTypeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRAccessControlChangeTypeRemoved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRAccessControlFeature) { + MTRAccessControlFeatureExtension MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRAccessControlFeatureManagedDevice MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt8sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRActionsActionError) { + MTRActionsActionErrorUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRActionsActionErrorInterrupted MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt16uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRActionsActionState) { + MTRActionsActionStateInactive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRActionsActionStateActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRActionsActionStatePaused MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRActionsActionStateDisabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeRangeRestrictedInt16sWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRActionsActionType) { + MTRActionsActionTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRActionsActionTypeScene MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRActionsActionTypeSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRActionsActionTypeAutomation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRActionsActionTypeException MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRActionsActionTypeNotification MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRActionsActionTypeAlarm MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeListLongOctetStringWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListLongOctetStringWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListLongOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListLongOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRActionsEndpointListType) { + MTRActionsEndpointListTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRActionsEndpointListTypeRoom MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRActionsEndpointListTypeZone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeListFabricScopedWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeListFabricScopedWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeListFabricScopedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeListFabricScopedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint16_t, MTRActionsCommandBits) { + MTRActionsCommandBitsInstantAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRActionsCommandBitsInstantActionWithTransition MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRActionsCommandBitsStartAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRActionsCommandBitsStartActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRActionsCommandBitsStopAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRActionsCommandBitsPauseAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRActionsCommandBitsPauseActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRActionsCommandBitsResumeAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, + MTRActionsCommandBitsEnableAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, + MTRActionsCommandBitsEnableActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, + MTRActionsCommandBitsDisableAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, + MTRActionsCommandBitsDisableActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeTimedWriteBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeTimedWriteBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeTimedWriteBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeTimedWriteBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRBasicInformationColor) { + MTRBasicInformationColorBlack MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBasicInformationColorNavy MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBasicInformationColorGreen MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBasicInformationColorTeal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBasicInformationColorMaroon MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBasicInformationColorPurple MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRBasicInformationColorOlive MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, + MTRBasicInformationColorGray MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, + MTRBasicInformationColorBlue MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, + MTRBasicInformationColorLime MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, + MTRBasicInformationColorAqua MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, + MTRBasicInformationColorRed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, + MTRBasicInformationColorFuchsia MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, + MTRBasicInformationColorYellow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, + MTRBasicInformationColorWhite MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, + MTRBasicInformationColorNickel MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, + MTRBasicInformationColorChrome MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRBasicInformationColorBrass MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, + MTRBasicInformationColorCopper MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, + MTRBasicInformationColorSilver MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, + MTRBasicInformationColorGold MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeGeneralErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeGeneralErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneralErrorBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneralErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRBasicInformationProductFinish) { + MTRBasicInformationProductFinishOther MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBasicInformationProductFinishMatte MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBasicInformationProductFinishSatin MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBasicInformationProductFinishPolished MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBasicInformationProductFinishRugged MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBasicInformationProductFinishFabric MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeClusterErrorBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeClusterErrorBooleanWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterErrorBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterErrorBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderApplyUpdateAction) { + MTROTASoftwareUpdateProviderApplyUpdateActionProceed MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateProviderApplyUpdateActionAwaitNextAction MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateProviderApplyUpdateActionDiscontinue MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeGlobalEnumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeGlobalEnumWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeGlobalEnumWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeGlobalEnumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGlobalEnumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAApplyUpdateAction) { + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionProceed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionAwaitNextAction", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateProviderOTAApplyUpdateActionDiscontinue MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionDiscontinue", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateAction", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGlobalStructWithCompletion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeGlobalStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGlobalStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderDownloadProtocol) { + MTROTASoftwareUpdateProviderDownloadProtocolBDXSynchronous MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateProviderDownloadProtocolBDXAsynchronous MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateProviderDownloadProtocolHTTPS MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROTASoftwareUpdateProviderDownloadProtocolVendorSpecific MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeUnsupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeUnsupportedWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeUnsupportedWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTADownloadProtocol) { + MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXSynchronous", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXAsynchronous MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXAsynchronous", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateProviderOTADownloadProtocolHTTPS MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolHTTPS", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTROtaSoftwareUpdateProviderOTADownloadProtocolVendorSpecific MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolVendorSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocol", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeReadFailureCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeReadFailureCodeWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeReadFailureCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderStatus) { + MTROTASoftwareUpdateProviderStatusUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateProviderStatusBusy MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateProviderStatusNotAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROTASoftwareUpdateProviderStatusDownloadProtocolNotSupported MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeFailureInt32UWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeFailureInt32UWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFailureInt32UWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAQueryStatus) { + MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateProviderOTAQueryStatusBusy MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusBusy", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusNotAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusDownloadProtocolNotSupported", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableBooleanWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableBooleanWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorAnnouncementReason) { + MTROTASoftwareUpdateRequestorAnnouncementReasonSimpleAnnouncement MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateRequestorAnnouncementReasonUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateRequestorAnnouncementReasonUrgentUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeNullableBitmap8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableBitmap8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableBitmap8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAAnnouncementReason) { + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonSimpleAnnouncement", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUrgentUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUrgentUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNullableBitmap16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableBitmap16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableBitmap16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorChangeReason) { + MTROTASoftwareUpdateRequestorChangeReasonUnknown MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateRequestorChangeReasonSuccess MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateRequestorChangeReasonFailure MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROTASoftwareUpdateRequestorChangeReasonTimeOut MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, + MTROTASoftwareUpdateRequestorChangeReasonDelayByProvider MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x04, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeNullableBitmap32WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap32WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableBitmap32WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableBitmap32WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAChangeReason) { + MTROtaSoftwareUpdateRequestorOTAChangeReasonUnknown MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonUnknown", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateRequestorOTAChangeReasonSuccess MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonSuccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateRequestorOTAChangeReasonFailure MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTROtaSoftwareUpdateRequestorOTAChangeReasonTimeOut MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonTimeOut", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTROtaSoftwareUpdateRequestorOTAChangeReasonDelayByProvider MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonDelayByProvider", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNullableBitmap64WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableBitmap64WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableBitmap64WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableBitmap64WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorUpdateState) { + MTROTASoftwareUpdateRequestorUpdateStateUnknown MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, + MTROTASoftwareUpdateRequestorUpdateStateIdle MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, + MTROTASoftwareUpdateRequestorUpdateStateQuerying MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, + MTROTASoftwareUpdateRequestorUpdateStateDelayedOnQuery MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, + MTROTASoftwareUpdateRequestorUpdateStateDownloading MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x04, + MTROTASoftwareUpdateRequestorUpdateStateApplying MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x05, + MTROTASoftwareUpdateRequestorUpdateStateDelayedOnApply MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x06, + MTROTASoftwareUpdateRequestorUpdateStateRollingBack MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x07, + MTROTASoftwareUpdateRequestorUpdateStateDelayedOnUserConsent MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x08, +} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); -- (void)readAttributeNullableInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAUpdateState) { + MTROtaSoftwareUpdateRequestorOTAUpdateStateUnknown MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateUnknown", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROtaSoftwareUpdateRequestorOTAUpdateStateIdle MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateIdle", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROtaSoftwareUpdateRequestorOTAUpdateStateQuerying MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateQuerying", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnQuery MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnQuery", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDownloading MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDownloading", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTROtaSoftwareUpdateRequestorOTAUpdateStateApplying MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateApplying", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnApply MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnApply", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTROtaSoftwareUpdateRequestorOTAUpdateStateRollingBack MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateRollingBack", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnUserConsent MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnUserConsent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateState", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNullableInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationCalendarType) { + MTRTimeFormatLocalizationCalendarTypeBuddhist MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRTimeFormatLocalizationCalendarTypeChinese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRTimeFormatLocalizationCalendarTypeCoptic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRTimeFormatLocalizationCalendarTypeEthiopian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRTimeFormatLocalizationCalendarTypeGregorian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRTimeFormatLocalizationCalendarTypeHebrew MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRTimeFormatLocalizationCalendarTypeIndian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRTimeFormatLocalizationCalendarTypeIslamic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRTimeFormatLocalizationCalendarTypeJapanese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRTimeFormatLocalizationCalendarTypeKorean MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRTimeFormatLocalizationCalendarTypePersian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRTimeFormatLocalizationCalendarTypeTaiwanese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRTimeFormatLocalizationCalendarTypeUseActiveLocale MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt24uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt24uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt24uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt24uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeNullableInt32uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt32uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt32uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt32uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationHourFormat) { + MTRTimeFormatLocalizationHourFormat12hr MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRTimeFormatLocalizationHourFormat24hr MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRTimeFormatLocalizationHourFormatUseActiveLocale MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt40uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt40uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt40uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt40uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRTimeFormatLocalizationFeature) { + MTRTimeFormatLocalizationFeatureCalendarFormat MTR_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)) = 0x1, +} MTR_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)); -- (void)readAttributeNullableInt48uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt48uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt48uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt48uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRUnitLocalizationTempUnit) { + MTRUnitLocalizationTempUnitFahrenheit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRUnitLocalizationTempUnitCelsius MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRUnitLocalizationTempUnitKelvin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt56uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt56uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt56uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt56uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRUnitLocalizationFeature) { + MTRUnitLocalizationFeatureTemperatureUnit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt64uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt64uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt64uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt64uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint16_t, MTRPowerSourceBatApprovedChemistry) { + MTRPowerSourceBatApprovedChemistryUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPowerSourceBatApprovedChemistryAlkaline MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRPowerSourceBatApprovedChemistryLithiumCarbonFluoride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRPowerSourceBatApprovedChemistryLithiumChromiumOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, + MTRPowerSourceBatApprovedChemistryLithiumCopperOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, + MTRPowerSourceBatApprovedChemistryLithiumIronDisulfide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, + MTRPowerSourceBatApprovedChemistryLithiumManganeseDioxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x06, + MTRPowerSourceBatApprovedChemistryLithiumThionylChloride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, + MTRPowerSourceBatApprovedChemistryMagnesium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x08, + MTRPowerSourceBatApprovedChemistryMercuryOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, + MTRPowerSourceBatApprovedChemistryNickelOxyhydride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, + MTRPowerSourceBatApprovedChemistrySilverOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0B, + MTRPowerSourceBatApprovedChemistryZincAir MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0C, + MTRPowerSourceBatApprovedChemistryZincCarbon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0D, + MTRPowerSourceBatApprovedChemistryZincChloride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0E, + MTRPowerSourceBatApprovedChemistryZincManganeseDioxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0F, + MTRPowerSourceBatApprovedChemistryLeadAcid MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, + MTRPowerSourceBatApprovedChemistryLithiumCobaltOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x11, + MTRPowerSourceBatApprovedChemistryLithiumIon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x12, + MTRPowerSourceBatApprovedChemistryLithiumIonPolymer MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x13, + MTRPowerSourceBatApprovedChemistryLithiumIronPhosphate MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x14, + MTRPowerSourceBatApprovedChemistryLithiumSulfur MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x15, + MTRPowerSourceBatApprovedChemistryLithiumTitanate MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x16, + MTRPowerSourceBatApprovedChemistryNickelCadmium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x17, + MTRPowerSourceBatApprovedChemistryNickelHydrogen MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x18, + MTRPowerSourceBatApprovedChemistryNickelIron MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x19, + MTRPowerSourceBatApprovedChemistryNickelMetalHydride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1A, + MTRPowerSourceBatApprovedChemistryNickelZinc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1B, + MTRPowerSourceBatApprovedChemistrySilverZinc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1C, + MTRPowerSourceBatApprovedChemistrySodiumIon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1D, + MTRPowerSourceBatApprovedChemistrySodiumSulfur MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1E, + MTRPowerSourceBatApprovedChemistryZincBromide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1F, + MTRPowerSourceBatApprovedChemistryZincCerium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeNullableInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeFault) { + MTRPowerSourceBatChargeFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRPowerSourceBatChargeFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceBatChargeFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRPowerSourceBatChargeFaultAmbientTooHot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceBatChargeFaultAmbientTooCold MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRPowerSourceBatChargeFaultBatteryTooHot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRPowerSourceBatChargeFaultBatteryTooCold MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRPowerSourceBatChargeFaultBatteryAbsent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRPowerSourceBatChargeFaultBatteryOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRPowerSourceBatChargeFaultBatteryUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRPowerSourceBatChargeFaultChargerOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRPowerSourceBatChargeFaultChargerUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRPowerSourceBatChargeFaultSafetyTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeLevel) { + MTRPowerSourceBatChargeLevelOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRPowerSourceBatChargeLevelOk MTR_DEPRECATED("Please use MTRPowerSourceBatChargeLevelOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRPowerSourceBatChargeLevelWarning MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceBatChargeLevelCritical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt24sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt24sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt24sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt24sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeState) { + MTRPowerSourceBatChargeStateUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRPowerSourceBatChargeStateIsCharging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceBatChargeStateIsAtFullCharge MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRPowerSourceBatChargeStateIsNotCharging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt32sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt32sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt32sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt32sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint16_t, MTRPowerSourceBatCommonDesignation) { + MTRPowerSourceBatCommonDesignationUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPowerSourceBatCommonDesignationAAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRPowerSourceBatCommonDesignationAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRPowerSourceBatCommonDesignationC MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, + MTRPowerSourceBatCommonDesignationD MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, + MTRPowerSourceBatCommonDesignation4v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, + MTRPowerSourceBatCommonDesignation6v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x06, + MTRPowerSourceBatCommonDesignation9v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, + MTRPowerSourceBatCommonDesignation12AA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x08, + MTRPowerSourceBatCommonDesignationAAAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, + MTRPowerSourceBatCommonDesignationA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, + MTRPowerSourceBatCommonDesignationB MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0B, + MTRPowerSourceBatCommonDesignationF MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0C, + MTRPowerSourceBatCommonDesignationN MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0D, + MTRPowerSourceBatCommonDesignationNo6 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0E, + MTRPowerSourceBatCommonDesignationSubC MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0F, + MTRPowerSourceBatCommonDesignationA23 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, + MTRPowerSourceBatCommonDesignationA27 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x11, + MTRPowerSourceBatCommonDesignationBA5800 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x12, + MTRPowerSourceBatCommonDesignationDuplex MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x13, + MTRPowerSourceBatCommonDesignation4SR44 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x14, + MTRPowerSourceBatCommonDesignation523 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x15, + MTRPowerSourceBatCommonDesignation531 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x16, + MTRPowerSourceBatCommonDesignation15v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x17, + MTRPowerSourceBatCommonDesignation22v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x18, + MTRPowerSourceBatCommonDesignation30v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x19, + MTRPowerSourceBatCommonDesignation45v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1A, + MTRPowerSourceBatCommonDesignation67v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1B, + MTRPowerSourceBatCommonDesignationJ MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1C, + MTRPowerSourceBatCommonDesignationCR123A MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1D, + MTRPowerSourceBatCommonDesignationCR2 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1E, + MTRPowerSourceBatCommonDesignation2CR5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1F, + MTRPowerSourceBatCommonDesignationCRP2 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, + MTRPowerSourceBatCommonDesignationCRV3 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x21, + MTRPowerSourceBatCommonDesignationSR41 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x22, + MTRPowerSourceBatCommonDesignationSR43 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x23, + MTRPowerSourceBatCommonDesignationSR44 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x24, + MTRPowerSourceBatCommonDesignationSR45 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x25, + MTRPowerSourceBatCommonDesignationSR48 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x26, + MTRPowerSourceBatCommonDesignationSR54 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x27, + MTRPowerSourceBatCommonDesignationSR55 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x28, + MTRPowerSourceBatCommonDesignationSR57 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x29, + MTRPowerSourceBatCommonDesignationSR58 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2A, + MTRPowerSourceBatCommonDesignationSR59 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2B, + MTRPowerSourceBatCommonDesignationSR60 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2C, + MTRPowerSourceBatCommonDesignationSR63 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2D, + MTRPowerSourceBatCommonDesignationSR64 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2E, + MTRPowerSourceBatCommonDesignationSR65 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2F, + MTRPowerSourceBatCommonDesignationSR66 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x30, + MTRPowerSourceBatCommonDesignationSR67 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x31, + MTRPowerSourceBatCommonDesignationSR68 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x32, + MTRPowerSourceBatCommonDesignationSR69 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x33, + MTRPowerSourceBatCommonDesignationSR516 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x34, + MTRPowerSourceBatCommonDesignationSR731 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x35, + MTRPowerSourceBatCommonDesignationSR712 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x36, + MTRPowerSourceBatCommonDesignationLR932 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x37, + MTRPowerSourceBatCommonDesignationA5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x38, + MTRPowerSourceBatCommonDesignationA10 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x39, + MTRPowerSourceBatCommonDesignationA13 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3A, + MTRPowerSourceBatCommonDesignationA312 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3B, + MTRPowerSourceBatCommonDesignationA675 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3C, + MTRPowerSourceBatCommonDesignationAC41E MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3D, + MTRPowerSourceBatCommonDesignation10180 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3E, + MTRPowerSourceBatCommonDesignation10280 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3F, + MTRPowerSourceBatCommonDesignation10440 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x40, + MTRPowerSourceBatCommonDesignation14250 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x41, + MTRPowerSourceBatCommonDesignation14430 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x42, + MTRPowerSourceBatCommonDesignation14500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x43, + MTRPowerSourceBatCommonDesignation14650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x44, + MTRPowerSourceBatCommonDesignation15270 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x45, + MTRPowerSourceBatCommonDesignation16340 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x46, + MTRPowerSourceBatCommonDesignationRCR123A MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x47, + MTRPowerSourceBatCommonDesignation17500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x48, + MTRPowerSourceBatCommonDesignation17670 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x49, + MTRPowerSourceBatCommonDesignation18350 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4A, + MTRPowerSourceBatCommonDesignation18500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4B, + MTRPowerSourceBatCommonDesignation18650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4C, + MTRPowerSourceBatCommonDesignation19670 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4D, + MTRPowerSourceBatCommonDesignation25500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4E, + MTRPowerSourceBatCommonDesignation26650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4F, + MTRPowerSourceBatCommonDesignation32600 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x50, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeNullableInt40sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt40sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt40sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt40sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceBatFault) { + MTRPowerSourceBatFaultUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPowerSourceBatFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceBatFaultUnspecified", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRPowerSourceBatFaultOverTemp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceBatFaultUnderTemp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt48sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt48sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt48sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt48sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceBatReplaceability) { + MTRPowerSourceBatReplaceabilityUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRPowerSourceBatReplaceabilityNotReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceBatReplaceabilityUserReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRPowerSourceBatReplaceabilityFactoryReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt56sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt56sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt56sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt56sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceStatus) { + MTRPowerSourceStatusUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRPowerSourceStatusUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceStatusUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRPowerSourceStatusActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceStatusStandby MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRPowerSourceStatusUnavailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableInt64sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableInt64sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableInt64sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableInt64sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceWiredCurrentType) { + MTRPowerSourceWiredCurrentTypeAC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRPowerSourceWiredCurrentTypeDC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableEnum8WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnum8WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableEnum8WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableEnum8WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRPowerSourceWiredFault) { + MTRPowerSourceWiredFaultUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPowerSourceWiredFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceWiredFaultUnspecified", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRPowerSourceWiredFaultOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRPowerSourceWiredFaultUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableEnum16WithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnum16WithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableEnum16WithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableEnum16WithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRPowerSourceFeature) { + MTRPowerSourceFeatureWired MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRPowerSourceFeatureBattery MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRPowerSourceFeatureRechargeable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRPowerSourceFeatureReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableFloatSingleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableFloatSingleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableFloatSingleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableFloatSingleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRGeneralCommissioningCommissioningError) { + MTRGeneralCommissioningCommissioningErrorOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRGeneralCommissioningCommissioningErrorOk MTR_DEPRECATED("Please use MTRGeneralCommissioningCommissioningErrorOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRGeneralCommissioningCommissioningErrorValueOutsideRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRGeneralCommissioningCommissioningErrorInvalidAuthentication MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRGeneralCommissioningCommissioningErrorNoFailSafe MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRGeneralCommissioningCommissioningErrorBusyWithOtherAdmin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRGeneralCommissioningCommissioningErrorRequiredTCNotAccepted MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRGeneralCommissioningCommissioningErrorTCAcknowledgementsNotReceived MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRGeneralCommissioningCommissioningErrorTCMinVersionNotMet MTR_PROVISIONALLY_AVAILABLE = 0x07, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableFloatDoubleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableFloatDoubleWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableFloatDoubleWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableFloatDoubleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRGeneralCommissioningRegulatoryLocationType) { + MTRGeneralCommissioningRegulatoryLocationTypeIndoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRGeneralCommissioningRegulatoryLocationTypeOutdoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRGeneralCommissioningRegulatoryLocationTypeIndoorOutdoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableOctetStringWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableOctetStringWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableOctetStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableOctetStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRGeneralCommissioningFeature) { + MTRGeneralCommissioningFeatureTermsAndConditions MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeNullableCharStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableCharStringWithValue:(NSString * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableCharStringWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableCharStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRNetworkCommissioningStatus) { + MTRNetworkCommissioningStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRNetworkCommissioningStatusOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRNetworkCommissioningStatusBoundsExceeded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRNetworkCommissioningStatusNetworkIDNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRNetworkCommissioningStatusDuplicateNetworkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRNetworkCommissioningStatusNetworkNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRNetworkCommissioningStatusRegulatoryError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRNetworkCommissioningStatusAuthFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRNetworkCommissioningStatusUnsupportedSecurity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRNetworkCommissioningStatusOtherConnectionFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRNetworkCommissioningStatusIPV6Failed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRNetworkCommissioningStatusIPBindFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRNetworkCommissioningStatusUnknownError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableEnumAttrWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableEnumAttrWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableEnumAttrWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableEnumAttrWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRNetworkCommissioningWiFiBand) { + MTRNetworkCommissioningWiFiBand2G4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRNetworkCommissioningWiFiBand3G65 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRNetworkCommissioningWiFiBand5G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRNetworkCommissioningWiFiBand6G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRNetworkCommissioningWiFiBand60G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRNetworkCommissioningWiFiBand1G MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableStructWithCompletion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableStructWithValue:(MTRUnitTestingClusterSimpleStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRUnitTestingClusterSimpleStruct * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint32_t, MTRNetworkCommissioningFeature) { + MTRNetworkCommissioningFeatureWiFiNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRNetworkCommissioningFeatureThreadNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRNetworkCommissioningFeatureEthernetNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRNetworkCommissioningFeaturePerDeviceCredentials MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNullableRangeRestrictedInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt8uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableRangeRestrictedInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableRangeRestrictedInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint16_t, MTRNetworkCommissioningThreadCapabilitiesBitmap) { + MTRNetworkCommissioningThreadCapabilitiesBitmapIsBorderRouterCapable MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRNetworkCommissioningThreadCapabilitiesBitmapIsRouterCapable MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRNetworkCommissioningThreadCapabilitiesBitmapIsSleepyEndDeviceCapable MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRNetworkCommissioningThreadCapabilitiesBitmapIsFullThreadDevice MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRNetworkCommissioningThreadCapabilitiesBitmapIsSynchronizedSleepyEndDeviceCapable MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeNullableRangeRestrictedInt8sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt8sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableRangeRestrictedInt8sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableRangeRestrictedInt8sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurityBitmap) { + MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRNetworkCommissioningWiFiSecurityBitmapWEP MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, + MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, + MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRNetworkCommissioningWiFiSecurityBitmapWPA3MatterPDC MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeNullableRangeRestrictedInt16uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt16uWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableRangeRestrictedInt16uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableRangeRestrictedInt16uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurity) { + MTRNetworkCommissioningWiFiSecurityUnencrypted MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, + MTRNetworkCommissioningWiFiSecurityWEP MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, + MTRNetworkCommissioningWiFiSecurityWepPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRNetworkCommissioningWiFiSecurityWPAPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x4, + MTRNetworkCommissioningWiFiSecurityWpaPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal") = 0x4, + MTRNetworkCommissioningWiFiSecurityWPA2Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x8, + MTRNetworkCommissioningWiFiSecurityWpa2Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal") = 0x8, + MTRNetworkCommissioningWiFiSecurityWPA3Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x10, + MTRNetworkCommissioningWiFiSecurityWpa3Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal") = 0x10, +} MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeNullableRangeRestrictedInt16sWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeNullableRangeRestrictedInt16sWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeNullableRangeRestrictedInt16sWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeNullableRangeRestrictedInt16sWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsIntent) { + MTRDiagnosticLogsIntentEndUserSupport MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRDiagnosticLogsIntentNetworkDiag MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRDiagnosticLogsIntentCrashLogs MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeWriteOnlyInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeWriteOnlyInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeWriteOnlyInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeWriteOnlyInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsIntent) { + MTRDiagnosticLogsLogsIntentEndUserSupport MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentEndUserSupport", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRDiagnosticLogsLogsIntentNetworkDiag MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentNetworkDiag", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, + MTRDiagnosticLogsLogsIntentCrashLogs MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentCrashLogs", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, +} MTR_DEPRECATED("Please use MTRDiagnosticLogsIntent", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -- (void)readAttributeNullableGlobalEnumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNullableGlobalEnumWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNullableGlobalEnumWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeNullableGlobalEnumWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNullableGlobalEnumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsStatus) { + MTRDiagnosticLogsStatusSuccess MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRDiagnosticLogsStatusExhausted MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRDiagnosticLogsStatusNoLogs MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRDiagnosticLogsStatusBusy MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, + MTRDiagnosticLogsStatusDenied MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeNullableGlobalStructWithCompletion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNullableGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nullable)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeNullableGlobalStructWithValue:(MTRDataTypeTestGlobalStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeNullableGlobalStructWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeNullableGlobalStructWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeTestGlobalStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsStatus) { + MTRDiagnosticLogsLogsStatusSuccess MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusSuccess", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRDiagnosticLogsLogsStatusExhausted MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusExhausted", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, + MTRDiagnosticLogsLogsStatusNoLogs MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusNoLogs", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, + MTRDiagnosticLogsLogsStatusBusy MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusBusy", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, + MTRDiagnosticLogsLogsStatusDenied MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusDenied", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x04, +} MTR_DEPRECATED("Please use MTRDiagnosticLogsStatus", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsTransferProtocol) { + MTRDiagnosticLogsTransferProtocolResponsePayload MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRDiagnosticLogsTransferProtocolBDX MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsTransferProtocol) { + MTRDiagnosticLogsLogsTransferProtocolResponsePayload MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocolResponsePayload", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRDiagnosticLogsLogsTransferProtocolBDX MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocolBDX", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, +} MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocol", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsBootReason) { + MTRGeneralDiagnosticsBootReasonUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRGeneralDiagnosticsBootReasonPowerOnReboot MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRGeneralDiagnosticsBootReasonBrownOutReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRGeneralDiagnosticsBootReasonSoftwareWatchdogReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRGeneralDiagnosticsBootReasonHardwareWatchdogReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRGeneralDiagnosticsBootReasonSoftwareUpdateCompleted MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRGeneralDiagnosticsBootReasonSoftwareReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsBootReasonType) { + MTRGeneralDiagnosticsBootReasonTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRGeneralDiagnosticsBootReasonTypePowerOnReboot MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonPowerOnReboot", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRGeneralDiagnosticsBootReasonTypeBrownOutReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonBrownOutReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRGeneralDiagnosticsBootReasonTypeSoftwareWatchdogReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareWatchdogReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRGeneralDiagnosticsBootReasonTypeHardwareWatchdogReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonHardwareWatchdogReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRGeneralDiagnosticsBootReasonTypeSoftwareUpdateCompleted MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareUpdateCompleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRGeneralDiagnosticsBootReasonTypeSoftwareReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, +} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeiInt8uWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeMeiInt8uWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeMeiInt8uWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeMeiInt8uWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsHardwareFault) { + MTRGeneralDiagnosticsHardwareFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRGeneralDiagnosticsHardwareFaultRadio MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRGeneralDiagnosticsHardwareFaultSensor MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRGeneralDiagnosticsHardwareFaultResettableOverTemp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRGeneralDiagnosticsHardwareFaultNonResettableOverTemp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRGeneralDiagnosticsHardwareFaultPowerSource MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRGeneralDiagnosticsHardwareFaultVisualDisplayFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTRGeneralDiagnosticsHardwareFaultAudioOutputFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTRGeneralDiagnosticsHardwareFaultUserInterfaceFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTRGeneralDiagnosticsHardwareFaultNonVolatileMemoryError MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTRGeneralDiagnosticsHardwareFaultTamperDetected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsHardwareFaultType) { + MTRGeneralDiagnosticsHardwareFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRGeneralDiagnosticsHardwareFaultTypeRadio MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultRadio", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRGeneralDiagnosticsHardwareFaultTypeSensor MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultSensor", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRGeneralDiagnosticsHardwareFaultTypeResettableOverTemp MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultResettableOverTemp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRGeneralDiagnosticsHardwareFaultTypeNonResettableOverTemp MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultNonResettableOverTemp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRGeneralDiagnosticsHardwareFaultTypePowerSource MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultPowerSource", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRGeneralDiagnosticsHardwareFaultTypeVisualDisplayFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultVisualDisplayFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRGeneralDiagnosticsHardwareFaultTypeAudioOutputFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultAudioOutputFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRGeneralDiagnosticsHardwareFaultTypeUserInterfaceFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultUserInterfaceFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, + MTRGeneralDiagnosticsHardwareFaultTypeNonVolatileMemoryError MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultNonVolatileMemoryError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, + MTRGeneralDiagnosticsHardwareFaultTypeTamperDetected MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultTamperDetected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, +} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsInterfaceType) { + MTRGeneralDiagnosticsInterfaceTypeUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRGeneralDiagnosticsInterfaceTypeWiFi MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRGeneralDiagnosticsInterfaceTypeEthernet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRGeneralDiagnosticsInterfaceTypeCellular MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRGeneralDiagnosticsInterfaceTypeThread MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@interface MTRBaseClusterUnitTesting (Availability) +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsNetworkFault) { + MTRGeneralDiagnosticsNetworkFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRGeneralDiagnosticsNetworkFaultHardwareFailure MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRGeneralDiagnosticsNetworkFaultNetworkJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRGeneralDiagnosticsNetworkFaultConnectionFailed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsNetworkFaultType) { + MTRGeneralDiagnosticsNetworkFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRGeneralDiagnosticsNetworkFaultTypeHardwareFailure MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultHardwareFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRGeneralDiagnosticsNetworkFaultTypeNetworkJammed MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultNetworkJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRGeneralDiagnosticsNetworkFaultTypeConnectionFailed MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultConnectionFailed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsRadioFault) { + MTRGeneralDiagnosticsRadioFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRGeneralDiagnosticsRadioFaultWiFiFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRGeneralDiagnosticsRadioFaultCellularFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRGeneralDiagnosticsRadioFaultThreadFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRGeneralDiagnosticsRadioFaultNFCFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRGeneralDiagnosticsRadioFaultBLEFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRGeneralDiagnosticsRadioFaultEthernetFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Cluster Sample MEI - * - * The Sample MEI cluster showcases a cluster manufacturer extensions - */ -MTR_PROVISIONALLY_AVAILABLE -@interface MTRBaseClusterSampleMEI : MTRGenericBaseCluster +typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsRadioFaultType) { + MTRGeneralDiagnosticsRadioFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRGeneralDiagnosticsRadioFaultTypeWiFiFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultWiFiFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRGeneralDiagnosticsRadioFaultTypeCellularFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultCellularFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRGeneralDiagnosticsRadioFaultTypeThreadFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultThreadFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRGeneralDiagnosticsRadioFaultTypeNFCFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultNFCFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRGeneralDiagnosticsRadioFaultTypeBLEFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultBLEFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRGeneralDiagnosticsRadioFaultTypeEthernetFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultEthernetFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, +} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -/** - * Command Ping - * - * Simple command without any parameters and without a response. - */ -- (void)pingWithParams:(MTRSampleMEIClusterPingParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)pingWithCompletion:(MTRStatusCompletion)completion - MTR_PROVISIONALLY_AVAILABLE; -/** - * Command AddArguments - * - * Command that takes two uint8 arguments and returns their sum. - */ -- (void)addArgumentsWithParams:(MTRSampleMEIClusterAddArgumentsParams *)params completion:(void (^)(MTRSampleMEIClusterAddArgumentsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRGeneralDiagnosticsFeature) { + MTRGeneralDiagnosticsFeatureDataModelTest MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeFlipFlopWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeFlipFlopWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)writeAttributeFlipFlopWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeFlipFlopWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFlipFlopWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRSoftwareDiagnosticsFeature) { + MTRSoftwareDiagnosticsFeatureWatermarks MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, + MTRSoftwareDiagnosticsFeatureWaterMarks MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsFeatureWatermarks", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsConnectionStatus) { + MTRThreadNetworkDiagnosticsConnectionStatusConnected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRThreadNetworkDiagnosticsConnectionStatusNotConnected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsThreadConnectionStatus) { + MTRThreadNetworkDiagnosticsThreadConnectionStatusConnected MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatusConnected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRThreadNetworkDiagnosticsThreadConnectionStatusNotConnected MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatusNotConnected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, +} MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsNetworkFault) { + MTRThreadNetworkDiagnosticsNetworkFaultUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThreadNetworkDiagnosticsNetworkFaultLinkDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRThreadNetworkDiagnosticsNetworkFaultHardwareFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRThreadNetworkDiagnosticsNetworkFaultNetworkJammed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsRoutingRole) { + MTRThreadNetworkDiagnosticsRoutingRoleUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThreadNetworkDiagnosticsRoutingRoleUnassigned MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRThreadNetworkDiagnosticsRoutingRoleSleepyEndDevice MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRThreadNetworkDiagnosticsRoutingRoleEndDevice MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThreadNetworkDiagnosticsRoutingRoleREED MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRThreadNetworkDiagnosticsRoutingRoleRouter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRThreadNetworkDiagnosticsRoutingRoleLeader MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRThreadNetworkDiagnosticsFeature) { + MTRThreadNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRThreadNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRThreadNetworkDiagnosticsFeatureMLECounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRThreadNetworkDiagnosticsFeatureMACCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsAssociationFailureCause) { + MTRWiFiNetworkDiagnosticsAssociationFailureCauseUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRWiFiNetworkDiagnosticsAssociationFailureCauseAssociationFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRWiFiNetworkDiagnosticsAssociationFailureCauseAuthenticationFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRWiFiNetworkDiagnosticsAssociationFailureCauseSsidNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsConnectionStatus) { + MTRWiFiNetworkDiagnosticsConnectionStatusConnected MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -@end +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiConnectionStatus) { + MTRWiFiNetworkDiagnosticsWiFiConnectionStatusConnected MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusConnected", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRWiFiNetworkDiagnosticsWiFiConnectionStatusNotConnected MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, +} MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatus", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -@interface MTRBaseClusterSampleMEI (Availability) +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsSecurityType) { + MTRWiFiNetworkDiagnosticsSecurityTypeUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRWiFiNetworkDiagnosticsSecurityTypeNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRWiFiNetworkDiagnosticsSecurityTypeWEP MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRWiFiNetworkDiagnosticsSecurityTypeWPA MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRWiFiNetworkDiagnosticsSecurityTypeWPA2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRWiFiNetworkDiagnosticsSecurityTypeWPA3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * For all instance methods (reads, writes, commands) that take a completion, - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersion) { + MTRWiFiNetworkDiagnosticsWiFiVersionA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRWiFiNetworkDiagnosticsWiFiVersionB MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRWiFiNetworkDiagnosticsWiFiVersionG MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRWiFiNetworkDiagnosticsWiFiVersionN MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, + MTRWiFiNetworkDiagnosticsWiFiVersionAc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, + MTRWiFiNetworkDiagnosticsWiFiVersionAx MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, + MTRWiFiNetworkDiagnosticsWiFiVersionAh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -@end - -MTR_DEPRECATED("Please use MTRBaseClusterBasicInformation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBaseClusterBasic : MTRBaseClusterBasicInformation -@end +typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersionType) { + MTRWiFiNetworkDiagnosticsWiFiVersionTypeA MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionA", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x00, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211a MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeB MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionB", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x01, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211b MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeG MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionG", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x02, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211g MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionG", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeN MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionN", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x03, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211n MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeAc MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x04, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211ac MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRWiFiNetworkDiagnosticsWiFiVersionTypeAx MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x05, + MTRWiFiNetworkDiagnosticsWiFiVersionType80211ax MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, +} MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersion", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -MTR_DEPRECATED("Please use MTRBaseClusterOTASoftwareUpdateProvider", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBaseClusterOtaSoftwareUpdateProvider : MTRBaseClusterOTASoftwareUpdateProvider -@end +typedef NS_OPTIONS(uint32_t, MTRWiFiNetworkDiagnosticsFeature) { + MTRWiFiNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRWiFiNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -MTR_DEPRECATED("Please use MTRBaseClusterOTASoftwareUpdateRequestor", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBaseClusterOtaSoftwareUpdateRequestor : MTRBaseClusterOTASoftwareUpdateRequestor -@end +typedef NS_ENUM(uint8_t, MTREthernetNetworkDiagnosticsPHYRate) { + MTREthernetNetworkDiagnosticsPHYRateRate10M MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTREthernetNetworkDiagnosticsPHYRateRate100M MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTREthernetNetworkDiagnosticsPHYRateRate1G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTREthernetNetworkDiagnosticsPHYRateRate25G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTREthernetNetworkDiagnosticsPHYRateRate5G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTREthernetNetworkDiagnosticsPHYRateRate10G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTREthernetNetworkDiagnosticsPHYRateRate40G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTREthernetNetworkDiagnosticsPHYRateRate100G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTREthernetNetworkDiagnosticsPHYRateRate200G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTREthernetNetworkDiagnosticsPHYRateRate400G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -MTR_DEPRECATED("Please use MTRBaseClusterBridgedDeviceBasicInformation", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) -@interface MTRBaseClusterBridgedDeviceBasic : MTRBaseClusterBridgedDeviceBasicInformation -@end +typedef NS_ENUM(uint8_t, MTREthernetNetworkDiagnosticsPHYRateType) { + MTREthernetNetworkDiagnosticsPHYRateType10M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate10M", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTREthernetNetworkDiagnosticsPHYRateType100M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate100M", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTREthernetNetworkDiagnosticsPHYRateType1000M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate1G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTREthernetNetworkDiagnosticsPHYRateType25G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate25G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTREthernetNetworkDiagnosticsPHYRateType5G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate5G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTREthernetNetworkDiagnosticsPHYRateType10G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate10G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTREthernetNetworkDiagnosticsPHYRateType40G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate40G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTREthernetNetworkDiagnosticsPHYRateType100G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate100G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTREthernetNetworkDiagnosticsPHYRateType200G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate200G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, + MTREthernetNetworkDiagnosticsPHYRateType400G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate400G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, +} MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -MTR_DEPRECATED("Please use MTRBaseClusterWakeOnLAN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBaseClusterWakeOnLan : MTRBaseClusterWakeOnLAN -@end +typedef NS_OPTIONS(uint32_t, MTREthernetNetworkDiagnosticsFeature) { + MTREthernetNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTREthernetNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -MTR_DEPRECATED("Please use MTRBaseClusterUnitTesting", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) -@interface MTRBaseClusterTestCluster : MTRBaseClusterUnitTesting -@end +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationGranularity) { + MTRTimeSynchronizationGranularityNoTimeGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRTimeSynchronizationGranularityMinutesGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRTimeSynchronizationGranularitySecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRTimeSynchronizationGranularityMillisecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRTimeSynchronizationGranularityMicrosecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRDataTypeAreaTypeTag) { - MTRDataTypeAreaTypeTagAisle MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeAreaTypeTagAttic MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeAreaTypeTagBackDoor MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypeAreaTypeTagBackYard MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDataTypeAreaTypeTagBalcony MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDataTypeAreaTypeTagBallroom MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDataTypeAreaTypeTagBathroom MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDataTypeAreaTypeTagBedroom MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDataTypeAreaTypeTagBorder MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDataTypeAreaTypeTagBoxroom MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDataTypeAreaTypeTagBreakfastRoom MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDataTypeAreaTypeTagCarport MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDataTypeAreaTypeTagCellar MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDataTypeAreaTypeTagCloakroom MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRDataTypeAreaTypeTagCloset MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRDataTypeAreaTypeTagConservatory MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRDataTypeAreaTypeTagCorridor MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDataTypeAreaTypeTagCraftRoom MTR_PROVISIONALLY_AVAILABLE = 0x11, - MTRDataTypeAreaTypeTagCupboard MTR_PROVISIONALLY_AVAILABLE = 0x12, - MTRDataTypeAreaTypeTagDeck MTR_PROVISIONALLY_AVAILABLE = 0x13, - MTRDataTypeAreaTypeTagDen MTR_PROVISIONALLY_AVAILABLE = 0x14, - MTRDataTypeAreaTypeTagDining MTR_PROVISIONALLY_AVAILABLE = 0x15, - MTRDataTypeAreaTypeTagDrawingRoom MTR_PROVISIONALLY_AVAILABLE = 0x16, - MTRDataTypeAreaTypeTagDressingRoom MTR_PROVISIONALLY_AVAILABLE = 0x17, - MTRDataTypeAreaTypeTagDriveway MTR_PROVISIONALLY_AVAILABLE = 0x18, - MTRDataTypeAreaTypeTagElevator MTR_PROVISIONALLY_AVAILABLE = 0x19, - MTRDataTypeAreaTypeTagEnsuite MTR_PROVISIONALLY_AVAILABLE = 0x1A, - MTRDataTypeAreaTypeTagEntrance MTR_PROVISIONALLY_AVAILABLE = 0x1B, - MTRDataTypeAreaTypeTagEntryway MTR_PROVISIONALLY_AVAILABLE = 0x1C, - MTRDataTypeAreaTypeTagFamilyRoom MTR_PROVISIONALLY_AVAILABLE = 0x1D, - MTRDataTypeAreaTypeTagFoyer MTR_PROVISIONALLY_AVAILABLE = 0x1E, - MTRDataTypeAreaTypeTagFrontDoor MTR_PROVISIONALLY_AVAILABLE = 0x1F, - MTRDataTypeAreaTypeTagFrontYard MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRDataTypeAreaTypeTagGameRoom MTR_PROVISIONALLY_AVAILABLE = 0x21, - MTRDataTypeAreaTypeTagGarage MTR_PROVISIONALLY_AVAILABLE = 0x22, - MTRDataTypeAreaTypeTagGarageDoor MTR_PROVISIONALLY_AVAILABLE = 0x23, - MTRDataTypeAreaTypeTagGarden MTR_PROVISIONALLY_AVAILABLE = 0x24, - MTRDataTypeAreaTypeTagGardenDoor MTR_PROVISIONALLY_AVAILABLE = 0x25, - MTRDataTypeAreaTypeTagGuestBathroom MTR_PROVISIONALLY_AVAILABLE = 0x26, - MTRDataTypeAreaTypeTagGuestBedroom MTR_PROVISIONALLY_AVAILABLE = 0x27, - MTRDataTypeAreaTypeTagGuestRestroom MTR_PROVISIONALLY_AVAILABLE = 0x28, - MTRDataTypeAreaTypeTagGuestRoom MTR_PROVISIONALLY_AVAILABLE = 0x29, - MTRDataTypeAreaTypeTagGym MTR_PROVISIONALLY_AVAILABLE = 0x2A, - MTRDataTypeAreaTypeTagHallway MTR_PROVISIONALLY_AVAILABLE = 0x2B, - MTRDataTypeAreaTypeTagHearthRoom MTR_PROVISIONALLY_AVAILABLE = 0x2C, - MTRDataTypeAreaTypeTagKidsRoom MTR_PROVISIONALLY_AVAILABLE = 0x2D, - MTRDataTypeAreaTypeTagKidsBedroom MTR_PROVISIONALLY_AVAILABLE = 0x2E, - MTRDataTypeAreaTypeTagKitchen MTR_PROVISIONALLY_AVAILABLE = 0x2F, - MTRDataTypeAreaTypeTagLarder MTR_PROVISIONALLY_AVAILABLE = 0x30, - MTRDataTypeAreaTypeTagLaundryRoom MTR_PROVISIONALLY_AVAILABLE = 0x31, - MTRDataTypeAreaTypeTagLawn MTR_PROVISIONALLY_AVAILABLE = 0x32, - MTRDataTypeAreaTypeTagLibrary MTR_PROVISIONALLY_AVAILABLE = 0x33, - MTRDataTypeAreaTypeTagLivingRoom MTR_PROVISIONALLY_AVAILABLE = 0x34, - MTRDataTypeAreaTypeTagLounge MTR_PROVISIONALLY_AVAILABLE = 0x35, - MTRDataTypeAreaTypeTagMediaTVRoom MTR_PROVISIONALLY_AVAILABLE = 0x36, - MTRDataTypeAreaTypeTagMudRoom MTR_PROVISIONALLY_AVAILABLE = 0x37, - MTRDataTypeAreaTypeTagMusicRoom MTR_PROVISIONALLY_AVAILABLE = 0x38, - MTRDataTypeAreaTypeTagNursery MTR_PROVISIONALLY_AVAILABLE = 0x39, - MTRDataTypeAreaTypeTagOffice MTR_PROVISIONALLY_AVAILABLE = 0x3A, - MTRDataTypeAreaTypeTagOutdoorKitchen MTR_PROVISIONALLY_AVAILABLE = 0x3B, - MTRDataTypeAreaTypeTagOutside MTR_PROVISIONALLY_AVAILABLE = 0x3C, - MTRDataTypeAreaTypeTagPantry MTR_PROVISIONALLY_AVAILABLE = 0x3D, - MTRDataTypeAreaTypeTagParkingLot MTR_PROVISIONALLY_AVAILABLE = 0x3E, - MTRDataTypeAreaTypeTagParlor MTR_PROVISIONALLY_AVAILABLE = 0x3F, - MTRDataTypeAreaTypeTagPatio MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRDataTypeAreaTypeTagPlayRoom MTR_PROVISIONALLY_AVAILABLE = 0x41, - MTRDataTypeAreaTypeTagPoolRoom MTR_PROVISIONALLY_AVAILABLE = 0x42, - MTRDataTypeAreaTypeTagPorch MTR_PROVISIONALLY_AVAILABLE = 0x43, - MTRDataTypeAreaTypeTagPrimaryBathroom MTR_PROVISIONALLY_AVAILABLE = 0x44, - MTRDataTypeAreaTypeTagPrimaryBedroom MTR_PROVISIONALLY_AVAILABLE = 0x45, - MTRDataTypeAreaTypeTagRamp MTR_PROVISIONALLY_AVAILABLE = 0x46, - MTRDataTypeAreaTypeTagReceptionRoom MTR_PROVISIONALLY_AVAILABLE = 0x47, - MTRDataTypeAreaTypeTagRecreationRoom MTR_PROVISIONALLY_AVAILABLE = 0x48, - MTRDataTypeAreaTypeTagRestroom MTR_PROVISIONALLY_AVAILABLE = 0x49, - MTRDataTypeAreaTypeTagRoof MTR_PROVISIONALLY_AVAILABLE = 0x4A, - MTRDataTypeAreaTypeTagSauna MTR_PROVISIONALLY_AVAILABLE = 0x4B, - MTRDataTypeAreaTypeTagScullery MTR_PROVISIONALLY_AVAILABLE = 0x4C, - MTRDataTypeAreaTypeTagSewingRoom MTR_PROVISIONALLY_AVAILABLE = 0x4D, - MTRDataTypeAreaTypeTagShed MTR_PROVISIONALLY_AVAILABLE = 0x4E, - MTRDataTypeAreaTypeTagSideDoor MTR_PROVISIONALLY_AVAILABLE = 0x4F, - MTRDataTypeAreaTypeTagSideYard MTR_PROVISIONALLY_AVAILABLE = 0x50, - MTRDataTypeAreaTypeTagSittingRoom MTR_PROVISIONALLY_AVAILABLE = 0x51, - MTRDataTypeAreaTypeTagSnug MTR_PROVISIONALLY_AVAILABLE = 0x52, - MTRDataTypeAreaTypeTagSpa MTR_PROVISIONALLY_AVAILABLE = 0x53, - MTRDataTypeAreaTypeTagStaircase MTR_PROVISIONALLY_AVAILABLE = 0x54, - MTRDataTypeAreaTypeTagSteamRoom MTR_PROVISIONALLY_AVAILABLE = 0x55, - MTRDataTypeAreaTypeTagStorageRoom MTR_PROVISIONALLY_AVAILABLE = 0x56, - MTRDataTypeAreaTypeTagStudio MTR_PROVISIONALLY_AVAILABLE = 0x57, - MTRDataTypeAreaTypeTagStudy MTR_PROVISIONALLY_AVAILABLE = 0x58, - MTRDataTypeAreaTypeTagSunRoom MTR_PROVISIONALLY_AVAILABLE = 0x59, - MTRDataTypeAreaTypeTagSwimmingPool MTR_PROVISIONALLY_AVAILABLE = 0x5A, - MTRDataTypeAreaTypeTagTerrace MTR_PROVISIONALLY_AVAILABLE = 0x5B, - MTRDataTypeAreaTypeTagUtilityRoom MTR_PROVISIONALLY_AVAILABLE = 0x5C, - MTRDataTypeAreaTypeTagWard MTR_PROVISIONALLY_AVAILABLE = 0x5D, - MTRDataTypeAreaTypeTagWorkshop MTR_PROVISIONALLY_AVAILABLE = 0x5E, +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationStatusCode) { + MTRTimeSynchronizationStatusCodeTimeNotAccepted MTR_PROVISIONALLY_AVAILABLE = 0x02, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRDataTypeAtomicRequestTypeEnum) { - MTRDataTypeAtomicRequestTypeEnumBeginWrite MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeAtomicRequestTypeEnumCommitWrite MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeAtomicRequestTypeEnumRollbackWrite MTR_PROVISIONALLY_AVAILABLE = 0x02, +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { + MTRTimeSynchronizationTimeSourceNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRTimeSynchronizationTimeSourceUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRTimeSynchronizationTimeSourceAdmin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRTimeSynchronizationTimeSourceNodeTimeCluster MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRTimeSynchronizationTimeSourceNonMatterSNTP MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRTimeSynchronizationTimeSourceNonFabricSntp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRTimeSynchronizationTimeSourceNonMatterNTP MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRTimeSynchronizationTimeSourceNonFabricNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRTimeSynchronizationTimeSourceMatterSNTP MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRTimeSynchronizationTimeSourceFabricSntp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRTimeSynchronizationTimeSourceMatterNTP MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRTimeSynchronizationTimeSourceFabricNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRTimeSynchronizationTimeSourceMixedNTP MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRTimeSynchronizationTimeSourceMixedNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRTimeSynchronizationTimeSourceNonMatterSNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRTimeSynchronizationTimeSourceNonFabricSntpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRTimeSynchronizationTimeSourceNonMatterNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRTimeSynchronizationTimeSourceNonFabricNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRTimeSynchronizationTimeSourceMatterSNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRTimeSynchronizationTimeSourceFabricSntpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRTimeSynchronizationTimeSourceMatterNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRTimeSynchronizationTimeSourceFabricNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, + MTRTimeSynchronizationTimeSourceMixedNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRTimeSynchronizationTimeSourceMixedNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, + MTRTimeSynchronizationTimeSourceCloudSource MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0E, + MTRTimeSynchronizationTimeSourcePTP MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRTimeSynchronizationTimeSourcePtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0F, + MTRTimeSynchronizationTimeSourceGNSS MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRTimeSynchronizationTimeSourceGnss MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + +typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeZoneDatabase) { + MTRTimeSynchronizationTimeZoneDatabaseFull MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRTimeSynchronizationTimeZoneDatabasePartial MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRTimeSynchronizationTimeZoneDatabaseNone MTR_PROVISIONALLY_AVAILABLE = 0x02, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRDataTypeFloorSurfaceTag) { - MTRDataTypeFloorSurfaceTagCarpet MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeFloorSurfaceTagCeramic MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeFloorSurfaceTagConcrete MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypeFloorSurfaceTagCork MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDataTypeFloorSurfaceTagDeepCarpet MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDataTypeFloorSurfaceTagDirt MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDataTypeFloorSurfaceTagEngineeredWood MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDataTypeFloorSurfaceTagGlass MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDataTypeFloorSurfaceTagGrass MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDataTypeFloorSurfaceTagHardwood MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDataTypeFloorSurfaceTagLaminate MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDataTypeFloorSurfaceTagLinoleum MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDataTypeFloorSurfaceTagMat MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDataTypeFloorSurfaceTagMetal MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRDataTypeFloorSurfaceTagPlastic MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRDataTypeFloorSurfaceTagPolishedConcrete MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRDataTypeFloorSurfaceTagRubber MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDataTypeFloorSurfaceTagRug MTR_PROVISIONALLY_AVAILABLE = 0x11, - MTRDataTypeFloorSurfaceTagSand MTR_PROVISIONALLY_AVAILABLE = 0x12, - MTRDataTypeFloorSurfaceTagStone MTR_PROVISIONALLY_AVAILABLE = 0x13, - MTRDataTypeFloorSurfaceTagTatami MTR_PROVISIONALLY_AVAILABLE = 0x14, - MTRDataTypeFloorSurfaceTagTerrazzo MTR_PROVISIONALLY_AVAILABLE = 0x15, - MTRDataTypeFloorSurfaceTagTile MTR_PROVISIONALLY_AVAILABLE = 0x16, - MTRDataTypeFloorSurfaceTagVinyl MTR_PROVISIONALLY_AVAILABLE = 0x17, +typedef NS_OPTIONS(uint32_t, MTRTimeSynchronizationFeature) { + MTRTimeSynchronizationFeatureTimeZone MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRTimeSynchronizationFeatureNTPClient MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRTimeSynchronizationFeatureNTPServer MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRTimeSynchronizationFeatureTimeSyncClient MTR_PROVISIONALLY_AVAILABLE = 0x8, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRDataTypeLandmarkTag) { - MTRDataTypeLandmarkTagAirConditioner MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeLandmarkTagAirPurifier MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeLandmarkTagBackDoor MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypeLandmarkTagBarStool MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDataTypeLandmarkTagBathMat MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDataTypeLandmarkTagBathtub MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDataTypeLandmarkTagBed MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDataTypeLandmarkTagBookshelf MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDataTypeLandmarkTagChair MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDataTypeLandmarkTagChristmasTree MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDataTypeLandmarkTagCoatRack MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDataTypeLandmarkTagCoffeeTable MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDataTypeLandmarkTagCookingRange MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDataTypeLandmarkTagCouch MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRDataTypeLandmarkTagCountertop MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRDataTypeLandmarkTagCradle MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRDataTypeLandmarkTagCrib MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDataTypeLandmarkTagDesk MTR_PROVISIONALLY_AVAILABLE = 0x11, - MTRDataTypeLandmarkTagDiningTable MTR_PROVISIONALLY_AVAILABLE = 0x12, - MTRDataTypeLandmarkTagDishwasher MTR_PROVISIONALLY_AVAILABLE = 0x13, - MTRDataTypeLandmarkTagDoor MTR_PROVISIONALLY_AVAILABLE = 0x14, - MTRDataTypeLandmarkTagDresser MTR_PROVISIONALLY_AVAILABLE = 0x15, - MTRDataTypeLandmarkTagLaundryDryer MTR_PROVISIONALLY_AVAILABLE = 0x16, - MTRDataTypeLandmarkTagFan MTR_PROVISIONALLY_AVAILABLE = 0x17, - MTRDataTypeLandmarkTagFireplace MTR_PROVISIONALLY_AVAILABLE = 0x18, - MTRDataTypeLandmarkTagFreezer MTR_PROVISIONALLY_AVAILABLE = 0x19, - MTRDataTypeLandmarkTagFrontDoor MTR_PROVISIONALLY_AVAILABLE = 0x1A, - MTRDataTypeLandmarkTagHighChair MTR_PROVISIONALLY_AVAILABLE = 0x1B, - MTRDataTypeLandmarkTagKitchenIsland MTR_PROVISIONALLY_AVAILABLE = 0x1C, - MTRDataTypeLandmarkTagLamp MTR_PROVISIONALLY_AVAILABLE = 0x1D, - MTRDataTypeLandmarkTagLitterBox MTR_PROVISIONALLY_AVAILABLE = 0x1E, - MTRDataTypeLandmarkTagMirror MTR_PROVISIONALLY_AVAILABLE = 0x1F, - MTRDataTypeLandmarkTagNightstand MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRDataTypeLandmarkTagOven MTR_PROVISIONALLY_AVAILABLE = 0x21, - MTRDataTypeLandmarkTagPetBed MTR_PROVISIONALLY_AVAILABLE = 0x22, - MTRDataTypeLandmarkTagPetBowl MTR_PROVISIONALLY_AVAILABLE = 0x23, - MTRDataTypeLandmarkTagPetCrate MTR_PROVISIONALLY_AVAILABLE = 0x24, - MTRDataTypeLandmarkTagRefrigerator MTR_PROVISIONALLY_AVAILABLE = 0x25, - MTRDataTypeLandmarkTagScratchingPost MTR_PROVISIONALLY_AVAILABLE = 0x26, - MTRDataTypeLandmarkTagShoeRack MTR_PROVISIONALLY_AVAILABLE = 0x27, - MTRDataTypeLandmarkTagShower MTR_PROVISIONALLY_AVAILABLE = 0x28, - MTRDataTypeLandmarkTagSideDoor MTR_PROVISIONALLY_AVAILABLE = 0x29, - MTRDataTypeLandmarkTagSink MTR_PROVISIONALLY_AVAILABLE = 0x2A, - MTRDataTypeLandmarkTagSofa MTR_PROVISIONALLY_AVAILABLE = 0x2B, - MTRDataTypeLandmarkTagStove MTR_PROVISIONALLY_AVAILABLE = 0x2C, - MTRDataTypeLandmarkTagTable MTR_PROVISIONALLY_AVAILABLE = 0x2D, - MTRDataTypeLandmarkTagToilet MTR_PROVISIONALLY_AVAILABLE = 0x2E, - MTRDataTypeLandmarkTagTrashCan MTR_PROVISIONALLY_AVAILABLE = 0x2F, - MTRDataTypeLandmarkTagLaundryWasher MTR_PROVISIONALLY_AVAILABLE = 0x30, - MTRDataTypeLandmarkTagWindow MTR_PROVISIONALLY_AVAILABLE = 0x31, - MTRDataTypeLandmarkTagWineCooler MTR_PROVISIONALLY_AVAILABLE = 0x32, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDataTypePositionTag) { - MTRDataTypePositionTagLeft MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypePositionTagRight MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypePositionTagTop MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypePositionTagBottom MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDataTypePositionTagMiddle MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDataTypePositionTagRow MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDataTypePositionTagColumn MTR_PROVISIONALLY_AVAILABLE = 0x06, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationColor) { + MTRBridgedDeviceBasicInformationColorBlack MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBridgedDeviceBasicInformationColorNavy MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBridgedDeviceBasicInformationColorGreen MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBridgedDeviceBasicInformationColorTeal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBridgedDeviceBasicInformationColorMaroon MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBridgedDeviceBasicInformationColorPurple MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRBridgedDeviceBasicInformationColorOlive MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, + MTRBridgedDeviceBasicInformationColorGray MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, + MTRBridgedDeviceBasicInformationColorBlue MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, + MTRBridgedDeviceBasicInformationColorLime MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, + MTRBridgedDeviceBasicInformationColorAqua MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, + MTRBridgedDeviceBasicInformationColorRed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, + MTRBridgedDeviceBasicInformationColorFuchsia MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, + MTRBridgedDeviceBasicInformationColorYellow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, + MTRBridgedDeviceBasicInformationColorWhite MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, + MTRBridgedDeviceBasicInformationColorNickel MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, + MTRBridgedDeviceBasicInformationColorChrome MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRBridgedDeviceBasicInformationColorBrass MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, + MTRBridgedDeviceBasicInformationColorCopper MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, + MTRBridgedDeviceBasicInformationColorSilver MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, + MTRBridgedDeviceBasicInformationColorGold MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -typedef NS_ENUM(uint8_t, MTRDataTypeRelativePositionTag) { - MTRDataTypeRelativePositionTagUnder MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeRelativePositionTagNextTo MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeRelativePositionTagAround MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDataTypeRelativePositionTagOn MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDataTypeRelativePositionTagAbove MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDataTypeRelativePositionTagFrontOf MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDataTypeRelativePositionTagBehind MTR_PROVISIONALLY_AVAILABLE = 0x06, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationProductFinish) { + MTRBridgedDeviceBasicInformationProductFinishOther MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRBridgedDeviceBasicInformationProductFinishMatte MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRBridgedDeviceBasicInformationProductFinishSatin MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRBridgedDeviceBasicInformationProductFinishPolished MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRBridgedDeviceBasicInformationProductFinishRugged MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRBridgedDeviceBasicInformationProductFinishFabric MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) { - MTRDataTypeTestGlobalEnumSomeValue MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDataTypeTestGlobalEnumSomeOtherValue MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDataTypeTestGlobalEnumFinalValue MTR_PROVISIONALLY_AVAILABLE = 0x02, +typedef NS_OPTIONS(uint32_t, MTRBridgedDeviceBasicInformationFeature) { + MTRBridgedDeviceBasicInformationFeatureBridgedICDSupport MTR_PROVISIONALLY_AVAILABLE = 0x100000, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRIdentifyEffectIdentifier) { - MTRIdentifyEffectIdentifierBlink MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIdentifyEffectIdentifierBreathe MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRIdentifyEffectIdentifierOkay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRIdentifyEffectIdentifierChannelChange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRIdentifyEffectIdentifierFinishEffect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFE, - MTRIdentifyEffectIdentifierStopEffect MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRSwitchFeature) { + MTRSwitchFeatureLatchingSwitch MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, + MTRSwitchFeatureMomentarySwitch MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, + MTRSwitchFeatureMomentarySwitchRelease MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x4, + MTRSwitchFeatureMomentarySwitchLongPress MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x8, + MTRSwitchFeatureMomentarySwitchMultiPress MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x10, + MTRSwitchFeatureActionSwitch MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); -typedef NS_ENUM(uint8_t, MTRIdentifyEffectVariant) { - MTRIdentifyEffectVariantDefault MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, +typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningCommissioningWindowStatus) { + MTRAdministratorCommissioningCommissioningWindowStatusWindowNotOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRAdministratorCommissioningCommissioningWindowStatusEnhancedWindowOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRAdministratorCommissioningCommissioningWindowStatusBasicWindowOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRIdentifyType) { - MTRIdentifyTypeNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIdentifyTypeLightOutput MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRIdentifyTypeVisibleLight MTR_DEPRECATED("Please use MTRIdentifyTypeLightOutput", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, - MTRIdentifyTypeVisibleIndicator MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRIdentifyTypeVisibleLED MTR_DEPRECATED("Please use MTRIdentifyTypeVisibleIndicator", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, - MTRIdentifyTypeAudibleBeep MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRIdentifyTypeDisplay MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRIdentifyTypeActuator MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningStatusCode) { + MTRAdministratorCommissioningStatusCodeBusy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRAdministratorCommissioningStatusCodePAKEParameterError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRAdministratorCommissioningStatusCodeWindowNotOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRGroupsFeature) { - MTRGroupsFeatureGroupNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +typedef NS_OPTIONS(uint32_t, MTRAdministratorCommissioningFeature) { + MTRAdministratorCommissioningFeatureBasic MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_OPTIONS(uint32_t, MTRGroupsGroupClusterFeature) { - MTRGroupsGroupClusterFeatureGroupNames MTR_DEPRECATED("Please use MTRGroupsFeatureGroupNames", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, -} MTR_DEPRECATED("Please use MTRGroupsFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +typedef NS_ENUM(uint8_t, MTROperationalCredentialsCertificateChainType) { + MTROperationalCredentialsCertificateChainTypeDACCertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTROperationalCredentialsCertificateChainTypePAICertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint8_t, MTRGroupsNameSupportBitmap) { - MTRGroupsNameSupportBitmapGroupNames MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x80, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +typedef NS_ENUM(uint8_t, MTROperationalCredentialsNodeOperationalCertStatus) { + MTROperationalCredentialsNodeOperationalCertStatusOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTROperationalCredentialsNodeOperationalCertStatusMissingCsr MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTROperationalCredentialsNodeOperationalCertStatusTableFull MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTROperationalCredentialsNodeOperationalCertStatusFabricConflict MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTROperationalCredentialsNodeOperationalCertStatusLabelConflict MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, + MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0B, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_ENUM(uint8_t, MTROnOffDelayedAllOffEffectVariant) { - MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROnOffDelayedAllOffEffectVariantFadeToOffIn0p8Seconds MTR_DEPRECATED("Please use MTROnOffDelayedAllOffEffectVariantDelayedOffFastFade", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x00, - MTROnOffDelayedAllOffEffectVariantNoFade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTROnOffDelayedAllOffEffectVariantDelayedOffSlowFade MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROnOffDelayedAllOffEffectVariant50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds MTR_DEPRECATED("Please use MTROnOffDelayedAllOffEffectVariantDelayedOffSlowFade", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTROperationalCredentialsOperationalCertStatus) { + MTROperationalCredentialsOperationalCertStatusSUCCESS MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTROperationalCredentialsOperationalCertStatusInvalidPublicKey MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTROperationalCredentialsOperationalCertStatusInvalidNodeOpId MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTROperationalCredentialsOperationalCertStatusInvalidNOC MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTROperationalCredentialsOperationalCertStatusMissingCsr MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusMissingCsr", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTROperationalCredentialsOperationalCertStatusTableFull MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusTableFull", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTROperationalCredentialsOperationalCertStatusInvalidAdminSubject MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTROperationalCredentialsOperationalCertStatusFabricConflict MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusFabricConflict", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, + MTROperationalCredentialsOperationalCertStatusLabelConflict MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusLabelConflict", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, + MTROperationalCredentialsOperationalCertStatusInvalidFabricIndex MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0B, +} MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_ENUM(uint8_t, MTROnOffDyingLightEffectVariant) { - MTROnOffDyingLightEffectVariantDyingLightFadeOff MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROnOffDyingLightEffectVariant20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second MTR_DEPRECATED("Please use MTROnOffDyingLightEffectVariantDyingLightFadeOff", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x00, +typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { + MTRGroupKeyManagementGroupKeySecurityPolicyTrustFirst MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRGroupKeyManagementGroupKeySecurityPolicyCacheAndSync MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTROnOffEffectIdentifier) { - MTROnOffEffectIdentifierDelayedAllOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTROnOffEffectIdentifierDyingLight MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { + MTRGroupKeyManagementFeatureCacheAndSync MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROnOffStartUpOnOff) { - MTROnOffStartUpOnOffOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTROnOffStartUpOnOffOn MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTROnOffStartUpOnOffToggle MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROnOffStartUpOnOffTogglePreviousOnOff MTR_DEPRECATED("Please use MTROnOffStartUpOnOffToggle", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRICDManagementClientType) { + MTRICDManagementClientTypePermanent MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRICDManagementClientTypeEphemeral MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTROnOffFeature) { - MTROnOffFeatureLighting MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTROnOffFeatureDeadFrontBehavior MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x2, - MTROnOffFeatureDeadFront MTR_DEPRECATED("Please use MTROnOffFeatureDeadFrontBehavior", ios(17.1, 17.2), macos(14.1, 14.2), watchos(10.1, 10.2), tvos(17.1, 17.2)) = 0x2, - MTROnOffFeatureOffOnly MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRICDManagementOperatingMode) { + MTRICDManagementOperatingModeSIT MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRICDManagementOperatingModeLIT MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTROnOffControlBitmap) { - MTROnOffControlBitmapAcceptOnlyWhenOn MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x1, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { + MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRICDManagementFeatureUserActiveModeTrigger MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRICDManagementFeatureLongIdleTimeSupport MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRICDManagementFeatureDynamicSitLitSupport MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTROnOffControl) { - MTROnOffControlAcceptOnlyWhenOn MTR_DEPRECATED("Please use MTROnOffControlBitmapAcceptOnlyWhenOn", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)) = 0x1, -} MTR_DEPRECATED("Please use MTROnOffControlBitmap", ios(16.1, 17.2), macos(13.0, 14.2), watchos(9.1, 10.2), tvos(16.1, 17.2)); +typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { + MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_PROVISIONALLY_AVAILABLE = 0x100, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x200, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x400, + MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x800, + MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x8000, + MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRLevelControlMoveMode) { - MTRLevelControlMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRLevelControlMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRTimerStatus) { + MTRTimerStatusRunning MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRTimerStatusPaused MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRTimerStatusExpired MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRTimerStatusReady MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRLevelControlStepMode) { - MTRLevelControlStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRLevelControlStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRTimerFeature) { + MTRTimerFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRLevelControlFeature) { - MTRLevelControlFeatureOnOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRLevelControlFeatureLighting MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRLevelControlFeatureFrequency MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateErrorState) { + MTROvenCavityOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenCavityOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenCavityOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenCavityOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRLevelControlOptionsBitmap) { - MTRLevelControlOptionsBitmapExecuteIfOff MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, - MTRLevelControlOptionsBitmapCoupleColorTempToLevel MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateOperationalState) { + MTROvenCavityOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenCavityOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenCavityOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenCavityOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRLevelControlOptions) { - MTRLevelControlOptionsExecuteIfOff MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmapExecuteIfOff", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x1, - MTRLevelControlOptionsCoupleColorTempToLevel MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmapCoupleColorTempToLevel", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x2, -} MTR_DEPRECATED("Please use MTRLevelControlOptionsBitmap", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)); +typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { + MTROvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTROvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTROvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTROvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTROvenModeModeTagBake MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTROvenModeModeTagConvection MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTROvenModeModeTagGrill MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTROvenModeModeTagRoast MTR_PROVISIONALLY_AVAILABLE = 0x4003, + MTROvenModeModeTagClean MTR_PROVISIONALLY_AVAILABLE = 0x4004, + MTROvenModeModeTagConvectionBake MTR_PROVISIONALLY_AVAILABLE = 0x4005, + MTROvenModeModeTagConvectionRoast MTR_PROVISIONALLY_AVAILABLE = 0x4006, + MTROvenModeModeTagWarming MTR_PROVISIONALLY_AVAILABLE = 0x4007, + MTROvenModeModeTagProofing MTR_PROVISIONALLY_AVAILABLE = 0x4008, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRDescriptorFeature) { - MTRDescriptorFeatureTagList MTR_PROVISIONALLY_AVAILABLE = 0x1, +typedef NS_OPTIONS(uint32_t, MTROvenModeFeature) { + MTROvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAccessControlEntryAuthMode) { - MTRAccessControlEntryAuthModePASE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRAccessControlEntryAuthModeCASE MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRAccessControlEntryAuthModeGroup MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRLaundryDryerControlsDrynessLevel) { + MTRLaundryDryerControlsDrynessLevelLow MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRLaundryDryerControlsDrynessLevelNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRLaundryDryerControlsDrynessLevelExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRLaundryDryerControlsDrynessLevelMax MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAccessControlAuthMode) { - MTRAccessControlAuthModePASE MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModePASE", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRAccessControlAuthModeCASE MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModeCASE", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRAccessControlAuthModeGroup MTR_DEPRECATED("Please use MTRAccessControlEntryAuthModeGroup", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTRAccessControlEntryAuthMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { + MTRModeSelectFeatureOnOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRModeSelectFeatureDEPONOFF MTR_DEPRECATED("Please use MTRModeSelectFeatureOnOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRAccessControlEntryPrivilege) { - MTRAccessControlEntryPrivilegeView MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRAccessControlEntryPrivilegeProxyView MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRAccessControlEntryPrivilegeOperate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRAccessControlEntryPrivilegeManage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRAccessControlEntryPrivilegeAdminister MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { + MTRLaundryWasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRLaundryWasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRLaundryWasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRLaundryWasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRLaundryWasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRLaundryWasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRLaundryWasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRLaundryWasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRLaundryWasherModeModeTagDelicate MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTRLaundryWasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTRLaundryWasherModeModeTagWhites MTR_PROVISIONALLY_AVAILABLE = 0x4003, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAccessControlPrivilege) { - MTRAccessControlPrivilegeView MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeView", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRAccessControlPrivilegeProxyView MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeProxyView", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRAccessControlPrivilegeOperate MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeOperate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRAccessControlPrivilegeManage MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeManage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRAccessControlPrivilegeAdminister MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilegeAdminister", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, -} MTR_DEPRECATED("Please use MTRAccessControlEntryPrivilege", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRLaundryWasherModeFeature) { + MTRLaundryWasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAccessControlAccessRestrictionType) { - MTRAccessControlAccessRestrictionTypeAttributeAccessForbidden MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRAccessControlAccessRestrictionTypeAttributeWriteForbidden MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRAccessControlAccessRestrictionTypeCommandForbidden MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRAccessControlAccessRestrictionTypeEventForbidden MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_PROVISIONALLY_AVAILABLE = 0x4001, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAccessControlChangeType) { - MTRAccessControlChangeTypeChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRAccessControlChangeTypeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRAccessControlChangeTypeRemoved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAndTemperatureControlledCabinetModeFeature) { + MTRRefrigeratorAndTemperatureControlledCabinetModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRAccessControlFeature) { - MTRAccessControlFeatureExtension MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRAccessControlFeatureManagedDevice MTR_PROVISIONALLY_AVAILABLE = 0x2, +typedef NS_ENUM(uint8_t, MTRLaundryWasherControlsNumberOfRinses) { + MTRLaundryWasherControlsNumberOfRinsesNone MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRLaundryWasherControlsNumberOfRinsesNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRLaundryWasherControlsNumberOfRinsesExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRLaundryWasherControlsNumberOfRinsesMax MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRActionsActionError) { - MTRActionsActionErrorUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRActionsActionErrorInterrupted MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { + MTRLaundryWasherControlsFeatureSpin MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRLaundryWasherControlsFeatureRinse MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRActionsActionState) { - MTRActionsActionStateInactive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRActionsActionStateActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRActionsActionStatePaused MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRActionsActionStateDisabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { + MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCRunModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCRunModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCRunModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCRunModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRVCRunModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRVCRunModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRVCRunModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRVCRunModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, + MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, + MTRRVCRunModeModeTagMapping MTR_PROVISIONALLY_AVAILABLE = 0x4002, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRActionsActionType) { - MTRActionsActionTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRActionsActionTypeScene MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRActionsActionTypeSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRActionsActionTypeAutomation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRActionsActionTypeException MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRActionsActionTypeNotification MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRActionsActionTypeAlarm MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { + MTRRVCRunModeStatusCodeStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, + MTRRVCRunModeStatusCodeDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, + MTRRVCRunModeStatusCodeDustBinFull MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, + MTRRVCRunModeStatusCodeWaterTankEmpty MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, + MTRRVCRunModeStatusCodeWaterTankMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, + MTRRVCRunModeStatusCodeWaterTankLidOpen MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, + MTRRVCRunModeStatusCodeMopCleaningPadMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, + MTRRVCRunModeStatusCodeBatteryLow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRActionsEndpointListType) { - MTRActionsEndpointListTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRActionsEndpointListTypeRoom MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRActionsEndpointListTypeZone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { + MTRRVCRunModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_OPTIONS(uint16_t, MTRActionsCommandBits) { - MTRActionsCommandBitsInstantAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRActionsCommandBitsInstantActionWithTransition MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRActionsCommandBitsStartAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRActionsCommandBitsStartActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRActionsCommandBitsStopAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRActionsCommandBitsPauseAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRActionsCommandBitsPauseActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRActionsCommandBitsResumeAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, - MTRActionsCommandBitsEnableAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, - MTRActionsCommandBitsEnableActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, - MTRActionsCommandBitsDisableAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, - MTRActionsCommandBitsDisableActionWithDuration MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { + MTRRVCCleanModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCCleanModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCCleanModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCCleanModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCCleanModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRVCCleanModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRVCCleanModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRVCCleanModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRVCCleanModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRVCCleanModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, + MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, + MTRRVCCleanModeModeTagMop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4002, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRBasicInformationColor) { - MTRBasicInformationColorBlack MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRBasicInformationColorNavy MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRBasicInformationColorGreen MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRBasicInformationColorTeal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRBasicInformationColorMaroon MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, - MTRBasicInformationColorPurple MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, - MTRBasicInformationColorOlive MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, - MTRBasicInformationColorGray MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, - MTRBasicInformationColorBlue MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, - MTRBasicInformationColorLime MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, - MTRBasicInformationColorAqua MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, - MTRBasicInformationColorRed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, - MTRBasicInformationColorFuchsia MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, - MTRBasicInformationColorYellow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, - MTRBasicInformationColorWhite MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, - MTRBasicInformationColorNickel MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, - MTRBasicInformationColorChrome MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, - MTRBasicInformationColorBrass MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, - MTRBasicInformationColorCopper MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, - MTRBasicInformationColorSilver MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, - MTRBasicInformationColorGold MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { + MTRRVCCleanModeStatusCodeCleaningInProgress MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRBasicInformationProductFinish) { - MTRBasicInformationProductFinishOther MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRBasicInformationProductFinishMatte MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRBasicInformationProductFinishSatin MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRBasicInformationProductFinishPolished MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRBasicInformationProductFinishRugged MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, - MTRBasicInformationProductFinishFabric MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { + MTRRVCCleanModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderApplyUpdateAction) { - MTROTASoftwareUpdateProviderApplyUpdateActionProceed MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateProviderApplyUpdateActionAwaitNextAction MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateProviderApplyUpdateActionDiscontinue MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { + MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRTemperatureControlFeatureTemperatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRTemperatureControlFeatureTemperatureStep MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAApplyUpdateAction) { - MTROtaSoftwareUpdateProviderOTAApplyUpdateActionProceed MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionProceed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionAwaitNextAction", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateProviderOTAApplyUpdateActionDiscontinue MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionDiscontinue", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateAction", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { + MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderDownloadProtocol) { - MTROTASoftwareUpdateProviderDownloadProtocolBDXSynchronous MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateProviderDownloadProtocolBDXAsynchronous MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateProviderDownloadProtocolHTTPS MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROTASoftwareUpdateProviderDownloadProtocolVendorSpecific MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { + MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDishwasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDishwasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDishwasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDishwasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDishwasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDishwasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDishwasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRDishwasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTRDishwasherModeModeTagLight MTR_PROVISIONALLY_AVAILABLE = 0x4002, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTADownloadProtocol) { - MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXSynchronous MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXSynchronous", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateProviderOTADownloadProtocolBDXAsynchronous MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXAsynchronous", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateProviderOTADownloadProtocolHTTPS MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolHTTPS", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTROtaSoftwareUpdateProviderOTADownloadProtocolVendorSpecific MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolVendorSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocol", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRDishwasherModeFeature) { + MTRDishwasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderStatus) { - MTROTASoftwareUpdateProviderStatusUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateProviderStatusBusy MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateProviderStatusNotAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROTASoftwareUpdateProviderStatusDownloadProtocolNotSupported MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_ENUM(uint8_t, MTRAirQuality) { + MTRAirQualityUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRAirQualityGood MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRAirQualityFair MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRAirQualityModerate MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRAirQualityPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRAirQualityVeryPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRAirQualityExtremelyPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateProviderOTAQueryStatus) { - MTROtaSoftwareUpdateProviderOTAQueryStatusUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateProviderOTAQueryStatusBusy MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusBusy", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateProviderOTAQueryStatusNotAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusNotAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTROtaSoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusDownloadProtocolNotSupported", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRAirQualityFeature) { + MTRAirQualityFeatureFair MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRAirQualityFeatureModerate MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRAirQualityFeatureVeryPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRAirQualityFeatureExtremelyPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorAnnouncementReason) { - MTROTASoftwareUpdateRequestorAnnouncementReasonSimpleAnnouncement MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateRequestorAnnouncementReasonUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateRequestorAnnouncementReasonUrgentUpdateAvailable MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmAlarmState) { + MTRSmokeCOAlarmAlarmStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmAlarmStateWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRSmokeCOAlarmAlarmStateCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAAnnouncementReason) { - MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonSimpleAnnouncement", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateRequestorOTAAnnouncementReasonUrgentUpdateAvailable MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUrgentUpdateAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmContaminationState) { + MTRSmokeCOAlarmContaminationStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmContaminationStateLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRSmokeCOAlarmContaminationStateWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRSmokeCOAlarmContaminationStateCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorChangeReason) { - MTROTASoftwareUpdateRequestorChangeReasonUnknown MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateRequestorChangeReasonSuccess MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateRequestorChangeReasonFailure MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROTASoftwareUpdateRequestorChangeReasonTimeOut MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, - MTROTASoftwareUpdateRequestorChangeReasonDelayByProvider MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x04, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmEndOfService) { + MTRSmokeCOAlarmEndOfServiceNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmEndOfServiceExpired MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAChangeReason) { - MTROtaSoftwareUpdateRequestorOTAChangeReasonUnknown MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonUnknown", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateRequestorOTAChangeReasonSuccess MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonSuccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateRequestorOTAChangeReasonFailure MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTROtaSoftwareUpdateRequestorOTAChangeReasonTimeOut MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonTimeOut", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTROtaSoftwareUpdateRequestorOTAChangeReasonDelayByProvider MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonDelayByProvider", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmExpressedState) { + MTRSmokeCOAlarmExpressedStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmExpressedStateSmokeAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRSmokeCOAlarmExpressedStateCOAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRSmokeCOAlarmExpressedStateBatteryAlert MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRSmokeCOAlarmExpressedStateTesting MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRSmokeCOAlarmExpressedStateHardwareFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRSmokeCOAlarmExpressedStateEndOfService MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRSmokeCOAlarmExpressedStateInterconnectSmoke MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, + MTRSmokeCOAlarmExpressedStateInterconnectCO MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x08, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorUpdateState) { - MTROTASoftwareUpdateRequestorUpdateStateUnknown MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x00, - MTROTASoftwareUpdateRequestorUpdateStateIdle MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x01, - MTROTASoftwareUpdateRequestorUpdateStateQuerying MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x02, - MTROTASoftwareUpdateRequestorUpdateStateDelayedOnQuery MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x03, - MTROTASoftwareUpdateRequestorUpdateStateDownloading MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x04, - MTROTASoftwareUpdateRequestorUpdateStateApplying MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x05, - MTROTASoftwareUpdateRequestorUpdateStateDelayedOnApply MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x06, - MTROTASoftwareUpdateRequestorUpdateStateRollingBack MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x07, - MTROTASoftwareUpdateRequestorUpdateStateDelayedOnUserConsent MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)) = 0x08, -} MTR_AVAILABLE(ios(17.2), macos(14.2), watchos(10.2), tvos(17.2)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmMuteState) { + MTRSmokeCOAlarmMuteStateNotMuted MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmMuteStateMuted MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTROtaSoftwareUpdateRequestorOTAUpdateState) { - MTROtaSoftwareUpdateRequestorOTAUpdateStateUnknown MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateUnknown", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROtaSoftwareUpdateRequestorOTAUpdateStateIdle MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateIdle", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROtaSoftwareUpdateRequestorOTAUpdateStateQuerying MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateQuerying", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnQuery MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnQuery", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTROtaSoftwareUpdateRequestorOTAUpdateStateDownloading MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDownloading", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTROtaSoftwareUpdateRequestorOTAUpdateStateApplying MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateApplying", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnApply MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnApply", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTROtaSoftwareUpdateRequestorOTAUpdateStateRollingBack MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateRollingBack", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTROtaSoftwareUpdateRequestorOTAUpdateStateDelayedOnUserConsent MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnUserConsent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, -} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateState", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmSensitivity) { + MTRSmokeCOAlarmSensitivityHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRSmokeCOAlarmSensitivityStandard MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRSmokeCOAlarmSensitivityLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationCalendarType) { - MTRTimeFormatLocalizationCalendarTypeBuddhist MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRTimeFormatLocalizationCalendarTypeChinese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRTimeFormatLocalizationCalendarTypeCoptic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRTimeFormatLocalizationCalendarTypeEthiopian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRTimeFormatLocalizationCalendarTypeGregorian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRTimeFormatLocalizationCalendarTypeHebrew MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRTimeFormatLocalizationCalendarTypeIndian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRTimeFormatLocalizationCalendarTypeIslamic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRTimeFormatLocalizationCalendarTypeJapanese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRTimeFormatLocalizationCalendarTypeKorean MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRTimeFormatLocalizationCalendarTypePersian MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRTimeFormatLocalizationCalendarTypeTaiwanese MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRTimeFormatLocalizationCalendarTypeUseActiveLocale MTR_PROVISIONALLY_AVAILABLE = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRSmokeCOAlarmFeature) { + MTRSmokeCOAlarmFeatureSmokeAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRSmokeCOAlarmFeatureCOAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRTimeFormatLocalizationHourFormat) { - MTRTimeFormatLocalizationHourFormat12hr MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRTimeFormatLocalizationHourFormat24hr MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRTimeFormatLocalizationHourFormatUseActiveLocale MTR_PROVISIONALLY_AVAILABLE = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmBitmap) { + MTRDishwasherAlarmAlarmBitmapInflowError MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDishwasherAlarmAlarmBitmapDrainError MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDishwasherAlarmAlarmBitmapDoorError MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDishwasherAlarmAlarmBitmapTempTooLow MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDishwasherAlarmAlarmBitmapTempTooHigh MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDishwasherAlarmAlarmBitmapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRTimeFormatLocalizationFeature) { - MTRTimeFormatLocalizationFeatureCalendarFormat MTR_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)) = 0x1, -} MTR_AVAILABLE(ios(17.1), macos(14.1), watchos(10.1), tvos(17.1)); +typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { + MTRDishwasherAlarmFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRUnitLocalizationTempUnit) { - MTRUnitLocalizationTempUnitFahrenheit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRUnitLocalizationTempUnitCelsius MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRUnitLocalizationTempUnitKelvin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { + MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMicrowaveOvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMicrowaveOvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMicrowaveOvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRMicrowaveOvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRMicrowaveOvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRMicrowaveOvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRMicrowaveOvenModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRMicrowaveOvenModeModeTagDefrost MTR_PROVISIONALLY_AVAILABLE = 0x4001, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRUnitLocalizationFeature) { - MTRUnitLocalizationFeatureTemperatureUnit MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenModeFeature) { + MTRMicrowaveOvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint16_t, MTRPowerSourceBatApprovedChemistry) { - MTRPowerSourceBatApprovedChemistryUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPowerSourceBatApprovedChemistryAlkaline MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRPowerSourceBatApprovedChemistryLithiumCarbonFluoride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRPowerSourceBatApprovedChemistryLithiumChromiumOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, - MTRPowerSourceBatApprovedChemistryLithiumCopperOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, - MTRPowerSourceBatApprovedChemistryLithiumIronDisulfide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, - MTRPowerSourceBatApprovedChemistryLithiumManganeseDioxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x06, - MTRPowerSourceBatApprovedChemistryLithiumThionylChloride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, - MTRPowerSourceBatApprovedChemistryMagnesium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x08, - MTRPowerSourceBatApprovedChemistryMercuryOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, - MTRPowerSourceBatApprovedChemistryNickelOxyhydride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, - MTRPowerSourceBatApprovedChemistrySilverOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0B, - MTRPowerSourceBatApprovedChemistryZincAir MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0C, - MTRPowerSourceBatApprovedChemistryZincCarbon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0D, - MTRPowerSourceBatApprovedChemistryZincChloride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0E, - MTRPowerSourceBatApprovedChemistryZincManganeseDioxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0F, - MTRPowerSourceBatApprovedChemistryLeadAcid MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, - MTRPowerSourceBatApprovedChemistryLithiumCobaltOxide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x11, - MTRPowerSourceBatApprovedChemistryLithiumIon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x12, - MTRPowerSourceBatApprovedChemistryLithiumIonPolymer MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x13, - MTRPowerSourceBatApprovedChemistryLithiumIronPhosphate MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x14, - MTRPowerSourceBatApprovedChemistryLithiumSulfur MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x15, - MTRPowerSourceBatApprovedChemistryLithiumTitanate MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x16, - MTRPowerSourceBatApprovedChemistryNickelCadmium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x17, - MTRPowerSourceBatApprovedChemistryNickelHydrogen MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x18, - MTRPowerSourceBatApprovedChemistryNickelIron MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x19, - MTRPowerSourceBatApprovedChemistryNickelMetalHydride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1A, - MTRPowerSourceBatApprovedChemistryNickelZinc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1B, - MTRPowerSourceBatApprovedChemistrySilverZinc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1C, - MTRPowerSourceBatApprovedChemistrySodiumIon MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1D, - MTRPowerSourceBatApprovedChemistrySodiumSulfur MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1E, - MTRPowerSourceBatApprovedChemistryZincBromide MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1F, - MTRPowerSourceBatApprovedChemistryZincCerium MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenControlFeature) { + MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRMicrowaveOvenControlFeaturePowerInWatts MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeFault) { - MTRPowerSourceBatChargeFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRPowerSourceBatChargeFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceBatChargeFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRPowerSourceBatChargeFaultAmbientTooHot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceBatChargeFaultAmbientTooCold MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRPowerSourceBatChargeFaultBatteryTooHot MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRPowerSourceBatChargeFaultBatteryTooCold MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRPowerSourceBatChargeFaultBatteryAbsent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRPowerSourceBatChargeFaultBatteryOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRPowerSourceBatChargeFaultBatteryUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRPowerSourceBatChargeFaultChargerOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRPowerSourceBatChargeFaultChargerUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRPowerSourceBatChargeFaultSafetyTimeout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { + MTROperationalStateErrorStateNoError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTROperationalStateErrorStateUnableToStartOrResume MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTROperationalStateErrorStateUnableToCompleteOperation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTROperationalStateErrorStateCommandInvalidInState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeLevel) { - MTRPowerSourceBatChargeLevelOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRPowerSourceBatChargeLevelOk MTR_DEPRECATED("Please use MTRPowerSourceBatChargeLevelOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRPowerSourceBatChargeLevelWarning MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceBatChargeLevelCritical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTROperationalState) { + MTROperationalStateStopped MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTROperationalStateRunning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTROperationalStatePaused MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTROperationalStateError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRPowerSourceBatChargeState) { - MTRPowerSourceBatChargeStateUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRPowerSourceBatChargeStateIsCharging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceBatChargeStateIsAtFullCharge MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRPowerSourceBatChargeStateIsNotCharging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { + MTRRVCOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, + MTRRVCOperationalStateErrorStateStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, + MTRRVCOperationalStateErrorStateDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, + MTRRVCOperationalStateErrorStateDustBinFull MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, + MTRRVCOperationalStateErrorStateWaterTankEmpty MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, + MTRRVCOperationalStateErrorStateWaterTankMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, + MTRRVCOperationalStateErrorStateWaterTankLidOpen MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, + MTRRVCOperationalStateErrorStateMopCleaningPadMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint16_t, MTRPowerSourceBatCommonDesignation) { - MTRPowerSourceBatCommonDesignationUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPowerSourceBatCommonDesignationAAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRPowerSourceBatCommonDesignationAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRPowerSourceBatCommonDesignationC MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, - MTRPowerSourceBatCommonDesignationD MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, - MTRPowerSourceBatCommonDesignation4v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, - MTRPowerSourceBatCommonDesignation6v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x06, - MTRPowerSourceBatCommonDesignation9v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, - MTRPowerSourceBatCommonDesignation12AA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x08, - MTRPowerSourceBatCommonDesignationAAAA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, - MTRPowerSourceBatCommonDesignationA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, - MTRPowerSourceBatCommonDesignationB MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0B, - MTRPowerSourceBatCommonDesignationF MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0C, - MTRPowerSourceBatCommonDesignationN MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0D, - MTRPowerSourceBatCommonDesignationNo6 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0E, - MTRPowerSourceBatCommonDesignationSubC MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0F, - MTRPowerSourceBatCommonDesignationA23 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, - MTRPowerSourceBatCommonDesignationA27 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x11, - MTRPowerSourceBatCommonDesignationBA5800 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x12, - MTRPowerSourceBatCommonDesignationDuplex MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x13, - MTRPowerSourceBatCommonDesignation4SR44 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x14, - MTRPowerSourceBatCommonDesignation523 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x15, - MTRPowerSourceBatCommonDesignation531 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x16, - MTRPowerSourceBatCommonDesignation15v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x17, - MTRPowerSourceBatCommonDesignation22v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x18, - MTRPowerSourceBatCommonDesignation30v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x19, - MTRPowerSourceBatCommonDesignation45v0 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1A, - MTRPowerSourceBatCommonDesignation67v5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1B, - MTRPowerSourceBatCommonDesignationJ MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1C, - MTRPowerSourceBatCommonDesignationCR123A MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1D, - MTRPowerSourceBatCommonDesignationCR2 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1E, - MTRPowerSourceBatCommonDesignation2CR5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1F, - MTRPowerSourceBatCommonDesignationCRP2 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, - MTRPowerSourceBatCommonDesignationCRV3 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x21, - MTRPowerSourceBatCommonDesignationSR41 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x22, - MTRPowerSourceBatCommonDesignationSR43 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x23, - MTRPowerSourceBatCommonDesignationSR44 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x24, - MTRPowerSourceBatCommonDesignationSR45 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x25, - MTRPowerSourceBatCommonDesignationSR48 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x26, - MTRPowerSourceBatCommonDesignationSR54 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x27, - MTRPowerSourceBatCommonDesignationSR55 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x28, - MTRPowerSourceBatCommonDesignationSR57 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x29, - MTRPowerSourceBatCommonDesignationSR58 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2A, - MTRPowerSourceBatCommonDesignationSR59 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2B, - MTRPowerSourceBatCommonDesignationSR60 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2C, - MTRPowerSourceBatCommonDesignationSR63 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2D, - MTRPowerSourceBatCommonDesignationSR64 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2E, - MTRPowerSourceBatCommonDesignationSR65 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2F, - MTRPowerSourceBatCommonDesignationSR66 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x30, - MTRPowerSourceBatCommonDesignationSR67 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x31, - MTRPowerSourceBatCommonDesignationSR68 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x32, - MTRPowerSourceBatCommonDesignationSR69 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x33, - MTRPowerSourceBatCommonDesignationSR516 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x34, - MTRPowerSourceBatCommonDesignationSR731 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x35, - MTRPowerSourceBatCommonDesignationSR712 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x36, - MTRPowerSourceBatCommonDesignationLR932 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x37, - MTRPowerSourceBatCommonDesignationA5 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x38, - MTRPowerSourceBatCommonDesignationA10 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x39, - MTRPowerSourceBatCommonDesignationA13 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3A, - MTRPowerSourceBatCommonDesignationA312 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3B, - MTRPowerSourceBatCommonDesignationA675 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3C, - MTRPowerSourceBatCommonDesignationAC41E MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3D, - MTRPowerSourceBatCommonDesignation10180 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3E, - MTRPowerSourceBatCommonDesignation10280 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x3F, - MTRPowerSourceBatCommonDesignation10440 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x40, - MTRPowerSourceBatCommonDesignation14250 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x41, - MTRPowerSourceBatCommonDesignation14430 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x42, - MTRPowerSourceBatCommonDesignation14500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x43, - MTRPowerSourceBatCommonDesignation14650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x44, - MTRPowerSourceBatCommonDesignation15270 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x45, - MTRPowerSourceBatCommonDesignation16340 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x46, - MTRPowerSourceBatCommonDesignationRCR123A MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x47, - MTRPowerSourceBatCommonDesignation17500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x48, - MTRPowerSourceBatCommonDesignation17670 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x49, - MTRPowerSourceBatCommonDesignation18350 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4A, - MTRPowerSourceBatCommonDesignation18500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4B, - MTRPowerSourceBatCommonDesignation18650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4C, - MTRPowerSourceBatCommonDesignation19670 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4D, - MTRPowerSourceBatCommonDesignation25500 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4E, - MTRPowerSourceBatCommonDesignation26650 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4F, - MTRPowerSourceBatCommonDesignation32600 MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x50, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { + MTRRVCOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCOperationalStateOperationalStateSeekingCharger MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, + MTRRVCOperationalStateOperationalStateCharging MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, + MTRRVCOperationalStateOperationalStateDocked MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -typedef NS_ENUM(uint8_t, MTRPowerSourceBatFault) { - MTRPowerSourceBatFaultUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPowerSourceBatFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceBatFaultUnspecified", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRPowerSourceBatFaultOverTemp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceBatFaultUnderTemp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRScenesManagementCopyModeBitmap) { + MTRScenesManagementCopyModeBitmapCopyAllScenes MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRPowerSourceBatReplaceability) { - MTRPowerSourceBatReplaceabilityUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRPowerSourceBatReplaceabilityNotReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceBatReplaceabilityUserReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRPowerSourceBatReplaceabilityFactoryReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRScenesManagementFeature) { + MTRScenesManagementFeatureSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRPowerSourceStatus) { - MTRPowerSourceStatusUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRPowerSourceStatusUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceStatusUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRPowerSourceStatusActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceStatusStandby MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRPowerSourceStatusUnavailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringChangeIndication) { + MTRHEPAFilterMonitoringChangeIndicationOK MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRHEPAFilterMonitoringChangeIndicationWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRHEPAFilterMonitoringChangeIndicationCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRPowerSourceWiredCurrentType) { - MTRPowerSourceWiredCurrentTypeAC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRPowerSourceWiredCurrentTypeDC MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringDegradationDirection) { + MTRHEPAFilterMonitoringDegradationDirectionUp MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRHEPAFilterMonitoringDegradationDirectionDown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRPowerSourceWiredFault) { - MTRPowerSourceWiredFaultUnspecified MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPowerSourceWiredFaultUnspecfied MTR_DEPRECATED("Please use MTRPowerSourceWiredFaultUnspecified", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRPowerSourceWiredFaultOverVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRPowerSourceWiredFaultUnderVoltage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringProductIdentifierType) { + MTRHEPAFilterMonitoringProductIdentifierTypeUPC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRHEPAFilterMonitoringProductIdentifierTypeGTIN8 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRHEPAFilterMonitoringProductIdentifierTypeEAN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRHEPAFilterMonitoringProductIdentifierTypeGTIN14 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRHEPAFilterMonitoringProductIdentifierTypeOEM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint32_t, MTRPowerSourceFeature) { - MTRPowerSourceFeatureWired MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRPowerSourceFeatureBattery MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRPowerSourceFeatureRechargeable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRPowerSourceFeatureReplaceable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRHEPAFilterMonitoringFeature) { + MTRHEPAFilterMonitoringFeatureCondition MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRHEPAFilterMonitoringFeatureWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRHEPAFilterMonitoringFeatureReplacementProductList MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRGeneralCommissioningCommissioningError) { - MTRGeneralCommissioningCommissioningErrorOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRGeneralCommissioningCommissioningErrorOk MTR_DEPRECATED("Please use MTRGeneralCommissioningCommissioningErrorOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRGeneralCommissioningCommissioningErrorValueOutsideRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRGeneralCommissioningCommissioningErrorInvalidAuthentication MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRGeneralCommissioningCommissioningErrorNoFailSafe MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRGeneralCommissioningCommissioningErrorBusyWithOtherAdmin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRGeneralCommissioningCommissioningErrorRequiredTCNotAccepted MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRGeneralCommissioningCommissioningErrorTCAcknowledgementsNotReceived MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRGeneralCommissioningCommissioningErrorTCMinVersionNotMet MTR_PROVISIONALLY_AVAILABLE = 0x07, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringChangeIndication) { + MTRActivatedCarbonFilterMonitoringChangeIndicationOK MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRActivatedCarbonFilterMonitoringChangeIndicationWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRActivatedCarbonFilterMonitoringChangeIndicationCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRGeneralCommissioningRegulatoryLocationType) { - MTRGeneralCommissioningRegulatoryLocationTypeIndoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRGeneralCommissioningRegulatoryLocationTypeOutdoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRGeneralCommissioningRegulatoryLocationTypeIndoorOutdoor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringDegradationDirection) { + MTRActivatedCarbonFilterMonitoringDegradationDirectionUp MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRActivatedCarbonFilterMonitoringDegradationDirectionDown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint32_t, MTRGeneralCommissioningFeature) { - MTRGeneralCommissioningFeatureTermsAndConditions MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringProductIdentifierType) { + MTRActivatedCarbonFilterMonitoringProductIdentifierTypeUPC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRActivatedCarbonFilterMonitoringProductIdentifierTypeGTIN8 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRActivatedCarbonFilterMonitoringProductIdentifierTypeEAN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRActivatedCarbonFilterMonitoringProductIdentifierTypeGTIN14 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRActivatedCarbonFilterMonitoringProductIdentifierTypeOEM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRNetworkCommissioningStatus) { - MTRNetworkCommissioningStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRNetworkCommissioningStatusOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRNetworkCommissioningStatusBoundsExceeded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRNetworkCommissioningStatusNetworkIDNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRNetworkCommissioningStatusDuplicateNetworkID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRNetworkCommissioningStatusNetworkNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRNetworkCommissioningStatusRegulatoryError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRNetworkCommissioningStatusAuthFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRNetworkCommissioningStatusUnsupportedSecurity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRNetworkCommissioningStatusOtherConnectionFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRNetworkCommissioningStatusIPV6Failed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRNetworkCommissioningStatusIPBindFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRNetworkCommissioningStatusUnknownError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRNetworkCommissioningWiFiBand) { - MTRNetworkCommissioningWiFiBand2G4 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRNetworkCommissioningWiFiBand3G65 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRNetworkCommissioningWiFiBand5G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRNetworkCommissioningWiFiBand6G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRNetworkCommissioningWiFiBand60G MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRNetworkCommissioningWiFiBand1G MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { + MTRActivatedCarbonFilterMonitoringFeatureCondition MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRActivatedCarbonFilterMonitoringFeatureWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint32_t, MTRNetworkCommissioningFeature) { - MTRNetworkCommissioningFeatureWiFiNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRNetworkCommissioningFeatureThreadNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRNetworkCommissioningFeatureEthernetNetworkInterface MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRNetworkCommissioningFeaturePerDeviceCredentials MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRBooleanStateConfigurationAlarmModeBitmap) { + MTRBooleanStateConfigurationAlarmModeBitmapVisual MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRBooleanStateConfigurationAlarmModeBitmapAudible MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint16_t, MTRNetworkCommissioningThreadCapabilitiesBitmap) { - MTRNetworkCommissioningThreadCapabilitiesBitmapIsBorderRouterCapable MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRNetworkCommissioningThreadCapabilitiesBitmapIsRouterCapable MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRNetworkCommissioningThreadCapabilitiesBitmapIsSleepyEndDeviceCapable MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRNetworkCommissioningThreadCapabilitiesBitmapIsFullThreadDevice MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRNetworkCommissioningThreadCapabilitiesBitmapIsSynchronizedSleepyEndDeviceCapable MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRBooleanStateConfigurationFeature) { + MTRBooleanStateConfigurationFeatureVisual MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRBooleanStateConfigurationFeatureAudible MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRBooleanStateConfigurationFeatureAlarmSuppress MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRBooleanStateConfigurationFeatureSensitivityLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurityBitmap) { - MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRNetworkCommissioningWiFiSecurityBitmapWEP MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, - MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, - MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, - MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, - MTRNetworkCommissioningWiFiSecurityBitmapWPA3MatterPDC MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); +typedef NS_OPTIONS(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) { + MTRBooleanStateConfigurationSensorFaultBitmapGeneralFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_OPTIONS(uint8_t, MTRNetworkCommissioningWiFiSecurity) { - MTRNetworkCommissioningWiFiSecurityUnencrypted MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapUnencrypted", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, - MTRNetworkCommissioningWiFiSecurityWEP MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, - MTRNetworkCommissioningWiFiSecurityWepPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWEP", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRNetworkCommissioningWiFiSecurityWPAPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x4, - MTRNetworkCommissioningWiFiSecurityWpaPersonal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPAPersonal") = 0x4, - MTRNetworkCommissioningWiFiSecurityWPA2Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x8, - MTRNetworkCommissioningWiFiSecurityWpa2Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA2Personal") = 0x8, - MTRNetworkCommissioningWiFiSecurityWPA3Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x10, - MTRNetworkCommissioningWiFiSecurityWpa3Personal MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) NS_SWIFT_UNAVAILABLE("Please use MTRNetworkCommissioningWiFiSecurityBitmapWPA3Personal") = 0x10, -} MTR_DEPRECATED("Please use MTRNetworkCommissioningWiFiSecurityBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); +typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlStatusCode) { + MTRValveConfigurationAndControlStatusCodeFailureDueToFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsIntent) { - MTRDiagnosticLogsIntentEndUserSupport MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRDiagnosticLogsIntentNetworkDiag MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRDiagnosticLogsIntentCrashLogs MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { + MTRValveConfigurationAndControlValveStateClosed MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRValveConfigurationAndControlValveStateOpen MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRValveConfigurationAndControlValveStateTransitioning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsIntent) { - MTRDiagnosticLogsLogsIntentEndUserSupport MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentEndUserSupport", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRDiagnosticLogsLogsIntentNetworkDiag MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentNetworkDiag", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, - MTRDiagnosticLogsLogsIntentCrashLogs MTR_DEPRECATED("Please use MTRDiagnosticLogsIntentCrashLogs", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, -} MTR_DEPRECATED("Please use MTRDiagnosticLogsIntent", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +typedef NS_OPTIONS(uint32_t, MTRValveConfigurationAndControlFeature) { + MTRValveConfigurationAndControlFeatureTimeSync MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRValveConfigurationAndControlFeatureLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsStatus) { - MTRDiagnosticLogsStatusSuccess MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRDiagnosticLogsStatusExhausted MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRDiagnosticLogsStatusNoLogs MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRDiagnosticLogsStatusBusy MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, - MTRDiagnosticLogsStatusDenied MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_OPTIONS(uint16_t, MTRValveConfigurationAndControlValveFaultBitmap) { + MTRValveConfigurationAndControlValveFaultBitmapGeneralFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRValveConfigurationAndControlValveFaultBitmapBlocked MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRValveConfigurationAndControlValveFaultBitmapLeaking MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRValveConfigurationAndControlValveFaultBitmapNotConnected MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRValveConfigurationAndControlValveFaultBitmapShortCircuit MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRValveConfigurationAndControlValveFaultBitmapCurrentExceeded MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsStatus) { - MTRDiagnosticLogsLogsStatusSuccess MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusSuccess", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRDiagnosticLogsLogsStatusExhausted MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusExhausted", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, - MTRDiagnosticLogsLogsStatusNoLogs MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusNoLogs", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, - MTRDiagnosticLogsLogsStatusBusy MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusBusy", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, - MTRDiagnosticLogsLogsStatusDenied MTR_DEPRECATED("Please use MTRDiagnosticLogsStatusDenied", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x04, -} MTR_DEPRECATED("Please use MTRDiagnosticLogsStatus", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +typedef NS_ENUM(uint16_t, MTRElectricalPowerMeasurementMeasurementType) { + MTRElectricalPowerMeasurementMeasurementTypeUnspecified MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRElectricalPowerMeasurementMeasurementTypeVoltage MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRElectricalPowerMeasurementMeasurementTypeActiveCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRElectricalPowerMeasurementMeasurementTypeReactiveCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRElectricalPowerMeasurementMeasurementTypeApparentCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRElectricalPowerMeasurementMeasurementTypeActivePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRElectricalPowerMeasurementMeasurementTypeReactivePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRElectricalPowerMeasurementMeasurementTypeApparentPower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, + MTRElectricalPowerMeasurementMeasurementTypeRMSVoltage MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x08, + MTRElectricalPowerMeasurementMeasurementTypeRMSCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x09, + MTRElectricalPowerMeasurementMeasurementTypeRMSPower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0A, + MTRElectricalPowerMeasurementMeasurementTypeFrequency MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0B, + MTRElectricalPowerMeasurementMeasurementTypePowerFactor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0C, + MTRElectricalPowerMeasurementMeasurementTypeNeutralCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0D, + MTRElectricalPowerMeasurementMeasurementTypeElectricalEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0E, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsTransferProtocol) { - MTRDiagnosticLogsTransferProtocolResponsePayload MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRDiagnosticLogsTransferProtocolBDX MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_ENUM(uint8_t, MTRElectricalPowerMeasurementPowerMode) { + MTRElectricalPowerMeasurementPowerModeUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRElectricalPowerMeasurementPowerModeDC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRElectricalPowerMeasurementPowerModeAC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRDiagnosticLogsLogsTransferProtocol) { - MTRDiagnosticLogsLogsTransferProtocolResponsePayload MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocolResponsePayload", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRDiagnosticLogsLogsTransferProtocolBDX MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocolBDX", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, -} MTR_DEPRECATED("Please use MTRDiagnosticLogsTransferProtocol", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +typedef NS_OPTIONS(uint32_t, MTRElectricalPowerMeasurementFeature) { + MTRElectricalPowerMeasurementFeatureDirectCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRElectricalPowerMeasurementFeatureAlternatingCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRElectricalPowerMeasurementFeaturePolyphasePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRElectricalPowerMeasurementFeatureHarmonics MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRElectricalPowerMeasurementFeaturePowerQuality MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsBootReason) { - MTRGeneralDiagnosticsBootReasonUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRGeneralDiagnosticsBootReasonPowerOnReboot MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRGeneralDiagnosticsBootReasonBrownOutReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRGeneralDiagnosticsBootReasonSoftwareWatchdogReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRGeneralDiagnosticsBootReasonHardwareWatchdogReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRGeneralDiagnosticsBootReasonSoftwareUpdateCompleted MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRGeneralDiagnosticsBootReasonSoftwareReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint16_t, MTRElectricalEnergyMeasurementMeasurementType) { + MTRElectricalEnergyMeasurementMeasurementTypeUnspecified MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRElectricalEnergyMeasurementMeasurementTypeVoltage MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRElectricalEnergyMeasurementMeasurementTypeActiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRElectricalEnergyMeasurementMeasurementTypeReactiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRElectricalEnergyMeasurementMeasurementTypeApparentCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRElectricalEnergyMeasurementMeasurementTypeActivePower MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRElectricalEnergyMeasurementMeasurementTypeReactivePower MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRElectricalEnergyMeasurementMeasurementTypeApparentPower MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRElectricalEnergyMeasurementMeasurementTypeRMSVoltage MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRElectricalEnergyMeasurementMeasurementTypeRMSCurrent MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRElectricalEnergyMeasurementMeasurementTypeRMSPower MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRElectricalEnergyMeasurementMeasurementTypeFrequency MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRElectricalEnergyMeasurementMeasurementTypePowerFactor MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRElectricalEnergyMeasurementMeasurementTypeNeutralCurrent MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRElectricalEnergyMeasurementMeasurementTypeElectricalEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0E, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsBootReasonType) { - MTRGeneralDiagnosticsBootReasonTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRGeneralDiagnosticsBootReasonTypePowerOnReboot MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonPowerOnReboot", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRGeneralDiagnosticsBootReasonTypeBrownOutReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonBrownOutReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRGeneralDiagnosticsBootReasonTypeSoftwareWatchdogReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareWatchdogReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRGeneralDiagnosticsBootReasonTypeHardwareWatchdogReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonHardwareWatchdogReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRGeneralDiagnosticsBootReasonTypeSoftwareUpdateCompleted MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareUpdateCompleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRGeneralDiagnosticsBootReasonTypeSoftwareReset MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReasonSoftwareReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, -} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsBootReason", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRElectricalEnergyMeasurementFeature) { + MTRElectricalEnergyMeasurementFeatureImportedEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRElectricalEnergyMeasurementFeatureExportedEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRElectricalEnergyMeasurementFeatureCumulativeEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRElectricalEnergyMeasurementFeaturePeriodicEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsHardwareFault) { - MTRGeneralDiagnosticsHardwareFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRGeneralDiagnosticsHardwareFaultRadio MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRGeneralDiagnosticsHardwareFaultSensor MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRGeneralDiagnosticsHardwareFaultResettableOverTemp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRGeneralDiagnosticsHardwareFaultNonResettableOverTemp MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRGeneralDiagnosticsHardwareFaultPowerSource MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRGeneralDiagnosticsHardwareFaultVisualDisplayFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTRGeneralDiagnosticsHardwareFaultAudioOutputFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTRGeneralDiagnosticsHardwareFaultUserInterfaceFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTRGeneralDiagnosticsHardwareFaultNonVolatileMemoryError MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, - MTRGeneralDiagnosticsHardwareFaultTamperDetected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRWaterHeaterManagementBoostState) { + MTRWaterHeaterManagementBoostStateInactive MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWaterHeaterManagementBoostStateActive MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsHardwareFaultType) { - MTRGeneralDiagnosticsHardwareFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRGeneralDiagnosticsHardwareFaultTypeRadio MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultRadio", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRGeneralDiagnosticsHardwareFaultTypeSensor MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultSensor", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRGeneralDiagnosticsHardwareFaultTypeResettableOverTemp MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultResettableOverTemp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRGeneralDiagnosticsHardwareFaultTypeNonResettableOverTemp MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultNonResettableOverTemp", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRGeneralDiagnosticsHardwareFaultTypePowerSource MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultPowerSource", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRGeneralDiagnosticsHardwareFaultTypeVisualDisplayFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultVisualDisplayFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRGeneralDiagnosticsHardwareFaultTypeAudioOutputFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultAudioOutputFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRGeneralDiagnosticsHardwareFaultTypeUserInterfaceFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultUserInterfaceFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, - MTRGeneralDiagnosticsHardwareFaultTypeNonVolatileMemoryError MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultNonVolatileMemoryError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, - MTRGeneralDiagnosticsHardwareFaultTypeTamperDetected MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFaultTamperDetected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, -} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsHardwareFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRWaterHeaterManagementFeature) { + MTRWaterHeaterManagementFeatureEnergyManagement MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRWaterHeaterManagementFeatureTankPercent MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsInterfaceType) { - MTRGeneralDiagnosticsInterfaceTypeUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRGeneralDiagnosticsInterfaceTypeWiFi MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRGeneralDiagnosticsInterfaceTypeEthernet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRGeneralDiagnosticsInterfaceTypeCellular MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRGeneralDiagnosticsInterfaceTypeThread MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRWaterHeaterManagementWaterHeaterHeatSourceBitmap) { + MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapImmersionElement1 MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapImmersionElement2 MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapBoiler MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapOther MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsNetworkFault) { - MTRGeneralDiagnosticsNetworkFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRGeneralDiagnosticsNetworkFaultHardwareFailure MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRGeneralDiagnosticsNetworkFaultNetworkJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRGeneralDiagnosticsNetworkFaultConnectionFailed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlCriticalityLevel) { + MTRDemandResponseLoadControlCriticalityLevelUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlCriticalityLevelGreen MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlCriticalityLevelLevel1 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDemandResponseLoadControlCriticalityLevelLevel2 MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDemandResponseLoadControlCriticalityLevelLevel3 MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDemandResponseLoadControlCriticalityLevelLevel4 MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDemandResponseLoadControlCriticalityLevelLevel5 MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDemandResponseLoadControlCriticalityLevelEmergency MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDemandResponseLoadControlCriticalityLevelPlannedOutage MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDemandResponseLoadControlCriticalityLevelServiceDisconnect MTR_PROVISIONALLY_AVAILABLE = 0x09, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsNetworkFaultType) { - MTRGeneralDiagnosticsNetworkFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRGeneralDiagnosticsNetworkFaultTypeHardwareFailure MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultHardwareFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRGeneralDiagnosticsNetworkFaultTypeNetworkJammed MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultNetworkJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRGeneralDiagnosticsNetworkFaultTypeConnectionFailed MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFaultConnectionFailed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsNetworkFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlHeatingSource) { + MTRDemandResponseLoadControlHeatingSourceAny MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlHeatingSourceElectric MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlHeatingSourceNonElectric MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsRadioFault) { - MTRGeneralDiagnosticsRadioFaultUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRGeneralDiagnosticsRadioFaultWiFiFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRGeneralDiagnosticsRadioFaultCellularFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRGeneralDiagnosticsRadioFaultThreadFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRGeneralDiagnosticsRadioFaultNFCFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRGeneralDiagnosticsRadioFaultBLEFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRGeneralDiagnosticsRadioFaultEthernetFault MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventChangeSource) { + MTRDemandResponseLoadControlLoadControlEventChangeSourceAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlLoadControlEventChangeSourceUserAction MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRGeneralDiagnosticsRadioFaultType) { - MTRGeneralDiagnosticsRadioFaultTypeUnspecified MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRGeneralDiagnosticsRadioFaultTypeWiFiFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultWiFiFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRGeneralDiagnosticsRadioFaultTypeCellularFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultCellularFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRGeneralDiagnosticsRadioFaultTypeThreadFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultThreadFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRGeneralDiagnosticsRadioFaultTypeNFCFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultNFCFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRGeneralDiagnosticsRadioFaultTypeBLEFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultBLEFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRGeneralDiagnosticsRadioFaultTypeEthernetFault MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFaultEthernetFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, -} MTR_DEPRECATED("Please use MTRGeneralDiagnosticsRadioFault", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventStatus) { + MTRDemandResponseLoadControlLoadControlEventStatusUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDemandResponseLoadControlLoadControlEventStatusReceived MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDemandResponseLoadControlLoadControlEventStatusInProgress MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDemandResponseLoadControlLoadControlEventStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDemandResponseLoadControlLoadControlEventStatusOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDemandResponseLoadControlLoadControlEventStatusOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDemandResponseLoadControlLoadControlEventStatusCanceled MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDemandResponseLoadControlLoadControlEventStatusSuperseded MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDemandResponseLoadControlLoadControlEventStatusNoParticipation MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDemandResponseLoadControlLoadControlEventStatusUnavailable MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDemandResponseLoadControlLoadControlEventStatusFailed MTR_PROVISIONALLY_AVAILABLE = 0x0C, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRGeneralDiagnosticsFeature) { - MTRGeneralDiagnosticsFeatureDataModelTest MTR_PROVISIONALLY_AVAILABLE = 0x1, +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlCancelControlBitmap) { + MTRDemandResponseLoadControlCancelControlBitmapRandomEnd MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRSoftwareDiagnosticsFeature) { - MTRSoftwareDiagnosticsFeatureWatermarks MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, - MTRSoftwareDiagnosticsFeatureWaterMarks MTR_DEPRECATED("Please use MTRSoftwareDiagnosticsFeatureWatermarks", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlDeviceClassBitmap) { + MTRDemandResponseLoadControlDeviceClassBitmapHVAC MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlDeviceClassBitmapStripHeater MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDemandResponseLoadControlDeviceClassBitmapWaterHeater MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDemandResponseLoadControlDeviceClassBitmapPoolPump MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDemandResponseLoadControlDeviceClassBitmapSmartAppliance MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDemandResponseLoadControlDeviceClassBitmapIrrigationPump MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDemandResponseLoadControlDeviceClassBitmapCommercialLoad MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRDemandResponseLoadControlDeviceClassBitmapResidentialLoad MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRDemandResponseLoadControlDeviceClassBitmapExteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x100, + MTRDemandResponseLoadControlDeviceClassBitmapInteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x200, + MTRDemandResponseLoadControlDeviceClassBitmapEV MTR_PROVISIONALLY_AVAILABLE = 0x400, + MTRDemandResponseLoadControlDeviceClassBitmapGenerationSystem MTR_PROVISIONALLY_AVAILABLE = 0x800, + MTRDemandResponseLoadControlDeviceClassBitmapSmartInverter MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRDemandResponseLoadControlDeviceClassBitmapEVSE MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRDemandResponseLoadControlDeviceClassBitmapRESU MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRDemandResponseLoadControlDeviceClassBitmapEMS MTR_PROVISIONALLY_AVAILABLE = 0x8000, + MTRDemandResponseLoadControlDeviceClassBitmapSEM MTR_PROVISIONALLY_AVAILABLE = 0x10000, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsConnectionStatus) { - MTRThreadNetworkDiagnosticsConnectionStatusConnected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRThreadNetworkDiagnosticsConnectionStatusNotConnected MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventControlBitmap) { + MTRDemandResponseLoadControlEventControlBitmapRandomStart MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsThreadConnectionStatus) { - MTRThreadNetworkDiagnosticsThreadConnectionStatusConnected MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatusConnected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRThreadNetworkDiagnosticsThreadConnectionStatusNotConnected MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatusNotConnected", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, -} MTR_DEPRECATED("Please use MTRThreadNetworkDiagnosticsConnectionStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventTransitionControlBitmap) { + MTRDemandResponseLoadControlEventTransitionControlBitmapRandomDuration MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlEventTransitionControlBitmapIgnoreOptOut MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsNetworkFault) { - MTRThreadNetworkDiagnosticsNetworkFaultUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThreadNetworkDiagnosticsNetworkFaultLinkDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThreadNetworkDiagnosticsNetworkFaultHardwareFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRThreadNetworkDiagnosticsNetworkFaultNetworkJammed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlFeature) { + MTRDemandResponseLoadControlFeatureEnrollmentGroups MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDemandResponseLoadControlFeatureTemperatureOffset MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDemandResponseLoadControlFeatureTemperatureSetpoint MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDemandResponseLoadControlFeatureLoadAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDemandResponseLoadControlFeatureDutyCycle MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDemandResponseLoadControlFeaturePowerSavings MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDemandResponseLoadControlFeatureHeatingSource MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRThreadNetworkDiagnosticsRoutingRole) { - MTRThreadNetworkDiagnosticsRoutingRoleUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThreadNetworkDiagnosticsRoutingRoleUnassigned MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThreadNetworkDiagnosticsRoutingRoleSleepyEndDevice MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRThreadNetworkDiagnosticsRoutingRoleEndDevice MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThreadNetworkDiagnosticsRoutingRoleREED MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThreadNetworkDiagnosticsRoutingRoleRouter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRThreadNetworkDiagnosticsRoutingRoleLeader MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRMessagesFutureMessagePreference) { + MTRMessagesFutureMessagePreferenceAllowed MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMessagesFutureMessagePreferenceIncreased MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMessagesFutureMessagePreferenceReduced MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMessagesFutureMessagePreferenceDisallowed MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRMessagesFutureMessagePreferenceBanned MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRThreadNetworkDiagnosticsFeature) { - MTRThreadNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThreadNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRThreadNetworkDiagnosticsFeatureMLECounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThreadNetworkDiagnosticsFeatureMACCounts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRMessagesMessagePriority) { + MTRMessagesMessagePriorityLow MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMessagesMessagePriorityMedium MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMessagesMessagePriorityHigh MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMessagesMessagePriorityCritical MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsAssociationFailureCause) { - MTRWiFiNetworkDiagnosticsAssociationFailureCauseUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRWiFiNetworkDiagnosticsAssociationFailureCauseAssociationFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRWiFiNetworkDiagnosticsAssociationFailureCauseAuthenticationFailed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRWiFiNetworkDiagnosticsAssociationFailureCauseSsidNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRMessagesFeature) { + MTRMessagesFeatureReceivedConfirmation MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRMessagesFeatureConfirmationResponse MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRMessagesFeatureConfirmationReply MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRMessagesFeatureProtectedMessages MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsConnectionStatus) { - MTRWiFiNetworkDiagnosticsConnectionStatusConnected MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_OPTIONS(uint8_t, MTRMessagesMessageControlBitmap) { + MTRMessagesMessageControlBitmapConfirmationRequired MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRMessagesMessageControlBitmapResponseRequired MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRMessagesMessageControlBitmapReplyMessage MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRMessagesMessageControlBitmapMessageConfirmed MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRMessagesMessageControlBitmapMessageProtected MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiConnectionStatus) { - MTRWiFiNetworkDiagnosticsWiFiConnectionStatusConnected MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusConnected", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiConnectionStatusNotConnected MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatusNotConnected", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, -} MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsConnectionStatus", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementAdjustmentCause) { + MTRDeviceEnergyManagementAdjustmentCauseLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementAdjustmentCauseGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsSecurityType) { - MTRWiFiNetworkDiagnosticsSecurityTypeUnspecified MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRWiFiNetworkDiagnosticsSecurityTypeNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRWiFiNetworkDiagnosticsSecurityTypeWEP MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRWiFiNetworkDiagnosticsSecurityTypeWPA MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRWiFiNetworkDiagnosticsSecurityTypeWPA2 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRWiFiNetworkDiagnosticsSecurityTypeWPA3 MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCause) { + MTRDeviceEnergyManagementCauseNormalCompletion MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementCauseOffline MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementCauseFault MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementCauseUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementCauseCancelled MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersion) { - MTRWiFiNetworkDiagnosticsWiFiVersionA MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiVersionB MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRWiFiNetworkDiagnosticsWiFiVersionG MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRWiFiNetworkDiagnosticsWiFiVersionN MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, - MTRWiFiNetworkDiagnosticsWiFiVersionAc MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x04, - MTRWiFiNetworkDiagnosticsWiFiVersionAx MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, - MTRWiFiNetworkDiagnosticsWiFiVersionAh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCostType) { + MTRDeviceEnergyManagementCostTypeFinancial MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementCostTypeGHGEmissions MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementCostTypeComfort MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementCostTypeTemperature MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRWiFiNetworkDiagnosticsWiFiVersionType) { - MTRWiFiNetworkDiagnosticsWiFiVersionTypeA MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionA", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211a MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeB MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionB", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x01, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211b MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeG MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionG", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x02, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211g MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionG", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeN MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionN", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x03, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211n MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeAc MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x04, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211ac MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAc", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRWiFiNetworkDiagnosticsWiFiVersionTypeAx MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x05, - MTRWiFiNetworkDiagnosticsWiFiVersionType80211ax MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersionAx", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, -} MTR_DEPRECATED("Please use MTRWiFiNetworkDiagnosticsWiFiVersion", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAState) { + MTRDeviceEnergyManagementESAStateOffline MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementESAStateOnline MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementESAStateFault MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementESAStatePowerAdjustActive MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementESAStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRWiFiNetworkDiagnosticsFeature) { - MTRWiFiNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRWiFiNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAType) { + MTRDeviceEnergyManagementESATypeEVSE MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementESATypeSpaceHeating MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementESATypeWaterHeating MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementESATypeSpaceCooling MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementESATypeSpaceHeatingCooling MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDeviceEnergyManagementESATypeBatteryStorage MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDeviceEnergyManagementESATypeSolarPV MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDeviceEnergyManagementESATypeFridgeFreezer MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDeviceEnergyManagementESATypeWashingMachine MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDeviceEnergyManagementESATypeDishwasher MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDeviceEnergyManagementESATypeCooking MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRDeviceEnergyManagementESATypeHomeWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDeviceEnergyManagementESATypeIrrigationWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDeviceEnergyManagementESATypePoolPump MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRDeviceEnergyManagementESATypeOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTREthernetNetworkDiagnosticsPHYRate) { - MTREthernetNetworkDiagnosticsPHYRateRate10M MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTREthernetNetworkDiagnosticsPHYRateRate100M MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTREthernetNetworkDiagnosticsPHYRateRate1G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTREthernetNetworkDiagnosticsPHYRateRate25G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTREthernetNetworkDiagnosticsPHYRateRate5G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTREthernetNetworkDiagnosticsPHYRateRate10G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTREthernetNetworkDiagnosticsPHYRateRate40G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTREthernetNetworkDiagnosticsPHYRateRate100G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTREthernetNetworkDiagnosticsPHYRateRate200G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTREthernetNetworkDiagnosticsPHYRateRate400G MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementForecastUpdateReason) { + MTRDeviceEnergyManagementForecastUpdateReasonInternalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementForecastUpdateReasonLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementForecastUpdateReasonGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTREthernetNetworkDiagnosticsPHYRateType) { - MTREthernetNetworkDiagnosticsPHYRateType10M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate10M", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTREthernetNetworkDiagnosticsPHYRateType100M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate100M", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTREthernetNetworkDiagnosticsPHYRateType1000M MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate1G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTREthernetNetworkDiagnosticsPHYRateType25G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate25G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTREthernetNetworkDiagnosticsPHYRateType5G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate5G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTREthernetNetworkDiagnosticsPHYRateType10G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate10G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTREthernetNetworkDiagnosticsPHYRateType40G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate40G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTREthernetNetworkDiagnosticsPHYRateType100G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate100G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTREthernetNetworkDiagnosticsPHYRateType200G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate200G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, - MTREthernetNetworkDiagnosticsPHYRateType400G MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRateRate400G", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, -} MTR_DEPRECATED("Please use MTREthernetNetworkDiagnosticsPHYRate", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_OPTIONS(uint32_t, MTREthernetNetworkDiagnosticsFeature) { - MTREthernetNetworkDiagnosticsFeaturePacketCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTREthernetNetworkDiagnosticsFeatureErrorCounts MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRTimeSynchronizationGranularity) { - MTRTimeSynchronizationGranularityNoTimeGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRTimeSynchronizationGranularityMinutesGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRTimeSynchronizationGranularitySecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRTimeSynchronizationGranularityMillisecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRTimeSynchronizationGranularityMicrosecondsGranularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRTimeSynchronizationStatusCode) { - MTRTimeSynchronizationStatusCodeTimeNotAccepted MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeSource) { - MTRTimeSynchronizationTimeSourceNone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRTimeSynchronizationTimeSourceUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRTimeSynchronizationTimeSourceAdmin MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRTimeSynchronizationTimeSourceNodeTimeCluster MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRTimeSynchronizationTimeSourceNonMatterSNTP MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRTimeSynchronizationTimeSourceNonFabricSntp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRTimeSynchronizationTimeSourceNonMatterNTP MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRTimeSynchronizationTimeSourceNonFabricNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRTimeSynchronizationTimeSourceMatterSNTP MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRTimeSynchronizationTimeSourceFabricSntp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRTimeSynchronizationTimeSourceMatterNTP MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRTimeSynchronizationTimeSourceFabricNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRTimeSynchronizationTimeSourceMixedNTP MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRTimeSynchronizationTimeSourceMixedNtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRTimeSynchronizationTimeSourceNonMatterSNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRTimeSynchronizationTimeSourceNonFabricSntpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRTimeSynchronizationTimeSourceNonMatterNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRTimeSynchronizationTimeSourceNonFabricNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRTimeSynchronizationTimeSourceMatterSNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRTimeSynchronizationTimeSourceFabricSntpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRTimeSynchronizationTimeSourceMatterNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRTimeSynchronizationTimeSourceFabricNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, - MTRTimeSynchronizationTimeSourceMixedNTPNTS MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRTimeSynchronizationTimeSourceMixedNtpNts MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, - MTRTimeSynchronizationTimeSourceCloudSource MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0E, - MTRTimeSynchronizationTimeSourcePTP MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRTimeSynchronizationTimeSourcePtp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0F, - MTRTimeSynchronizationTimeSourceGNSS MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRTimeSynchronizationTimeSourceGnss MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRTimeSynchronizationTimeZoneDatabase) { - MTRTimeSynchronizationTimeZoneDatabaseFull MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRTimeSynchronizationTimeZoneDatabasePartial MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRTimeSynchronizationTimeZoneDatabaseNone MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRTimeSynchronizationFeature) { - MTRTimeSynchronizationFeatureTimeZone MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRTimeSynchronizationFeatureNTPClient MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRTimeSynchronizationFeatureNTPServer MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRTimeSynchronizationFeatureTimeSyncClient MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationColor) { - MTRBridgedDeviceBasicInformationColorBlack MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRBridgedDeviceBasicInformationColorNavy MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRBridgedDeviceBasicInformationColorGreen MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRBridgedDeviceBasicInformationColorTeal MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRBridgedDeviceBasicInformationColorMaroon MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, - MTRBridgedDeviceBasicInformationColorPurple MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, - MTRBridgedDeviceBasicInformationColorOlive MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, - MTRBridgedDeviceBasicInformationColorGray MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x07, - MTRBridgedDeviceBasicInformationColorBlue MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x08, - MTRBridgedDeviceBasicInformationColorLime MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x09, - MTRBridgedDeviceBasicInformationColorAqua MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0A, - MTRBridgedDeviceBasicInformationColorRed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0B, - MTRBridgedDeviceBasicInformationColorFuchsia MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0C, - MTRBridgedDeviceBasicInformationColorYellow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0D, - MTRBridgedDeviceBasicInformationColorWhite MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0E, - MTRBridgedDeviceBasicInformationColorNickel MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x0F, - MTRBridgedDeviceBasicInformationColorChrome MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, - MTRBridgedDeviceBasicInformationColorBrass MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x11, - MTRBridgedDeviceBasicInformationColorCopper MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x12, - MTRBridgedDeviceBasicInformationColorSilver MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x13, - MTRBridgedDeviceBasicInformationColorGold MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x14, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_ENUM(uint8_t, MTRBridgedDeviceBasicInformationProductFinish) { - MTRBridgedDeviceBasicInformationProductFinishOther MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRBridgedDeviceBasicInformationProductFinishMatte MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRBridgedDeviceBasicInformationProductFinishSatin MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRBridgedDeviceBasicInformationProductFinishPolished MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRBridgedDeviceBasicInformationProductFinishRugged MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, - MTRBridgedDeviceBasicInformationProductFinishFabric MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint32_t, MTRBridgedDeviceBasicInformationFeature) { - MTRBridgedDeviceBasicInformationFeatureBridgedICDSupport MTR_PROVISIONALLY_AVAILABLE = 0x100000, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRSwitchFeature) { - MTRSwitchFeatureLatchingSwitch MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, - MTRSwitchFeatureMomentarySwitch MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, - MTRSwitchFeatureMomentarySwitchRelease MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x4, - MTRSwitchFeatureMomentarySwitchLongPress MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x8, - MTRSwitchFeatureMomentarySwitchMultiPress MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x10, - MTRSwitchFeatureActionSwitch MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); - -typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningCommissioningWindowStatus) { - MTRAdministratorCommissioningCommissioningWindowStatusWindowNotOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRAdministratorCommissioningCommissioningWindowStatusEnhancedWindowOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRAdministratorCommissioningCommissioningWindowStatusBasicWindowOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningStatusCode) { - MTRAdministratorCommissioningStatusCodeBusy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRAdministratorCommissioningStatusCodePAKEParameterError MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRAdministratorCommissioningStatusCodeWindowNotOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRAdministratorCommissioningFeature) { - MTRAdministratorCommissioningFeatureBasic MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTROperationalCredentialsCertificateChainType) { - MTROperationalCredentialsCertificateChainTypeDACCertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTROperationalCredentialsCertificateChainTypePAICertificate MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTROperationalCredentialsNodeOperationalCertStatus) { - MTROperationalCredentialsNodeOperationalCertStatusOK MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTROperationalCredentialsNodeOperationalCertStatusMissingCsr MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTROperationalCredentialsNodeOperationalCertStatusTableFull MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTROperationalCredentialsNodeOperationalCertStatusFabricConflict MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, - MTROperationalCredentialsNodeOperationalCertStatusLabelConflict MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, - MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0B, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTROperationalCredentialsOperationalCertStatus) { - MTROperationalCredentialsOperationalCertStatusSUCCESS MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusOK", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTROperationalCredentialsOperationalCertStatusInvalidPublicKey MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTROperationalCredentialsOperationalCertStatusInvalidNodeOpId MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTROperationalCredentialsOperationalCertStatusInvalidNOC MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTROperationalCredentialsOperationalCertStatusMissingCsr MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusMissingCsr", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTROperationalCredentialsOperationalCertStatusTableFull MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusTableFull", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTROperationalCredentialsOperationalCertStatusInvalidAdminSubject MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTROperationalCredentialsOperationalCertStatusFabricConflict MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusFabricConflict", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, - MTROperationalCredentialsOperationalCertStatusLabelConflict MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusLabelConflict", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, - MTROperationalCredentialsOperationalCertStatusInvalidFabricIndex MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0B, -} MTR_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { - MTRGroupKeyManagementGroupKeySecurityPolicyTrustFirst MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRGroupKeyManagementGroupKeySecurityPolicyCacheAndSync MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRGroupKeyManagementFeature) { - MTRGroupKeyManagementFeatureCacheAndSync MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRICDManagementClientType) { - MTRICDManagementClientTypePermanent MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRICDManagementClientTypeEphemeral MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRICDManagementOperatingMode) { - MTRICDManagementOperatingModeSIT MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRICDManagementOperatingModeLIT MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRICDManagementFeature) { - MTRICDManagementFeatureCheckInProtocolSupport MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRICDManagementFeatureUserActiveModeTrigger MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRICDManagementFeatureLongIdleTimeSupport MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRICDManagementFeatureDynamicSitLitSupport MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRICDManagementUserActiveModeTriggerBitmap) { - MTRICDManagementUserActiveModeTriggerBitmapPowerCycle MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRICDManagementUserActiveModeTriggerBitmapSettingsMenu MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRICDManagementUserActiveModeTriggerBitmapCustomInstruction MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRICDManagementUserActiveModeTriggerBitmapDeviceManual MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensor MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorSeconds MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorTimes MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRICDManagementUserActiveModeTriggerBitmapActuateSensorLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x80, - MTRICDManagementUserActiveModeTriggerBitmapResetButton MTR_PROVISIONALLY_AVAILABLE = 0x100, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x200, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x400, - MTRICDManagementUserActiveModeTriggerBitmapResetButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x800, - MTRICDManagementUserActiveModeTriggerBitmapSetupButton MTR_PROVISIONALLY_AVAILABLE = 0x1000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonSeconds MTR_PROVISIONALLY_AVAILABLE = 0x2000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonLightsBlink MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRICDManagementUserActiveModeTriggerBitmapSetupButtonTimes MTR_PROVISIONALLY_AVAILABLE = 0x8000, - MTRICDManagementUserActiveModeTriggerBitmapAppDefinedButton MTR_PROVISIONALLY_AVAILABLE = 0x10000, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTimerStatus) { - MTRTimerStatusRunning MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRTimerStatusPaused MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRTimerStatusExpired MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRTimerStatusReady MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementOptOutState) { + MTRDeviceEnergyManagementOptOutStateNoOptOut MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementOptOutStateLocalOptOut MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementOptOutStateGridOptOut MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementOptOutStateOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRTimerFeature) { - MTRTimerFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, +typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementPowerAdjustReason) { + MTRDeviceEnergyManagementPowerAdjustReasonNoAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementPowerAdjustReasonLocalOptimizationAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementPowerAdjustReasonGridOptimizationAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x02, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateErrorState) { - MTROvenCavityOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenCavityOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenCavityOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenCavityOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementFeature) { + MTRDeviceEnergyManagementFeaturePowerAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRDeviceEnergyManagementFeaturePowerForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRDeviceEnergyManagementFeatureStateForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRDeviceEnergyManagementFeatureStartTimeAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRDeviceEnergyManagementFeaturePausable MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRDeviceEnergyManagementFeatureForecastAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRDeviceEnergyManagementFeatureConstraintBasedAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x40, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateOperationalState) { - MTROvenCavityOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenCavityOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenCavityOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenCavityOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, +typedef NS_ENUM(uint8_t, MTREnergyEVSEEnergyTransferStoppedReason) { + MTREnergyEVSEEnergyTransferStoppedReasonEVStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEEnergyTransferStoppedReasonEVSEStopped MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEEnergyTransferStoppedReasonOther MTR_PROVISIONALLY_AVAILABLE = 0x02, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { - MTROvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTROvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTROvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTROvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTROvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTROvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTROvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTROvenModeModeTagBake MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTROvenModeModeTagConvection MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTROvenModeModeTagGrill MTR_PROVISIONALLY_AVAILABLE = 0x4002, - MTROvenModeModeTagRoast MTR_PROVISIONALLY_AVAILABLE = 0x4003, - MTROvenModeModeTagClean MTR_PROVISIONALLY_AVAILABLE = 0x4004, - MTROvenModeModeTagConvectionBake MTR_PROVISIONALLY_AVAILABLE = 0x4005, - MTROvenModeModeTagConvectionRoast MTR_PROVISIONALLY_AVAILABLE = 0x4006, - MTROvenModeModeTagWarming MTR_PROVISIONALLY_AVAILABLE = 0x4007, - MTROvenModeModeTagProofing MTR_PROVISIONALLY_AVAILABLE = 0x4008, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTROvenModeFeature) { - MTROvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRLaundryDryerControlsDrynessLevel) { - MTRLaundryDryerControlsDrynessLevelLow MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRLaundryDryerControlsDrynessLevelNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRLaundryDryerControlsDrynessLevelExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRLaundryDryerControlsDrynessLevelMax MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { - MTRModeSelectFeatureOnOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRModeSelectFeatureDEPONOFF MTR_DEPRECATED("Please use MTRModeSelectFeatureOnOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { - MTRLaundryWasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRLaundryWasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRLaundryWasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRLaundryWasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRLaundryWasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRLaundryWasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRLaundryWasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRLaundryWasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRLaundryWasherModeModeTagDelicate MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRLaundryWasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4002, - MTRLaundryWasherModeModeTagWhites MTR_PROVISIONALLY_AVAILABLE = 0x4003, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRLaundryWasherModeFeature) { - MTRLaundryWasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_PROVISIONALLY_AVAILABLE = 0x4001, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAndTemperatureControlledCabinetModeFeature) { - MTRRefrigeratorAndTemperatureControlledCabinetModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRLaundryWasherControlsNumberOfRinses) { - MTRLaundryWasherControlsNumberOfRinsesNone MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRLaundryWasherControlsNumberOfRinsesNormal MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRLaundryWasherControlsNumberOfRinsesExtra MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRLaundryWasherControlsNumberOfRinsesMax MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { - MTRLaundryWasherControlsFeatureSpin MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRLaundryWasherControlsFeatureRinse MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { - MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCRunModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCRunModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCRunModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCRunModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRVCRunModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRVCRunModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRVCRunModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRVCRunModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, - MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, - MTRRVCRunModeModeTagMapping MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { - MTRRVCRunModeStatusCodeStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, - MTRRVCRunModeStatusCodeDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, - MTRRVCRunModeStatusCodeDustBinFull MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, - MTRRVCRunModeStatusCodeWaterTankEmpty MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, - MTRRVCRunModeStatusCodeWaterTankMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, - MTRRVCRunModeStatusCodeWaterTankLidOpen MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, - MTRRVCRunModeStatusCodeMopCleaningPadMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, - MTRRVCRunModeStatusCodeBatteryLow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { - MTRRVCRunModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { - MTRRVCCleanModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCCleanModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCCleanModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCCleanModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCCleanModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRRVCCleanModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRRVCCleanModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRRVCCleanModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRRVCCleanModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRRVCCleanModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, - MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, - MTRRVCCleanModeModeTagMop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4002, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { - MTRRVCCleanModeStatusCodeCleaningInProgress MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { - MTRRVCCleanModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { - MTRTemperatureControlFeatureTemperatureNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRTemperatureControlFeatureTemperatureLevel MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRTemperatureControlFeatureTemperatureStep MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { - MTRRefrigeratorAlarmAlarmBitmapDoorOpen MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { - MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDishwasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDishwasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDishwasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDishwasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDishwasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDishwasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDishwasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRDishwasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRDishwasherModeModeTagLight MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDishwasherModeFeature) { - MTRDishwasherModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRAirQuality) { - MTRAirQualityUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRAirQualityGood MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRAirQualityFair MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRAirQualityModerate MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRAirQualityPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRAirQualityVeryPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRAirQualityExtremelyPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRAirQualityFeature) { - MTRAirQualityFeatureFair MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRAirQualityFeatureModerate MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRAirQualityFeatureVeryPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRAirQualityFeatureExtremelyPoor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmAlarmState) { - MTRSmokeCOAlarmAlarmStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmAlarmStateWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRSmokeCOAlarmAlarmStateCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmContaminationState) { - MTRSmokeCOAlarmContaminationStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmContaminationStateLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRSmokeCOAlarmContaminationStateWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRSmokeCOAlarmContaminationStateCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmEndOfService) { - MTRSmokeCOAlarmEndOfServiceNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmEndOfServiceExpired MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmExpressedState) { - MTRSmokeCOAlarmExpressedStateNormal MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmExpressedStateSmokeAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRSmokeCOAlarmExpressedStateCOAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRSmokeCOAlarmExpressedStateBatteryAlert MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRSmokeCOAlarmExpressedStateTesting MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRSmokeCOAlarmExpressedStateHardwareFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRSmokeCOAlarmExpressedStateEndOfService MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRSmokeCOAlarmExpressedStateInterconnectSmoke MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, - MTRSmokeCOAlarmExpressedStateInterconnectCO MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x08, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmMuteState) { - MTRSmokeCOAlarmMuteStateNotMuted MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmMuteStateMuted MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRSmokeCOAlarmSensitivity) { - MTRSmokeCOAlarmSensitivityHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRSmokeCOAlarmSensitivityStandard MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRSmokeCOAlarmSensitivityLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRSmokeCOAlarmFeature) { - MTRSmokeCOAlarmFeatureSmokeAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRSmokeCOAlarmFeatureCOAlarm MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmAlarmBitmap) { - MTRDishwasherAlarmAlarmBitmapInflowError MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRDishwasherAlarmAlarmBitmapDrainError MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDishwasherAlarmAlarmBitmapDoorError MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRDishwasherAlarmAlarmBitmapTempTooLow MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRDishwasherAlarmAlarmBitmapTempTooHigh MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDishwasherAlarmAlarmBitmapWaterLevelError MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { - MTRDishwasherAlarmFeatureReset MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { - MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRMicrowaveOvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRMicrowaveOvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRMicrowaveOvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRMicrowaveOvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRMicrowaveOvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRMicrowaveOvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRMicrowaveOvenModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRMicrowaveOvenModeModeTagDefrost MTR_PROVISIONALLY_AVAILABLE = 0x4001, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenModeFeature) { - MTRMicrowaveOvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenControlFeature) { - MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRMicrowaveOvenControlFeaturePowerInWatts MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { - MTROperationalStateErrorStateNoError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTROperationalStateErrorStateUnableToStartOrResume MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTROperationalStateErrorStateUnableToCompleteOperation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTROperationalStateErrorStateCommandInvalidInState MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTROperationalState) { - MTROperationalStateStopped MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTROperationalStateRunning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTROperationalStatePaused MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTROperationalStateError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { - MTRRVCOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, - MTRRVCOperationalStateErrorStateStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, - MTRRVCOperationalStateErrorStateDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, - MTRRVCOperationalStateErrorStateDustBinFull MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, - MTRRVCOperationalStateErrorStateWaterTankEmpty MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, - MTRRVCOperationalStateErrorStateWaterTankMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, - MTRRVCOperationalStateErrorStateWaterTankLidOpen MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, - MTRRVCOperationalStateErrorStateMopCleaningPadMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { - MTRRVCOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRRVCOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRRVCOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRRVCOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRRVCOperationalStateOperationalStateSeekingCharger MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, - MTRRVCOperationalStateOperationalStateCharging MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, - MTRRVCOperationalStateOperationalStateDocked MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint8_t, MTRScenesManagementCopyModeBitmap) { - MTRScenesManagementCopyModeBitmapCopyAllScenes MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRScenesManagementFeature) { - MTRScenesManagementFeatureSceneNames MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringChangeIndication) { - MTRHEPAFilterMonitoringChangeIndicationOK MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRHEPAFilterMonitoringChangeIndicationWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRHEPAFilterMonitoringChangeIndicationCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringDegradationDirection) { - MTRHEPAFilterMonitoringDegradationDirectionUp MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRHEPAFilterMonitoringDegradationDirectionDown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRHEPAFilterMonitoringProductIdentifierType) { - MTRHEPAFilterMonitoringProductIdentifierTypeUPC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRHEPAFilterMonitoringProductIdentifierTypeGTIN8 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRHEPAFilterMonitoringProductIdentifierTypeEAN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRHEPAFilterMonitoringProductIdentifierTypeGTIN14 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRHEPAFilterMonitoringProductIdentifierTypeOEM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRHEPAFilterMonitoringFeature) { - MTRHEPAFilterMonitoringFeatureCondition MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRHEPAFilterMonitoringFeatureWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRHEPAFilterMonitoringFeatureReplacementProductList MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringChangeIndication) { - MTRActivatedCarbonFilterMonitoringChangeIndicationOK MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRActivatedCarbonFilterMonitoringChangeIndicationWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRActivatedCarbonFilterMonitoringChangeIndicationCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringDegradationDirection) { - MTRActivatedCarbonFilterMonitoringDegradationDirectionUp MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRActivatedCarbonFilterMonitoringDegradationDirectionDown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRActivatedCarbonFilterMonitoringProductIdentifierType) { - MTRActivatedCarbonFilterMonitoringProductIdentifierTypeUPC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRActivatedCarbonFilterMonitoringProductIdentifierTypeGTIN8 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRActivatedCarbonFilterMonitoringProductIdentifierTypeEAN MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRActivatedCarbonFilterMonitoringProductIdentifierTypeGTIN14 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRActivatedCarbonFilterMonitoringProductIdentifierTypeOEM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRActivatedCarbonFilterMonitoringFeature) { - MTRActivatedCarbonFilterMonitoringFeatureCondition MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRActivatedCarbonFilterMonitoringFeatureWarning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRActivatedCarbonFilterMonitoringFeatureReplacementProductList MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint8_t, MTRBooleanStateConfigurationAlarmModeBitmap) { - MTRBooleanStateConfigurationAlarmModeBitmapVisual MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRBooleanStateConfigurationAlarmModeBitmapAudible MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRBooleanStateConfigurationFeature) { - MTRBooleanStateConfigurationFeatureVisual MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRBooleanStateConfigurationFeatureAudible MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRBooleanStateConfigurationFeatureAlarmSuppress MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRBooleanStateConfigurationFeatureSensitivityLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint16_t, MTRBooleanStateConfigurationSensorFaultBitmap) { - MTRBooleanStateConfigurationSensorFaultBitmapGeneralFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlStatusCode) { - MTRValveConfigurationAndControlStatusCodeFailureDueToFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRValveConfigurationAndControlValveState) { - MTRValveConfigurationAndControlValveStateClosed MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRValveConfigurationAndControlValveStateOpen MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRValveConfigurationAndControlValveStateTransitioning MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRValveConfigurationAndControlFeature) { - MTRValveConfigurationAndControlFeatureTimeSync MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRValveConfigurationAndControlFeatureLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint16_t, MTRValveConfigurationAndControlValveFaultBitmap) { - MTRValveConfigurationAndControlValveFaultBitmapGeneralFault MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRValveConfigurationAndControlValveFaultBitmapBlocked MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRValveConfigurationAndControlValveFaultBitmapLeaking MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRValveConfigurationAndControlValveFaultBitmapNotConnected MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRValveConfigurationAndControlValveFaultBitmapShortCircuit MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRValveConfigurationAndControlValveFaultBitmapCurrentExceeded MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint16_t, MTRElectricalPowerMeasurementMeasurementType) { - MTRElectricalPowerMeasurementMeasurementTypeUnspecified MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRElectricalPowerMeasurementMeasurementTypeVoltage MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRElectricalPowerMeasurementMeasurementTypeActiveCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRElectricalPowerMeasurementMeasurementTypeReactiveCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRElectricalPowerMeasurementMeasurementTypeApparentCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRElectricalPowerMeasurementMeasurementTypeActivePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRElectricalPowerMeasurementMeasurementTypeReactivePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRElectricalPowerMeasurementMeasurementTypeApparentPower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, - MTRElectricalPowerMeasurementMeasurementTypeRMSVoltage MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x08, - MTRElectricalPowerMeasurementMeasurementTypeRMSCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x09, - MTRElectricalPowerMeasurementMeasurementTypeRMSPower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0A, - MTRElectricalPowerMeasurementMeasurementTypeFrequency MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0B, - MTRElectricalPowerMeasurementMeasurementTypePowerFactor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0C, - MTRElectricalPowerMeasurementMeasurementTypeNeutralCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0D, - MTRElectricalPowerMeasurementMeasurementTypeElectricalEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0E, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRElectricalPowerMeasurementPowerMode) { - MTRElectricalPowerMeasurementPowerModeUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRElectricalPowerMeasurementPowerModeDC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRElectricalPowerMeasurementPowerModeAC MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRElectricalPowerMeasurementFeature) { - MTRElectricalPowerMeasurementFeatureDirectCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRElectricalPowerMeasurementFeatureAlternatingCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRElectricalPowerMeasurementFeaturePolyphasePower MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRElectricalPowerMeasurementFeatureHarmonics MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRElectricalPowerMeasurementFeaturePowerQuality MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint16_t, MTRElectricalEnergyMeasurementMeasurementType) { - MTRElectricalEnergyMeasurementMeasurementTypeUnspecified MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRElectricalEnergyMeasurementMeasurementTypeVoltage MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRElectricalEnergyMeasurementMeasurementTypeActiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRElectricalEnergyMeasurementMeasurementTypeReactiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRElectricalEnergyMeasurementMeasurementTypeApparentCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRElectricalEnergyMeasurementMeasurementTypeActivePower MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRElectricalEnergyMeasurementMeasurementTypeReactivePower MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRElectricalEnergyMeasurementMeasurementTypeApparentPower MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRElectricalEnergyMeasurementMeasurementTypeRMSVoltage MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRElectricalEnergyMeasurementMeasurementTypeRMSCurrent MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRElectricalEnergyMeasurementMeasurementTypeRMSPower MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRElectricalEnergyMeasurementMeasurementTypeFrequency MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRElectricalEnergyMeasurementMeasurementTypePowerFactor MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRElectricalEnergyMeasurementMeasurementTypeNeutralCurrent MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRElectricalEnergyMeasurementMeasurementTypeElectricalEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0E, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRElectricalEnergyMeasurementFeature) { - MTRElectricalEnergyMeasurementFeatureImportedEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRElectricalEnergyMeasurementFeatureExportedEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRElectricalEnergyMeasurementFeatureCumulativeEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRElectricalEnergyMeasurementFeaturePeriodicEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRWaterHeaterManagementBoostState) { - MTRWaterHeaterManagementBoostStateInactive MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRWaterHeaterManagementBoostStateActive MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRWaterHeaterManagementFeature) { - MTRWaterHeaterManagementFeatureEnergyManagement MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRWaterHeaterManagementFeatureTankPercent MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRWaterHeaterManagementWaterHeaterHeatSourceBitmap) { - MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapImmersionElement1 MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapImmersionElement2 MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapBoiler MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapOther MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlCriticalityLevel) { - MTRDemandResponseLoadControlCriticalityLevelUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDemandResponseLoadControlCriticalityLevelGreen MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDemandResponseLoadControlCriticalityLevelLevel1 MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDemandResponseLoadControlCriticalityLevelLevel2 MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDemandResponseLoadControlCriticalityLevelLevel3 MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDemandResponseLoadControlCriticalityLevelLevel4 MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDemandResponseLoadControlCriticalityLevelLevel5 MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDemandResponseLoadControlCriticalityLevelEmergency MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDemandResponseLoadControlCriticalityLevelPlannedOutage MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDemandResponseLoadControlCriticalityLevelServiceDisconnect MTR_PROVISIONALLY_AVAILABLE = 0x09, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlHeatingSource) { - MTRDemandResponseLoadControlHeatingSourceAny MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDemandResponseLoadControlHeatingSourceElectric MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDemandResponseLoadControlHeatingSourceNonElectric MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventChangeSource) { - MTRDemandResponseLoadControlLoadControlEventChangeSourceAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDemandResponseLoadControlLoadControlEventChangeSourceUserAction MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlLoadControlEventStatus) { - MTRDemandResponseLoadControlLoadControlEventStatusUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDemandResponseLoadControlLoadControlEventStatusReceived MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDemandResponseLoadControlLoadControlEventStatusInProgress MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDemandResponseLoadControlLoadControlEventStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDemandResponseLoadControlLoadControlEventStatusOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDemandResponseLoadControlLoadControlEventStatusOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDemandResponseLoadControlLoadControlEventStatusCanceled MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDemandResponseLoadControlLoadControlEventStatusSuperseded MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedOut MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDemandResponseLoadControlLoadControlEventStatusPartialOptedIn MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDemandResponseLoadControlLoadControlEventStatusNoParticipation MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDemandResponseLoadControlLoadControlEventStatusUnavailable MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDemandResponseLoadControlLoadControlEventStatusFailed MTR_PROVISIONALLY_AVAILABLE = 0x0C, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlCancelControlBitmap) { - MTRDemandResponseLoadControlCancelControlBitmapRandomEnd MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlDeviceClassBitmap) { - MTRDemandResponseLoadControlDeviceClassBitmapHVAC MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRDemandResponseLoadControlDeviceClassBitmapStripHeater MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDemandResponseLoadControlDeviceClassBitmapWaterHeater MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRDemandResponseLoadControlDeviceClassBitmapPoolPump MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRDemandResponseLoadControlDeviceClassBitmapSmartAppliance MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDemandResponseLoadControlDeviceClassBitmapIrrigationPump MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRDemandResponseLoadControlDeviceClassBitmapCommercialLoad MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRDemandResponseLoadControlDeviceClassBitmapResidentialLoad MTR_PROVISIONALLY_AVAILABLE = 0x80, - MTRDemandResponseLoadControlDeviceClassBitmapExteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x100, - MTRDemandResponseLoadControlDeviceClassBitmapInteriorLighting MTR_PROVISIONALLY_AVAILABLE = 0x200, - MTRDemandResponseLoadControlDeviceClassBitmapEV MTR_PROVISIONALLY_AVAILABLE = 0x400, - MTRDemandResponseLoadControlDeviceClassBitmapGenerationSystem MTR_PROVISIONALLY_AVAILABLE = 0x800, - MTRDemandResponseLoadControlDeviceClassBitmapSmartInverter MTR_PROVISIONALLY_AVAILABLE = 0x1000, - MTRDemandResponseLoadControlDeviceClassBitmapEVSE MTR_PROVISIONALLY_AVAILABLE = 0x2000, - MTRDemandResponseLoadControlDeviceClassBitmapRESU MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRDemandResponseLoadControlDeviceClassBitmapEMS MTR_PROVISIONALLY_AVAILABLE = 0x8000, - MTRDemandResponseLoadControlDeviceClassBitmapSEM MTR_PROVISIONALLY_AVAILABLE = 0x10000, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventControlBitmap) { - MTRDemandResponseLoadControlEventControlBitmapRandomStart MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRDemandResponseLoadControlEventTransitionControlBitmap) { - MTRDemandResponseLoadControlEventTransitionControlBitmapRandomDuration MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRDemandResponseLoadControlEventTransitionControlBitmapIgnoreOptOut MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDemandResponseLoadControlFeature) { - MTRDemandResponseLoadControlFeatureEnrollmentGroups MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRDemandResponseLoadControlFeatureTemperatureOffset MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDemandResponseLoadControlFeatureTemperatureSetpoint MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRDemandResponseLoadControlFeatureLoadAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRDemandResponseLoadControlFeatureDutyCycle MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDemandResponseLoadControlFeaturePowerSavings MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRDemandResponseLoadControlFeatureHeatingSource MTR_PROVISIONALLY_AVAILABLE = 0x40, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRMessagesFutureMessagePreference) { - MTRMessagesFutureMessagePreferenceAllowed MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRMessagesFutureMessagePreferenceIncreased MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRMessagesFutureMessagePreferenceReduced MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRMessagesFutureMessagePreferenceDisallowed MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRMessagesFutureMessagePreferenceBanned MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRMessagesMessagePriority) { - MTRMessagesMessagePriorityLow MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRMessagesMessagePriorityMedium MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRMessagesMessagePriorityHigh MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRMessagesMessagePriorityCritical MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRMessagesFeature) { - MTRMessagesFeatureReceivedConfirmation MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRMessagesFeatureConfirmationResponse MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRMessagesFeatureConfirmationReply MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRMessagesFeatureProtectedMessages MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRMessagesMessageControlBitmap) { - MTRMessagesMessageControlBitmapConfirmationRequired MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRMessagesMessageControlBitmapResponseRequired MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRMessagesMessageControlBitmapReplyMessage MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRMessagesMessageControlBitmapMessageConfirmed MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRMessagesMessageControlBitmapMessageProtected MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementAdjustmentCause) { - MTRDeviceEnergyManagementAdjustmentCauseLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementAdjustmentCauseGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCause) { - MTRDeviceEnergyManagementCauseNormalCompletion MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementCauseOffline MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementCauseFault MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementCauseUserOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDeviceEnergyManagementCauseCancelled MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementCostType) { - MTRDeviceEnergyManagementCostTypeFinancial MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementCostTypeGHGEmissions MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementCostTypeComfort MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementCostTypeTemperature MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAState) { - MTRDeviceEnergyManagementESAStateOffline MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementESAStateOnline MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementESAStateFault MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementESAStatePowerAdjustActive MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDeviceEnergyManagementESAStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementESAType) { - MTRDeviceEnergyManagementESATypeEVSE MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementESATypeSpaceHeating MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementESATypeWaterHeating MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementESATypeSpaceCooling MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDeviceEnergyManagementESATypeSpaceHeatingCooling MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDeviceEnergyManagementESATypeBatteryStorage MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDeviceEnergyManagementESATypeSolarPV MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDeviceEnergyManagementESATypeFridgeFreezer MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDeviceEnergyManagementESATypeWashingMachine MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDeviceEnergyManagementESATypeDishwasher MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDeviceEnergyManagementESATypeCooking MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRDeviceEnergyManagementESATypeHomeWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDeviceEnergyManagementESATypeIrrigationWaterPump MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDeviceEnergyManagementESATypePoolPump MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRDeviceEnergyManagementESATypeOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementForecastUpdateReason) { - MTRDeviceEnergyManagementForecastUpdateReasonInternalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementForecastUpdateReasonLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementForecastUpdateReasonGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementOptOutState) { - MTRDeviceEnergyManagementOptOutStateNoOptOut MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementOptOutStateLocalOptOut MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementOptOutStateGridOptOut MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementOptOutStateOptOut MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDeviceEnergyManagementPowerAdjustReason) { - MTRDeviceEnergyManagementPowerAdjustReasonNoAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementPowerAdjustReasonLocalOptimizationAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementPowerAdjustReasonGridOptimizationAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementFeature) { - MTRDeviceEnergyManagementFeaturePowerAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRDeviceEnergyManagementFeaturePowerForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRDeviceEnergyManagementFeatureStateForecastReporting MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRDeviceEnergyManagementFeatureStartTimeAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRDeviceEnergyManagementFeaturePausable MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRDeviceEnergyManagementFeatureForecastAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRDeviceEnergyManagementFeatureConstraintBasedAdjustment MTR_PROVISIONALLY_AVAILABLE = 0x40, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTREnergyEVSEEnergyTransferStoppedReason) { - MTREnergyEVSEEnergyTransferStoppedReasonEVStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyEVSEEnergyTransferStoppedReasonEVSEStopped MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyEVSEEnergyTransferStoppedReasonOther MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTREnergyEVSEFaultState) { - MTREnergyEVSEFaultStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyEVSEFaultStateMeterFailure MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyEVSEFaultStateOverVoltage MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTREnergyEVSEFaultStateUnderVoltage MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTREnergyEVSEFaultStateOverCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTREnergyEVSEFaultStateContactWetFailure MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTREnergyEVSEFaultStateContactDryFailure MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTREnergyEVSEFaultStateGroundFault MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTREnergyEVSEFaultStatePowerLoss MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTREnergyEVSEFaultStatePowerQuality MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTREnergyEVSEFaultStatePilotShortCircuit MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTREnergyEVSEFaultStateEmergencyStop MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTREnergyEVSEFaultStateEVDisconnected MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTREnergyEVSEFaultStateWrongPowerSupply MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTREnergyEVSEFaultStateLiveNeutralSwap MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTREnergyEVSEFaultStateOverTemperature MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTREnergyEVSEFaultStateOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTREnergyEVSEState) { - MTREnergyEVSEStateNotPluggedIn MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyEVSEStatePluggedInNoDemand MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyEVSEStatePluggedInDemand MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTREnergyEVSEStatePluggedInCharging MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTREnergyEVSEStatePluggedInDischarging MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTREnergyEVSEStateSessionEnding MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTREnergyEVSEStateFault MTR_PROVISIONALLY_AVAILABLE = 0x06, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTREnergyEVSESupplyState) { - MTREnergyEVSESupplyStateDisabled MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyEVSESupplyStateChargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyEVSESupplyStateDischargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTREnergyEVSESupplyStateDisabledError MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTREnergyEVSESupplyStateDisabledDiagnostics MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTREnergyEVSESupplyStateEnabled MTR_PROVISIONALLY_AVAILABLE = 0x05, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTREnergyEVSEFeature) { - MTREnergyEVSEFeatureChargingPreferences MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTREnergyEVSEFeatureSoCReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTREnergyEVSEFeaturePlugAndCharge MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTREnergyEVSEFeatureRFID MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTREnergyEVSEFeatureV2X MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTREnergyEVSETargetDayOfWeekBitmap) { - MTREnergyEVSETargetDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTREnergyEVSETargetDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTREnergyEVSETargetDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTREnergyEVSETargetDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTREnergyEVSETargetDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTREnergyEVSETargetDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTREnergyEVSETargetDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTREnergyPreferenceEnergyPriority) { - MTREnergyPreferenceEnergyPriorityComfort MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyPreferenceEnergyPrioritySpeed MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyPreferenceEnergyPriorityEfficiency MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTREnergyPreferenceEnergyPriorityWaterConsumption MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTREnergyPreferenceFeature) { - MTREnergyPreferenceFeatureEnergyBalance MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTREnergyPreferenceFeatureLowPowerModeSensitivity MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRPowerTopologyFeature) { - MTRPowerTopologyFeatureNodeTopology MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRPowerTopologyFeatureTreeTopology MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRPowerTopologyFeatureSetTopology MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRPowerTopologyFeatureDynamicPowerFlow MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTREnergyEVSEModeModeTag) { - MTREnergyEVSEModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTREnergyEVSEModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTREnergyEVSEModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTREnergyEVSEModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTREnergyEVSEModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTREnergyEVSEModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTREnergyEVSEModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTREnergyEVSEModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTREnergyEVSEModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTREnergyEVSEModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTREnergyEVSEModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTREnergyEVSEModeModeTagTimeOfUse MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTREnergyEVSEModeModeTagSolarCharging MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTREnergyEVSEModeFeature) { - MTREnergyEVSEModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRWaterHeaterModeModeTag) { - MTRWaterHeaterModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRWaterHeaterModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRWaterHeaterModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRWaterHeaterModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRWaterHeaterModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRWaterHeaterModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRWaterHeaterModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRWaterHeaterModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRWaterHeaterModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRWaterHeaterModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRWaterHeaterModeModeTagOff MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRWaterHeaterModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRWaterHeaterModeModeTagTimed MTR_PROVISIONALLY_AVAILABLE = 0x4002, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRWaterHeaterModeFeature) { - MTRWaterHeaterModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint16_t, MTRDeviceEnergyManagementModeModeTag) { - MTRDeviceEnergyManagementModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRDeviceEnergyManagementModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRDeviceEnergyManagementModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRDeviceEnergyManagementModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRDeviceEnergyManagementModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRDeviceEnergyManagementModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRDeviceEnergyManagementModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDeviceEnergyManagementModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDeviceEnergyManagementModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRDeviceEnergyManagementModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRDeviceEnergyManagementModeModeTagNoOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4000, - MTRDeviceEnergyManagementModeModeTagDeviceOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4001, - MTRDeviceEnergyManagementModeModeTagLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4002, - MTRDeviceEnergyManagementModeModeTagGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4003, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementModeFeature) { - MTRDeviceEnergyManagementModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRDoorLockAlarmCode) { - MTRDoorLockAlarmCodeLockJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockAlarmCodeLockFactoryReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockAlarmCodeLockRadioPowerCycled MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockAlarmCodeWrongCodeEntryLimit MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRDoorLockAlarmCodeFrontEsceutcheonRemoved MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRDoorLockAlarmCodeDoorForcedOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTRDoorLockAlarmCodeDoorAjar MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTRDoorLockAlarmCodeForcedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlAlarmCode) { - MTRDoorLockDlAlarmCodeLockJammed MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlAlarmCodeLockFactoryReset MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockFactoryReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlAlarmCodeLockRadioPowerCycled MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockRadioPowerCycled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlAlarmCodeWrongCodeEntryLimit MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeWrongCodeEntryLimit", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlAlarmCodeFrontEsceutcheonRemoved MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeFrontEsceutcheonRemoved", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockDlAlarmCodeDoorForcedOpen MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeDoorForcedOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRDoorLockDlAlarmCodeDoorAjar MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeDoorAjar", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRDoorLockDlAlarmCodeForcedUser MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeForcedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, -} MTR_DEPRECATED("Please use MTRDoorLockAlarmCode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockCredentialRule) { - MTRDoorLockCredentialRuleSingle MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockCredentialRuleDual MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockCredentialRuleTri MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlCredentialRule) { - MTRDoorLockDlCredentialRuleSingle MTR_DEPRECATED("Please use MTRDoorLockCredentialRuleSingle", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlCredentialRuleTri MTR_DEPRECATED("Please use MTRDoorLockCredentialRuleTri", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_DEPRECATED("Please use MTRDoorLockCredentialRule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockCredentialType) { - MTRDoorLockCredentialTypeProgrammingPIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockCredentialTypePIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockCredentialTypeRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockCredentialTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockCredentialTypeFingerVein MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRDoorLockCredentialTypeFace MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRDoorLockCredentialTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRDoorLockCredentialTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRDoorLockCredentialTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x08, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlCredentialType) { - MTRDoorLockDlCredentialTypeProgrammingPIN MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeProgrammingPIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlCredentialTypePIN MTR_DEPRECATED("Please use MTRDoorLockCredentialTypePIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlCredentialTypeRFID MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlCredentialTypeFingerprint MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFingerprint", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlCredentialTypeFingerVein MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFingerVein", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlCredentialTypeFace MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFace", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, -} MTR_DEPRECATED("Please use MTRDoorLockCredentialType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDataOperationType) { - MTRDoorLockDataOperationTypeAdd MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockDataOperationTypeClear MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockDataOperationTypeModify MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlDataOperationType) { - MTRDoorLockDlDataOperationTypeAdd MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeAdd", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlDataOperationTypeClear MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeClear", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlDataOperationTypeModify MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeModify", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_DEPRECATED("Please use MTRDoorLockDataOperationType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlLockState) { - MTRDoorLockDlLockStateNotFullyLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRDoorLockDlLockStateLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRDoorLockDlLockStateUnlocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlLockStateUnlatched MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { - MTRDoorLockDlLockTypeDeadBolt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRDoorLockDlLockTypeMagnetic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRDoorLockDlLockTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlLockTypeMortise MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRDoorLockDlLockTypeRim MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRDoorLockDlLockTypeLatchBolt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRDoorLockDlLockTypeCylindricalLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRDoorLockDlLockTypeTubularLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRDoorLockDlLockTypeInterconnectedLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRDoorLockDlLockTypeDeadLatch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRDoorLockDlLockTypeDoorFurniture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRDoorLockDlLockTypeEurocylinder MTR_PROVISIONALLY_AVAILABLE = 0x0B, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlStatus) { - MTRDoorLockDlStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRDoorLockDlStatusFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRDoorLockDlStatusDuplicate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockDlStatusOccupied MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRDoorLockDlStatusInvalidField MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x85, - MTRDoorLockDlStatusResourceExhausted MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x89, - MTRDoorLockDlStatusNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8B, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRDoorLockOperationEventCode) { - MTRDoorLockOperationEventCodeUnknownOrMfgSpecific MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnknownOrMfgSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockOperationEventCodeLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockOperationEventCodeUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockOperationEventCodeLockInvalidPinOrId MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLockInvalidPinOrId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockOperationEventCodeLockInvalidSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLockInvalidSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockOperationEventCodeUnlockInvalidPinOrId MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlockInvalidPinOrId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockOperationEventCodeUnlockInvalidSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlockInvalidSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRDoorLockOperationEventCodeOneTouchLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeOneTouchLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRDoorLockOperationEventCodeKeyLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeKeyLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, - MTRDoorLockOperationEventCodeKeyUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeKeyUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, - MTRDoorLockOperationEventCodeAutoLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeAutoLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, - MTRDoorLockOperationEventCodeScheduleLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeScheduleLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0B, - MTRDoorLockOperationEventCodeScheduleUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeScheduleUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0C, - MTRDoorLockOperationEventCodeManualLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeManualLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0D, - MTRDoorLockOperationEventCodeManualUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeManualUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0E, -} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockProgrammingEventCode) { - MTRDoorLockProgrammingEventCodeUnknownOrMfgSpecific MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeUnknownOrMfgSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockProgrammingEventCodeMasterCodeChanged MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeMasterCodeChanged", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockProgrammingEventCodePinAdded MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinAdded", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockProgrammingEventCodePinDeleted MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinDeleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockProgrammingEventCodePinChanged MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinChanged", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockProgrammingEventCodeIdAdded MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeIdAdded", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockProgrammingEventCodeIdDeleted MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeIdDeleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, -} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockSetPinOrIdStatus) { - MTRDoorLockSetPinOrIdStatusSuccess MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusSuccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockSetPinOrIdStatusGeneralFailure MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusGeneralFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockSetPinOrIdStatusMemoryFull MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusMemoryFull", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockSetPinOrIdStatusDuplicateCodeError MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusDuplicateCodeError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDoorState) { - MTRDoorLockDoorStateDoorOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockDoorStateDoorClosed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockDoorStateDoorJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockDoorStateDoorForcedOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockDoorStateDoorUnspecifiedError MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRDoorLockDoorStateDoorAjar MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlDoorState) { - MTRDoorLockDlDoorStateDoorOpen MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlDoorStateDoorClosed MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorClosed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlDoorStateDoorJammed MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlDoorStateDoorForcedOpen MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorForcedOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlDoorStateDoorUnspecifiedError MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorUnspecifiedError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlDoorStateDoorAjar MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorAjar", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, -} MTR_DEPRECATED("Please use MTRDoorLockDoorState", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockLockDataType) { - MTRDoorLockLockDataTypeUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockLockDataTypeProgrammingCode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockLockDataTypeUserIndex MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockLockDataTypeWeekDaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockLockDataTypeYearDaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRDoorLockLockDataTypeHolidaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRDoorLockLockDataTypePIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTRDoorLockLockDataTypeRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTRDoorLockLockDataTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTRDoorLockLockDataTypeFingerVein MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, - MTRDoorLockLockDataTypeFace MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, - MTRDoorLockLockDataTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRDoorLockLockDataTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRDoorLockLockDataTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0D, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlLockDataType) { - MTRDoorLockDlLockDataTypeUnspecified MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlLockDataTypeProgrammingCode MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeProgrammingCode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlLockDataTypeUserIndex MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeUserIndex", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlLockDataTypeWeekDaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeWeekDaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlLockDataTypeYearDaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeYearDaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlLockDataTypeHolidaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeHolidaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockDlLockDataTypePIN MTR_DEPRECATED("Please use MTRDoorLockLockDataTypePIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRDoorLockDlLockDataTypeRFID MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRDoorLockDlLockDataTypeFingerprint MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeFingerprint", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, -} MTR_DEPRECATED("Please use MTRDoorLockLockDataType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockLockOperationType) { - MTRDoorLockLockOperationTypeLock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockLockOperationTypeUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockLockOperationTypeNonAccessUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockLockOperationTypeForcedUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockLockOperationTypeUnlatch MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlLockOperationType) { - MTRDoorLockDlLockOperationTypeLock MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlLockOperationTypeUnlock MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlLockOperationTypeNonAccessUserEvent MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeNonAccessUserEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlLockOperationTypeForcedUserEvent MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeForcedUserEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTRDoorLockLockOperationType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockOperatingMode) { - MTRDoorLockOperatingModeNormal MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockOperatingModeVacation MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockOperatingModePrivacy MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockOperatingModeNoRemoteLockUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockOperatingModePassage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlOperatingMode) { - MTRDoorLockDlOperatingModeNormal MTR_DEPRECATED("Please use MTRDoorLockOperatingModeNormal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlOperatingModeVacation MTR_DEPRECATED("Please use MTRDoorLockOperatingModeVacation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlOperatingModePrivacy MTR_DEPRECATED("Please use MTRDoorLockOperatingModePrivacy", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlOperatingModeNoRemoteLockUnlock MTR_DEPRECATED("Please use MTRDoorLockOperatingModeNoRemoteLockUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlOperatingModePassage MTR_DEPRECATED("Please use MTRDoorLockOperatingModePassage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, -} MTR_DEPRECATED("Please use MTRDoorLockOperatingMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockOperationError) { - MTRDoorLockOperationErrorUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockOperationErrorInvalidCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockOperationErrorDisabledUserDenied MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockOperationErrorRestricted MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockOperationErrorInsufficientBattery MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlOperationError) { - MTRDoorLockDlOperationErrorUnspecified MTR_DEPRECATED("Please use MTRDoorLockOperationErrorUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlOperationErrorInvalidCredential MTR_DEPRECATED("Please use MTRDoorLockOperationErrorInvalidCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlOperationErrorDisabledUserDenied MTR_DEPRECATED("Please use MTRDoorLockOperationErrorDisabledUserDenied", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlOperationErrorRestricted MTR_DEPRECATED("Please use MTRDoorLockOperationErrorRestricted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlOperationErrorInsufficientBattery MTR_DEPRECATED("Please use MTRDoorLockOperationErrorInsufficientBattery", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, -} MTR_DEPRECATED("Please use MTRDoorLockOperationError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockOperationSource) { - MTRDoorLockOperationSourceUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockOperationSourceManual MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRDoorLockOperationSourceProprietaryRemote MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRDoorLockOperationSourceKeypad MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockOperationSourceAuto MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRDoorLockOperationSourceButton MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRDoorLockOperationSourceSchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTRDoorLockOperationSourceRemote MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTRDoorLockOperationSourceRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTRDoorLockOperationSourceBiometric MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, - MTRDoorLockOperationSourceAliro MTR_PROVISIONALLY_AVAILABLE = 0x0A, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlOperationSource) { - MTRDoorLockDlOperationSourceUnspecified MTR_DEPRECATED("Please use MTRDoorLockOperationSourceUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlOperationSourceManual MTR_DEPRECATED("Please use MTRDoorLockOperationSourceManual", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlOperationSourceProprietaryRemote MTR_DEPRECATED("Please use MTRDoorLockOperationSourceProprietaryRemote", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlOperationSourceKeypad MTR_DEPRECATED("Please use MTRDoorLockOperationSourceKeypad", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlOperationSourceAuto MTR_DEPRECATED("Please use MTRDoorLockOperationSourceAuto", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlOperationSourceButton MTR_DEPRECATED("Please use MTRDoorLockOperationSourceButton", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockDlOperationSourceSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationSourceSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRDoorLockDlOperationSourceRemote MTR_DEPRECATED("Please use MTRDoorLockOperationSourceRemote", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRDoorLockDlOperationSourceRFID MTR_DEPRECATED("Please use MTRDoorLockOperationSourceRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, - MTRDoorLockDlOperationSourceBiometric MTR_DEPRECATED("Please use MTRDoorLockOperationSourceBiometric", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, -} MTR_DEPRECATED("Please use MTRDoorLockOperationSource", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockUserStatus) { - MTRDoorLockUserStatusAvailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRDoorLockUserStatusOccupiedEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRDoorLockUserStatusOccupiedDisabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRDoorLockUserStatusNotSupported MTR_DEPRECATED("This value is not part of the specification and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlUserStatus) { - MTRDoorLockDlUserStatusAvailable MTR_DEPRECATED("Please use MTRDoorLockUserStatusAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlUserStatusOccupiedEnabled MTR_DEPRECATED("Please use MTRDoorLockUserStatusOccupiedEnabled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlUserStatusOccupiedDisabled MTR_DEPRECATED("Please use MTRDoorLockUserStatusOccupiedDisabled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTRDoorLockUserStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_ENUM(uint8_t, MTRDoorLockUserType) { - MTRDoorLockUserTypeUnrestrictedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRDoorLockUserTypeUnrestricted MTR_DEPRECATED("Please use MTRDoorLockUserTypeUnrestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockUserTypeYearDayScheduleUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRDoorLockUserTypeWeekDayScheduleUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRDoorLockUserTypeProgrammingUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, - MTRDoorLockUserTypeMasterUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeProgrammingUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockUserTypeNonAccessUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRDoorLockUserTypeForcedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRDoorLockUserTypeDisposableUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, - MTRDoorLockUserTypeExpiringUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, - MTRDoorLockUserTypeScheduleRestrictedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTRDoorLockUserTypeRemoteOnlyUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, - MTRDoorLockUserTypeNotSupported MTR_DEPRECATED("This value is not part of the specification and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRDoorLockDlUserType) { - MTRDoorLockDlUserTypeUnrestrictedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeUnrestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRDoorLockDlUserTypeYearDayScheduleUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeYearDayScheduleUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRDoorLockDlUserTypeWeekDayScheduleUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeWeekDayScheduleUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRDoorLockDlUserTypeProgrammingUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeProgrammingUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, - MTRDoorLockDlUserTypeNonAccessUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeNonAccessUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRDoorLockDlUserTypeForcedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeForcedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRDoorLockDlUserTypeDisposableUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeDisposableUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, - MTRDoorLockDlUserTypeExpiringUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeExpiringUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, - MTRDoorLockDlUserTypeScheduleRestrictedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeScheduleRestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, - MTRDoorLockDlUserTypeRemoteOnlyUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeRemoteOnlyUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, -} MTR_DEPRECATED("Please use MTRDoorLockUserType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDaysMaskMap) { - MTRDoorLockDaysMaskMapSunday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRDoorLockDaysMaskMapMonday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRDoorLockDaysMaskMapTuesday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, - MTRDoorLockDaysMaskMapWednesday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, - MTRDoorLockDaysMaskMapThursday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x10, - MTRDoorLockDaysMaskMapFriday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, - MTRDoorLockDaysMaskMapSaturday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40, -} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDlDaysMaskMap) { - MTRDoorLockDlDaysMaskMapSunday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapSunday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRDoorLockDlDaysMaskMapMonday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapMonday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRDoorLockDlDaysMaskMapTuesday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapTuesday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRDoorLockDlDaysMaskMapWednesday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapWednesday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, - MTRDoorLockDlDaysMaskMapThursday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapThursday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x10, - MTRDoorLockDlDaysMaskMapFriday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapFriday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, - MTRDoorLockDlDaysMaskMapSaturday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapSaturday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40, -} MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDlCredentialRuleMask) { - MTRDoorLockDlCredentialRuleMaskSingle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlCredentialRuleMaskDual MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlCredentialRuleMaskTri MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDlCredentialRulesSupport) { - MTRDoorLockDlCredentialRulesSupportSingle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlCredentialRulesSupportDual MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlCredentialRulesSupportTri MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlDefaultConfigurationRegister) { - MTRDoorLockDlDefaultConfigurationRegisterEnableLocalProgrammingEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlDefaultConfigurationRegisterKeypadInterfaceDefaultAccessEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlDefaultConfigurationRegisterRemoteInterfaceDefaultAccessIsEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlDefaultConfigurationRegisterSoundEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlDefaultConfigurationRegisterAutoRelockTimeSet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRDoorLockDlDefaultConfigurationRegisterLEDSettingsSet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlKeypadOperationEventMask) { - MTRDoorLockDlKeypadOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlKeypadOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlKeypadOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlKeypadOperationEventMaskLockInvalidPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlKeypadOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDlKeypadOperationEventMaskUnlockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlKeypadOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRDoorLockDlKeypadOperationEventMaskNonAccessUserOpEvent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlKeypadProgrammingEventMask) { - MTRDoorLockDlKeypadProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlKeypadProgrammingEventMaskProgrammingPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlKeypadProgrammingEventMaskPINAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlKeypadProgrammingEventMaskPINCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlKeypadProgrammingEventMaskPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDlLocalProgrammingFeatures) { - MTRDoorLockDlLocalProgrammingFeaturesAddUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlLocalProgrammingFeaturesModifyUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlLocalProgrammingFeaturesClearUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlLocalProgrammingFeaturesAdjustLockSettingsLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlManualOperationEventMask) { - MTRDoorLockDlManualOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlManualOperationEventMaskThumbturnLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlManualOperationEventMaskThumbturnUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlManualOperationEventMaskOneTouchLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlManualOperationEventMaskKeyLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDlManualOperationEventMaskKeyUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlManualOperationEventMaskAutoLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRDoorLockDlManualOperationEventMaskScheduleLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, - MTRDoorLockDlManualOperationEventMaskScheduleUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, - MTRDoorLockDlManualOperationEventMaskManualLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, - MTRDoorLockDlManualOperationEventMaskManualUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRFIDOperationEventMask) { - MTRDoorLockDlRFIDOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlRFIDOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlRFIDOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlRFIDOperationEventMaskLockInvalidRFID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlRFIDOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDlRFIDOperationEventMaskUnlockInvalidRFID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlRFIDOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRFIDProgrammingEventMask) { - MTRDoorLockDlRFIDProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlRFIDProgrammingEventMaskRFIDCodeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlRFIDProgrammingEventMaskRFIDCodeCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRemoteOperationEventMask) { - MTRDoorLockDlRemoteOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlRemoteOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlRemoteOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlRemoteOperationEventMaskLockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlRemoteOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDlRemoteOperationEventMaskUnlockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlRemoteOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRemoteProgrammingEventMask) { - MTRDoorLockDlRemoteProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlRemoteProgrammingEventMaskProgrammingPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlRemoteProgrammingEventMaskPINAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlRemoteProgrammingEventMaskPINCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlRemoteProgrammingEventMaskPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDlRemoteProgrammingEventMaskRFIDCodeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDlRemoteProgrammingEventMaskRFIDCodeCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRDoorLockDlSupportedOperatingModes) { - MTRDoorLockDlSupportedOperatingModesNormal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDlSupportedOperatingModesVacation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDlSupportedOperatingModesPrivacy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDlSupportedOperatingModesNoRemoteLockUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDlSupportedOperatingModesPassage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRDoorLockDayOfWeek) { - MTRDoorLockDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRDoorLockDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRDoorLockDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRDoorLockDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { - MTRDoorLockFeaturePINCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRDoorLockFeaturePINCredentials MTR_DEPRECATED("Please use MTRDoorLockFeaturePINCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRDoorLockFeatureRFIDCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRDoorLockFeatureRFIDCredentials MTR_DEPRECATED("Please use MTRDoorLockFeatureRFIDCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRDoorLockFeatureFingerCredentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRDoorLockFeatureLogging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRDoorLockFeatureWeekDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x10, - MTRDoorLockFeatureWeekDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureWeekDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x10, - MTRDoorLockFeatureDoorPositionSensor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRDoorLockFeatureFaceCredentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRDoorLockFeatureCredentialsOverTheAirAccess MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x80, - MTRDoorLockFeatureCredentialsOTA MTR_DEPRECATED("Please use MTRDoorLockFeatureCredentialsOverTheAirAccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, - MTRDoorLockFeatureUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x100, - MTRDoorLockFeatureUsersManagement MTR_DEPRECATED("Please use MTRDoorLockFeatureUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x100, - MTRDoorLockFeatureNotification MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x200, - MTRDoorLockFeatureNotifications MTR_DEPRECATED("Please use MTRDoorLockFeatureNotification", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x200, - MTRDoorLockFeatureYearDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x400, - MTRDoorLockFeatureYearDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureYearDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, - MTRDoorLockFeatureHolidaySchedules MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, - MTRDoorLockFeatureUnbolt MTR_PROVISIONALLY_AVAILABLE = 0x1000, - MTRDoorLockFeatureAliroProvisioning MTR_PROVISIONALLY_AVAILABLE = 0x2000, - MTRDoorLockFeatureAliroBLEUWB MTR_PROVISIONALLY_AVAILABLE = 0x4000, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRWindowCoveringEndProductType) { - MTRWindowCoveringEndProductTypeRollerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRWindowCoveringEndProductTypeRomanShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRWindowCoveringEndProductTypeBalloonShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRWindowCoveringEndProductTypeWovenWood MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRWindowCoveringEndProductTypePleatedShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRWindowCoveringEndProductTypeCellularShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRWindowCoveringEndProductTypeLayeredShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRWindowCoveringEndProductTypeLayeredShade2D MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRWindowCoveringEndProductTypeSheerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRWindowCoveringEndProductTypeTiltOnlyInteriorBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRWindowCoveringEndProductTypeInteriorBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRWindowCoveringEndProductTypeVerticalBlindStripCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRWindowCoveringEndProductTypeInteriorVenetianBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, - MTRWindowCoveringEndProductTypeExteriorVenetianBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, - MTRWindowCoveringEndProductTypeLateralLeftCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0E, - MTRWindowCoveringEndProductTypeLateralRightCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0F, - MTRWindowCoveringEndProductTypeCentralCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRWindowCoveringEndProductTypeRollerShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x11, - MTRWindowCoveringEndProductTypeExteriorVerticalScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x12, - MTRWindowCoveringEndProductTypeAwningTerracePatio MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x13, - MTRWindowCoveringEndProductTypeAwningVerticalScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x14, - MTRWindowCoveringEndProductTypeTiltOnlyPergola MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x15, - MTRWindowCoveringEndProductTypeSwingingShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x16, - MTRWindowCoveringEndProductTypeSlidingShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x17, - MTRWindowCoveringEndProductTypeUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRWindowCoveringType) { - MTRWindowCoveringTypeRollerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRWindowCoveringTypeRollerShade2Motor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRWindowCoveringTypeRollerShadeExterior MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRWindowCoveringTypeRollerShadeExterior2Motor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRWindowCoveringTypeDrapery MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRWindowCoveringTypeAwning MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRWindowCoveringTypeShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRWindowCoveringTypeTiltBlindTiltOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRWindowCoveringTypeTiltBlindLiftAndTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRWindowCoveringTypeProjectorScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRWindowCoveringTypeUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRWindowCoveringConfigStatus) { - MTRWindowCoveringConfigStatusOperational MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRWindowCoveringConfigStatusOnlineReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRWindowCoveringConfigStatusLiftMovementReversed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRWindowCoveringConfigStatusLiftPositionAware MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRWindowCoveringConfigStatusTiltPositionAware MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRWindowCoveringConfigStatusLiftEncoderControlled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRWindowCoveringConfigStatusTiltEncoderControlled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRWindowCoveringFeature) { - MTRWindowCoveringFeatureLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRWindowCoveringFeatureTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRWindowCoveringFeaturePositionAwareLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRWindowCoveringFeatureAbsolutePosition MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRWindowCoveringFeaturePositionAwareTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRWindowCoveringMode) { - MTRWindowCoveringModeMotorDirectionReversed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRWindowCoveringModeCalibrationMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRWindowCoveringModeMaintenanceMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRWindowCoveringModeLedFeedback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRWindowCoveringOperationalStatus) { - MTRWindowCoveringOperationalStatusGlobal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x3, - MTRWindowCoveringOperationalStatusLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xC, - MTRWindowCoveringOperationalStatusTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x30, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint16_t, MTRWindowCoveringSafetyStatus) { - MTRWindowCoveringSafetyStatusRemoteLockout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRWindowCoveringSafetyStatusTamperDetection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRWindowCoveringSafetyStatusFailedCommunication MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRWindowCoveringSafetyStatusPositionFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRWindowCoveringSafetyStatusThermalProtection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRWindowCoveringSafetyStatusObstacleDetected MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRWindowCoveringSafetyStatusPower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRWindowCoveringSafetyStatusStopInput MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, - MTRWindowCoveringSafetyStatusMotorJammed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, - MTRWindowCoveringSafetyStatusHardwareFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, - MTRWindowCoveringSafetyStatusManualOperation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, - MTRWindowCoveringSafetyStatusProtection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRBarrierControlCapabilities) { - MTRBarrierControlCapabilitiesPartialBarrier MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRBarrierControlSafetyStatus) { - MTRBarrierControlSafetyStatusRemoteLockout MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRBarrierControlSafetyStatusTemperDetected MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRBarrierControlSafetyStatusFailedCommunication MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRBarrierControlSafetyStatusPositionFailure MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRServiceAreaOperationalStatus) { - MTRServiceAreaOperationalStatusPending MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRServiceAreaOperationalStatusOperating MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRServiceAreaOperationalStatusSkipped MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRServiceAreaOperationalStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRServiceAreaSelectAreasStatus) { - MTRServiceAreaSelectAreasStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRServiceAreaSelectAreasStatusUnsupportedArea MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRServiceAreaSelectAreasStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRServiceAreaSelectAreasStatusInvalidSet MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRServiceAreaSkipAreaStatus) { - MTRServiceAreaSkipAreaStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRServiceAreaSkipAreaStatusInvalidAreaList MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRServiceAreaSkipAreaStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRServiceAreaSkipAreaStatusInvalidSkippedArea MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRServiceAreaFeature) { - MTRServiceAreaFeatureSelectWhileRunning MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRServiceAreaFeatureProgressReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRServiceAreaFeatureMaps MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlControlMode) { - MTRPumpConfigurationAndControlControlModeConstantSpeed MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPumpConfigurationAndControlControlModeConstantPressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRPumpConfigurationAndControlControlModeProportionalPressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRPumpConfigurationAndControlControlModeConstantFlow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, - MTRPumpConfigurationAndControlControlModeConstantTemperature MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, - MTRPumpConfigurationAndControlControlModeAutomatic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlPumpControlMode) { - MTRPumpConfigurationAndControlPumpControlModeConstantSpeed MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantSpeed", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRPumpConfigurationAndControlPumpControlModeConstantPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantPressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, - MTRPumpConfigurationAndControlPumpControlModeProportionalPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeProportionalPressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, - MTRPumpConfigurationAndControlPumpControlModeConstantFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantFlow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, - MTRPumpConfigurationAndControlPumpControlModeConstantTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x05, - MTRPumpConfigurationAndControlPumpControlModeAutomatic MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeAutomatic", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x07, -} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlMode", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); - -typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlOperationMode) { - MTRPumpConfigurationAndControlOperationModeNormal MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTRPumpConfigurationAndControlOperationModeMinimum MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTRPumpConfigurationAndControlOperationModeMaximum MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTRPumpConfigurationAndControlOperationModeLocal MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlPumpOperationMode) { - MTRPumpConfigurationAndControlPumpOperationModeNormal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeNormal", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, - MTRPumpConfigurationAndControlPumpOperationModeMinimum MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeMinimum", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, - MTRPumpConfigurationAndControlPumpOperationModeMaximum MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeMaximum", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, - MTRPumpConfigurationAndControlPumpOperationModeLocal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeLocal", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, -} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationMode", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); - -typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlFeature) { - MTRPumpConfigurationAndControlFeatureConstantPressure MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRPumpConfigurationAndControlFeatureCompensatedPressure MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, - MTRPumpConfigurationAndControlFeatureConstantFlow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, - MTRPumpConfigurationAndControlFeatureConstantSpeed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, - MTRPumpConfigurationAndControlFeatureConstantTemperature MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, - MTRPumpConfigurationAndControlFeatureAutomatic MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x20, - MTRPumpConfigurationAndControlFeatureLocalOperation MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlPumpFeature) { - MTRPumpConfigurationAndControlPumpFeatureConstantPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantPressure", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x1, - MTRPumpConfigurationAndControlPumpFeatureCompensatedPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureCompensatedPressure", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, - MTRPumpConfigurationAndControlPumpFeatureConstantFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantFlow", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x4, - MTRPumpConfigurationAndControlPumpFeatureConstantSpeed MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantSpeed", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x8, - MTRPumpConfigurationAndControlPumpFeatureConstantTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantTemperature", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x10, - MTRPumpConfigurationAndControlPumpFeatureAutomatic MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureAutomatic", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x20, - MTRPumpConfigurationAndControlPumpFeatureLocalOperation MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.5, 17.0), macos(13.4, 14.0), watchos(9.5, 10.0), tvos(16.5, 17.0)) = 0x40, - MTRPumpConfigurationAndControlPumpFeatureLocal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x40, -} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeature", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)); - -typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatusBitmap) { - MTRPumpConfigurationAndControlPumpStatusBitmapDeviceFault MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, - MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, - MTRPumpConfigurationAndControlPumpStatusBitmapSupplyfault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault", ios(16.5, 17.4), macos(13.4, 14.4), watchos(9.5, 10.4), tvos(16.5, 17.4)) = 0x2, - MTRPumpConfigurationAndControlPumpStatusBitmapSpeedLow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4, - MTRPumpConfigurationAndControlPumpStatusBitmapSpeedHigh MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x8, - MTRPumpConfigurationAndControlPumpStatusBitmapLocalOverride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, - MTRPumpConfigurationAndControlPumpStatusBitmapRunning MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, - MTRPumpConfigurationAndControlPumpStatusBitmapRemotePressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x40, - MTRPumpConfigurationAndControlPumpStatusBitmapRemoteFlow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x80, - MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x100, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { - MTRPumpConfigurationAndControlPumpStatusDeviceFault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapDeviceFault", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x1, - MTRPumpConfigurationAndControlPumpStatusSupplyfault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x2, - MTRPumpConfigurationAndControlPumpStatusSpeedLow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSpeedLow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x4, - MTRPumpConfigurationAndControlPumpStatusSpeedHigh MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSpeedHigh", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x8, - MTRPumpConfigurationAndControlPumpStatusLocalOverride MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapLocalOverride", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x10, - MTRPumpConfigurationAndControlPumpStatusRunning MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRunning", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x20, - MTRPumpConfigurationAndControlPumpStatusRemotePressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemotePressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x40, - MTRPumpConfigurationAndControlPumpStatusRemoteFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteFlow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x80, - MTRPumpConfigurationAndControlPumpStatusRemoteTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x100, -} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmap", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); - -typedef NS_ENUM(uint8_t, MTRThermostatACCapacityFormat) { - MTRThermostatACCapacityFormatBTUh MTR_PROVISIONALLY_AVAILABLE = 0x00, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatACCompressorType) { - MTRThermostatACCompressorTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatACCompressorTypeT1 MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatACCompressorTypeT2 MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatACCompressorTypeT3 MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatACLouverPosition) { - MTRThermostatACLouverPositionClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatACLouverPositionOpen MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatACLouverPositionQuarter MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatACLouverPositionHalf MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatACLouverPositionThreeQuarters MTR_PROVISIONALLY_AVAILABLE = 0x05, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatACRefrigerantType) { - MTRThermostatACRefrigerantTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatACRefrigerantTypeR22 MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatACRefrigerantTypeR410a MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatACRefrigerantTypeR407c MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatACType) { - MTRThermostatACTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatACTypeCoolingFixed MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatACTypeHeatPumpFixed MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatACTypeCoolingInverter MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatACTypeHeatPumpInverter MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { - MTRThermostatControlSequenceOfOperationCoolingOnly MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTRThermostatControlSequenceOfOperationHeatingOnly MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, - MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, - MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { - MTRThermostatControlSequenceCoolingOnly MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingOnly", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, - MTRThermostatControlSequenceCoolingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, - MTRThermostatControlSequenceHeatingOnly MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingOnly", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, - MTRThermostatControlSequenceHeatingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x03, - MTRThermostatControlSequenceCoolingAndHeating MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeating", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x04, - MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x05, -} MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatPresetScenario) { - MTRThermostatPresetScenarioOccupied MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatPresetScenarioUnoccupied MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatPresetScenarioSleep MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatPresetScenarioWake MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatPresetScenarioVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRThermostatPresetScenarioGoingToSleep MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRThermostatPresetScenarioUserDefined MTR_PROVISIONALLY_AVAILABLE = 0xFE, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { - MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatSetpointChangeSourceExternal MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { - MTRThermostatSetpointRaiseLowerModeHeat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRThermostatSetpointRaiseLowerModeCool MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTRThermostatSetpointRaiseLowerModeBoth MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { - MTRThermostatSetpointAdjustModeHeat MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x00, - MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRThermostatSetpointAdjustModeCool MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x01, - MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRThermostatSetpointAdjustModeBoth MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x02, - MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerMode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { - MTRThermostatStartOfWeekSunday MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatStartOfWeekMonday MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatStartOfWeekTuesday MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatStartOfWeekWednesday MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatStartOfWeekThursday MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatStartOfWeekFriday MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRThermostatStartOfWeekSaturday MTR_PROVISIONALLY_AVAILABLE = 0x06, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { - MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatSystemModeAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatSystemModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatSystemModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatSystemModeEmergencyHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRThermostatSystemModeEmergencyHeating MTR_DEPRECATED("Please use MTRThermostatSystemModeEmergencyHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRThermostatSystemModePrecooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRThermostatSystemModeFanOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRThermostatSystemModeDry MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - MTRThermostatSystemModeSleep MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { - MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatTemperatureSetpointHoldSetpointHoldOn MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { - MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { - MTRThermostatACErrorCodeBitmapCompressorFail MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatACErrorCodeBitmapRoomSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatACErrorCodeBitmapOutdoorSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRThermostatACErrorCodeBitmapCoilSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { - MTRThermostatFeatureHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThermostatFeatureCooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRThermostatFeatureOccupancy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatFeatureScheduleConfiguration MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, - MTRThermostatFeatureSchedule MTR_DEPRECATED("Please use MTRThermostatFeatureScheduleConfiguration", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, - MTRThermostatFeatureSetback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRThermostatFeatureAutoMode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, - MTRThermostatFeatureAutomode MTR_DEPRECATED("Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, - MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, - MTRThermostatFeatureMatterScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x80, - MTRThermostatFeaturePresets MTR_PROVISIONALLY_AVAILABLE = 0x100, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { - MTRThermostatHVACSystemTypeBitmapCoolingStage MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRThermostatHVACSystemTypeBitmapHeatingStage MTR_PROVISIONALLY_AVAILABLE = 0xC, - MTRThermostatHVACSystemTypeBitmapHeatingIsHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRThermostatOccupancyBitmap) { - MTRThermostatOccupancyBitmapOccupied MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRThermostatPresetTypeFeaturesBitmap) { - MTRThermostatPresetTypeFeaturesBitmapAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatPresetTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { - MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatProgrammingOperationModeBitmapEconomy MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRThermostatRelayStateBitmap) { - MTRThermostatRelayStateBitmapHeat MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatRelayStateBitmapCool MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatRelayStateBitmapFan MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRThermostatRelayStateBitmapHeatStage2 MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRThermostatRelayStateBitmapCoolStage2 MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRThermostatRelayStateBitmapFanStage2 MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRThermostatRelayStateBitmapFanStage3 MTR_PROVISIONALLY_AVAILABLE = 0x40, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { - MTRThermostatRemoteSensingBitmapLocalTemperature MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatRemoteSensingBitmapOutdoorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatRemoteSensingBitmapOccupancy MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { - MTRThermostatScheduleDayOfWeekBitmapSunday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, - MTRThermostatScheduleDayOfWeekBitmapMonday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, - MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4, - MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x8, - MTRThermostatScheduleDayOfWeekBitmapThursday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x10, - MTRThermostatScheduleDayOfWeekBitmapFriday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x20, - MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, - MTRThermostatScheduleDayOfWeekBitmapAway MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x80, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { - MTRThermostatDayOfWeekSunday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSunday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, - MTRThermostatDayOfWeekMonday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapMonday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2, - MTRThermostatDayOfWeekTuesday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapTuesday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4, - MTRThermostatDayOfWeekWednesday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapWednesday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x8, - MTRThermostatDayOfWeekThursday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapThursday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x10, - MTRThermostatDayOfWeekFriday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapFriday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x20, - MTRThermostatDayOfWeekSaturday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSaturday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x40, - MTRThermostatDayOfWeekAway MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x80, - MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, -} MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); - -typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { - MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, - MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { - MTRThermostatModeForSequenceHeatSetpointPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x1, - MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRThermostatModeForSequenceCoolSetpointPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x2, - MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, -} MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); - -typedef NS_OPTIONS(uint16_t, MTRThermostatScheduleTypeFeaturesBitmap) { - MTRThermostatScheduleTypeFeaturesBitmapSupportsPresets MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatScheduleTypeFeaturesBitmapSupportsSetpoints MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatScheduleTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRThermostatScheduleTypeFeaturesBitmapSupportsOff MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { - MTRFanControlAirflowDirectionForward MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRFanControlAirflowDirectionReverse MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRFanControlFanMode) { - MTRFanControlFanModeOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRFanControlFanModeLow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRFanControlFanModeMedium MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRFanControlFanModeHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRFanControlFanModeOn MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, - MTRFanControlFanModeAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, - MTRFanControlFanModeSmart MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_ENUM(uint8_t, MTRFanControlFanModeType) { - MTRFanControlFanModeTypeOff MTR_DEPRECATED("Please use MTRFanControlFanModeOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x00, - MTRFanControlFanModeTypeLow MTR_DEPRECATED("Please use MTRFanControlFanModeLow", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, - MTRFanControlFanModeTypeMedium MTR_DEPRECATED("Please use MTRFanControlFanModeMedium", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, - MTRFanControlFanModeTypeHigh MTR_DEPRECATED("Please use MTRFanControlFanModeHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x03, - MTRFanControlFanModeTypeOn MTR_DEPRECATED("Please use MTRFanControlFanModeOn", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x04, - MTRFanControlFanModeTypeAuto MTR_DEPRECATED("Please use MTRFanControlFanModeAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x05, - MTRFanControlFanModeTypeSmart MTR_DEPRECATED("Please use MTRFanControlFanModeSmart", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x06, -} MTR_DEPRECATED("Please use MTRFanControlFanMode", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); - -typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequence) { - MTRFanControlFanModeSequenceOffLowMedHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, - MTRFanControlFanModeSequenceOffLowHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, - MTRFanControlFanModeSequenceOffLowMedHighAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, - MTRFanControlFanModeSequenceOffLowHighAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, - MTRFanControlFanModeSequenceOffHighAuto MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, - MTRFanControlFanModeSequenceOffOnAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHighAuto", ios(17.0, 17.4), macos(14.0, 14.4), watchos(10.0, 10.4), tvos(17.0, 17.4)) = 0x04, - MTRFanControlFanModeSequenceOffHigh MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, - MTRFanControlFanModeSequenceOffOn MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHigh", ios(17.0, 17.4), macos(14.0, 14.4), watchos(10.0, 10.4), tvos(17.0, 17.4)) = 0x05, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequenceType) { - MTRFanControlFanModeSequenceTypeOffLowMedHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x00, - MTRFanControlFanModeSequenceTypeOffLowHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, - MTRFanControlFanModeSequenceTypeOffLowMedHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, - MTRFanControlFanModeSequenceTypeOffLowHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x03, - MTRFanControlFanModeSequenceTypeOffOnAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x04, - MTRFanControlFanModeSequenceTypeOffOn MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x05, -} MTR_DEPRECATED("Please use MTRFanControlFanModeSequence", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); - -typedef NS_ENUM(uint8_t, MTRFanControlStepDirection) { - MTRFanControlStepDirectionIncrease MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRFanControlStepDirectionDecrease MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRFanControlFeature) { - MTRFanControlFeatureMultiSpeed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRFanControlFeatureAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRFanControlFeatureRocking MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRFanControlFeatureWind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRFanControlFeatureStep MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRFanControlFeatureAirflowDirection MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRFanControlRockBitmap) { - MTRFanControlRockBitmapRockLeftRight MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRFanControlRockBitmapRockUpDown MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, - MTRFanControlRockBitmapRockRound MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint8_t, MTRFanControlRockSupportMask) { - MTRFanControlRockSupportMaskRockLeftRight MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockLeftRight", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, - MTRFanControlRockSupportMaskRockUpDown MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockUpDown", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x2, - MTRFanControlRockSupportMaskRockRound MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockRound", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x4, -} MTR_DEPRECATED("Please use MTRFanControlRockBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); - -typedef NS_OPTIONS(uint8_t, MTRFanControlWindBitmap) { - MTRFanControlWindBitmapSleepWind MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, - MTRFanControlWindBitmapNaturalWind MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { - MTRFanControlWindSupportMaskSleepWind MTR_DEPRECATED("Please use MTRFanControlWindBitmapSleepWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, - MTRFanControlWindSupportMaskNaturalWind MTR_DEPRECATED("Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x2, -} MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); - -typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationKeypadLockout) { - MTRThermostatUserInterfaceConfigurationKeypadLockoutNoLockout MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout1 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout2 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout3 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout4 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, - MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibility) { - MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingPermitted MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingDenied MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationTemperatureDisplayMode) { - MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeCelsius MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeFahrenheit MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { - MTRColorControlColorLoopActionDeactivate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlColorLoopActionActivateFromColorLoopStartEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlColorLoopActionActivateFromEnhancedCurrentHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRColorControlColorLoopDirection) { - MTRColorControlColorLoopDirectionDecrement MTR_NEWLY_AVAILABLE = 0x00, - MTRColorControlColorLoopDirectionDecrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorLoopDirectionDecrement") - = 0x00, - MTRColorControlColorLoopDirectionIncrement MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlColorLoopDirectionIncrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorLoopDirectionIncrement") - = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRColorControlColorMode) { - MTRColorControlColorModeCurrentHueAndCurrentSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRColorControlColorModeCurrentXAndCurrentY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRColorControlColorModeColorTemperatureMireds MTR_NEWLY_AVAILABLE = 0x02, - MTRColorControlColorModeColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorModeColorTemperatureMireds") - = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRColorControlDirection) { - MTRColorControlDirectionShortest MTR_NEWLY_AVAILABLE = 0x00, - MTRColorControlDirectionLongest MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlDirectionUp MTR_NEWLY_AVAILABLE = 0x02, - MTRColorControlDirectionDown MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRColorControlHueDirection) { - MTRColorControlHueDirectionShortestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionShortest") - = 0x00, - MTRColorControlHueDirectionLongestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionLongest") - = 0x01, - MTRColorControlHueDirectionUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionUp") - = 0x02, - MTRColorControlHueDirectionDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionDown") - = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirection"); - -typedef NS_ENUM(uint8_t, MTRColorControlDriftCompensation) { - MTRColorControlDriftCompensationNone MTR_NEWLY_AVAILABLE = 0x00, - MTRColorControlDriftCompensationOtherOrUnknown MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlDriftCompensationTemperatureMonitoring MTR_NEWLY_AVAILABLE = 0x02, - MTRColorControlDriftCompensationOpticalLuminanceMonitoringAndFeedback MTR_NEWLY_AVAILABLE = 0x03, - MTRColorControlDriftCompensationOpticalColorMonitoringAndFeedback MTR_NEWLY_AVAILABLE = 0x04, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRColorControlEnhancedColorMode) { - MTRColorControlEnhancedColorModeCurrentHueAndCurrentSaturation MTR_NEWLY_AVAILABLE = 0x00, - MTRColorControlEnhancedColorModeCurrentXAndCurrentY MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlEnhancedColorModeColorTemperatureMireds MTR_NEWLY_AVAILABLE = 0x02, - MTRColorControlEnhancedColorModeEnhancedCurrentHueAndCurrentSaturation MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRColorControlMoveMode) { - MTRColorControlMoveModeStop MTR_NEWLY_AVAILABLE = 0x00, - MTRColorControlMoveModeUp MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlMoveModeDown MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRColorControlHueMoveMode) { - MTRColorControlHueMoveModeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeStop") - = 0x00, - MTRColorControlHueMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeUp") - = 0x01, - MTRColorControlHueMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeDown") - = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveMode"); - -typedef NS_ENUM(uint8_t, MTRColorControlStepMode) { - MTRColorControlStepModeUp MTR_NEWLY_AVAILABLE = 0x01, - MTRColorControlStepModeDown MTR_NEWLY_AVAILABLE = 0x03, -} MTR_NEWLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRColorControlHueStepMode) { - MTRColorControlHueStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeUp") - = 0x01, - MTRColorControlHueStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeDown") - = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepMode"); - -typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilitiesBitmap) { - MTRColorControlColorCapabilitiesBitmapHueSaturation MTR_NEWLY_AVAILABLE = 0x1, - MTRColorControlColorCapabilitiesBitmapEnhancedHue MTR_NEWLY_AVAILABLE = 0x2, - MTRColorControlColorCapabilitiesBitmapColorLoop MTR_NEWLY_AVAILABLE = 0x4, - MTRColorControlColorCapabilitiesBitmapXY MTR_NEWLY_AVAILABLE = 0x8, - MTRColorControlColorCapabilitiesBitmapColorTemperature MTR_NEWLY_AVAILABLE = 0x10, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilities) { - MTRColorControlColorCapabilitiesHueSaturationSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapHueSaturation") - = 0x1, - MTRColorControlColorCapabilitiesEnhancedHueSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapEnhancedHue") - = 0x2, - MTRColorControlColorCapabilitiesColorLoopSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapColorLoop") - = 0x4, - MTRColorControlColorCapabilitiesXYAttributesSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapXY") - = 0x8, - MTRColorControlColorCapabilitiesColorTemperatureSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapColorTemperature") - = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmap"); - -typedef NS_OPTIONS(uint32_t, MTRColorControlFeature) { - MTRColorControlFeatureHueAndSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRColorControlFeatureEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRColorControlFeatureColorLoop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRColorControlFeatureXY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRColorControlFeatureColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint8_t, MTRColorControlOptionsBitmap) { - MTRColorControlOptionsBitmapExecuteIfOff MTR_NEWLY_AVAILABLE = 0x1, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRColorControlUpdateFlagsBitmap) { - MTRColorControlUpdateFlagsBitmapUpdateAction MTR_NEWLY_AVAILABLE = 0x1, - MTRColorControlUpdateFlagsBitmapUpdateDirection MTR_NEWLY_AVAILABLE = 0x2, - MTRColorControlUpdateFlagsBitmapUpdateTime MTR_NEWLY_AVAILABLE = 0x4, - MTRColorControlUpdateFlagsBitmapUpdateStartHue MTR_NEWLY_AVAILABLE = 0x8, -} MTR_NEWLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRColorControlColorLoopUpdateFlags) { - MTRColorControlColorLoopUpdateFlagsUpdateAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateAction") - = 0x1, - MTRColorControlColorLoopUpdateFlagsUpdateDirection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateDirection") - = 0x2, - MTRColorControlColorLoopUpdateFlagsUpdateTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateTime") - = 0x4, - MTRColorControlColorLoopUpdateFlagsUpdateStartHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateStartHue") - = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmap"); - -typedef NS_OPTIONS(uint8_t, MTRBallastConfigurationBallastStatusBitmap) { - MTRBallastConfigurationBallastStatusBitmapBallastNonOperational MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRBallastConfigurationBallastStatusBitmapLampFailure MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTRBallastConfigurationLampAlarmModeBitmap) { - MTRBallastConfigurationLampAlarmModeBitmapLampBurnHours MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRIlluminanceMeasurementLightSensorType) { - MTRIlluminanceMeasurementLightSensorTypePhotodiode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRIlluminanceMeasurementLightSensorTypeCMOS MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementFeature) { - MTRPressureMeasurementFeatureExtended MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, -} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); - -typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementPressureFeature) { - MTRPressureMeasurementPressureFeatureExtended MTR_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x1, - MTRPressureMeasurementPressureFeatureEXT MTR_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, -} MTR_DEPRECATED("Please use MTRPressureMeasurementFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); - -typedef NS_ENUM(uint8_t, MTROccupancySensingOccupancySensorType) { - MTROccupancySensingOccupancySensorTypePIR MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, - MTROccupancySensingOccupancySensorTypeUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, - MTROccupancySensingOccupancySensorTypePIRAndUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, - MTROccupancySensingOccupancySensorTypePhysicalContact MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_OPTIONS(uint32_t, MTROccupancySensingFeature) { - MTROccupancySensingFeatureOther MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTROccupancySensingFeaturePassiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTROccupancySensingFeatureUltrasonic MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTROccupancySensingFeaturePhysicalContact MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTROccupancySensingFeatureActiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTROccupancySensingFeatureRadar MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTROccupancySensingFeatureRFSensing MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTROccupancySensingFeatureVision MTR_PROVISIONALLY_AVAILABLE = 0x80, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancyBitmap) { - MTROccupancySensingOccupancyBitmapOccupied MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancySensorTypeBitmap) { - MTROccupancySensingOccupancySensorTypeBitmapPIR MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, - MTROccupancySensingOccupancySensorTypeBitmapUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2, - MTROccupancySensingOccupancySensorTypeBitmapPhysicalContact MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4, -} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); - -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementLevelValue) { - MTRCarbonMonoxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonMonoxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonMonoxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRCarbonMonoxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRCarbonMonoxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementMedium) { - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementUnit) { - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRCarbonMonoxideConcentrationMeasurementFeature) { - MTRCarbonMonoxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRCarbonMonoxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRCarbonMonoxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRCarbonMonoxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRCarbonMonoxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRCarbonMonoxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementLevelValue) { - MTRCarbonDioxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonDioxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonDioxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRCarbonDioxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRCarbonDioxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementMedium) { - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonDioxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementUnit) { - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRCarbonDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRCarbonDioxideConcentrationMeasurementFeature) { - MTRCarbonDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRCarbonDioxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRCarbonDioxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRCarbonDioxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRCarbonDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRCarbonDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementLevelValue) { - MTRNitrogenDioxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRNitrogenDioxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRNitrogenDioxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRNitrogenDioxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRNitrogenDioxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementMedium) { - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementUnit) { - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRNitrogenDioxideConcentrationMeasurementFeature) { - MTRNitrogenDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRNitrogenDioxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRNitrogenDioxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRNitrogenDioxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRNitrogenDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRNitrogenDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementLevelValue) { - MTROzoneConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTROzoneConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTROzoneConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTROzoneConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTROzoneConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementMedium) { - MTROzoneConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTROzoneConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTROzoneConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementUnit) { - MTROzoneConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTROzoneConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTROzoneConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTROzoneConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTROzoneConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTROzoneConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTROzoneConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTROzoneConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTROzoneConcentrationMeasurementFeature) { - MTROzoneConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTROzoneConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTROzoneConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTROzoneConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTROzoneConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTROzoneConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementLevelValue) { - MTRPM25ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM25ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM25ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM25ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM25ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementMedium) { - MTRPM25ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM25ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM25ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementUnit) { - MTRPM25ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM25ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM25ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM25ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM25ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRPM25ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRPM25ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRPM25ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRPM25ConcentrationMeasurementFeature) { - MTRPM25ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRPM25ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRPM25ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRPM25ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRPM25ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRPM25ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementLevelValue) { - MTRFormaldehydeConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRFormaldehydeConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRFormaldehydeConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRFormaldehydeConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRFormaldehydeConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementMedium) { - MTRFormaldehydeConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRFormaldehydeConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRFormaldehydeConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementUnit) { - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRFormaldehydeConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRFormaldehydeConcentrationMeasurementFeature) { - MTRFormaldehydeConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRFormaldehydeConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRFormaldehydeConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRFormaldehydeConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRFormaldehydeConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRFormaldehydeConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementLevelValue) { - MTRPM1ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM1ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM1ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM1ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM1ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementMedium) { - MTRPM1ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM1ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM1ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementUnit) { - MTRPM1ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM1ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM1ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM1ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM1ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRPM1ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRPM1ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRPM1ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRPM1ConcentrationMeasurementFeature) { - MTRPM1ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRPM1ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRPM1ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRPM1ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRPM1ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRPM1ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementLevelValue) { - MTRPM10ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM10ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM10ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM10ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM10ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementMedium) { - MTRPM10ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM10ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM10ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementUnit) { - MTRPM10ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRPM10ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRPM10ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRPM10ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRPM10ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRPM10ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRPM10ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRPM10ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRPM10ConcentrationMeasurementFeature) { - MTRPM10ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRPM10ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRPM10ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRPM10ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRPM10ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRPM10ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeature) { - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementLevelValue) { - MTRRadonConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRRadonConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRRadonConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRRadonConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRRadonConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementMedium) { - MTRRadonConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRRadonConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRRadonConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementUnit) { - MTRRadonConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, - MTRRadonConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, - MTRRadonConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, - MTRRadonConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, - MTRRadonConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, - MTRRadonConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, - MTRRadonConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, - MTRRadonConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRRadonConcentrationMeasurementFeature) { - MTRRadonConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, - MTRRadonConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, - MTRRadonConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, - MTRRadonConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, - MTRRadonConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, - MTRRadonConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, -} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - -typedef NS_OPTIONS(uint32_t, MTRThreadBorderRouterManagementFeature) { - MTRThreadBorderRouterManagementFeaturePANChange MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRChannelType) { - MTRChannelTypeSatellite MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRChannelTypeCable MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRChannelTypeTerrestrial MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRChannelTypeOTT MTR_PROVISIONALLY_AVAILABLE = 0x03, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRChannelLineupInfoType) { - MTRChannelLineupInfoTypeMSO MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRChannelLineupInfoTypeMso MTR_DEPRECATED("Please use MTRChannelLineupInfoTypeMSO", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRChannelStatus) { - MTRChannelStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRChannelStatusMultipleMatches MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRChannelStatusNoMatches MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRChannelFeature) { - MTRChannelFeatureChannelList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRChannelFeatureLineupInfo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRChannelFeatureElectronicGuide MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x8, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRChannelRecordingFlagBitmap) { - MTRChannelRecordingFlagBitmapScheduled MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRChannelRecordingFlagBitmapRecordSeries MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x4, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRTargetNavigatorStatus) { - MTRTargetNavigatorStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRTargetNavigatorStatusTargetNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRTargetNavigatorStatusNotAllowed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRMediaPlaybackCharacteristic) { - MTRMediaPlaybackCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRMediaPlaybackCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRMediaPlaybackCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRMediaPlaybackCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRMediaPlaybackCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRMediaPlaybackCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRMediaPlaybackCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRMediaPlaybackCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRMediaPlaybackCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRMediaPlaybackCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRMediaPlaybackCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRMediaPlaybackCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRMediaPlaybackCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRMediaPlaybackCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRMediaPlaybackCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRMediaPlaybackCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRMediaPlaybackCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRMediaPlaybackCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, -} MTR_PROVISIONALLY_AVAILABLE; - -typedef NS_ENUM(uint8_t, MTRMediaPlaybackPlaybackState) { - MTRMediaPlaybackPlaybackStatePlaying MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRMediaPlaybackPlaybackStatePaused MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRMediaPlaybackPlaybackStateNotPlaying MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRMediaPlaybackPlaybackStateBuffering MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRMediaPlaybackStatus) { - MTRMediaPlaybackStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRMediaPlaybackStatusInvalidStateForCommand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRMediaPlaybackStatusNotAllowed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRMediaPlaybackStatusNotActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRMediaPlaybackStatusSpeedOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRMediaPlaybackStatusSeekOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRMediaPlaybackFeature) { - MTRMediaPlaybackFeatureAdvancedSeek MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, - MTRMediaPlaybackFeatureVariableSpeed MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, - MTRMediaPlaybackFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRMediaPlaybackFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRMediaPlaybackFeatureAudioAdvance MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); - -typedef NS_ENUM(uint8_t, MTRMediaInputInputType) { - MTRMediaInputInputTypeInternal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRMediaInputInputTypeAux MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRMediaInputInputTypeCoax MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRMediaInputInputTypeComposite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRMediaInputInputTypeHDMI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, - MTRMediaInputInputTypeHdmi MTR_DEPRECATED("Please use MTRMediaInputInputTypeHDMI", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, - MTRMediaInputInputTypeInput MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRMediaInputInputTypeLine MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRMediaInputInputTypeOptical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRMediaInputInputTypeVideo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRMediaInputInputTypeSCART MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, - MTRMediaInputInputTypeScart MTR_DEPRECATED("Please use MTRMediaInputInputTypeSCART", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, - MTRMediaInputInputTypeUSB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, - MTRMediaInputInputTypeUsb MTR_DEPRECATED("Please use MTRMediaInputInputTypeUSB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, - MTRMediaInputInputTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_OPTIONS(uint32_t, MTRMediaInputFeature) { - MTRMediaInputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -typedef NS_ENUM(uint8_t, MTRKeypadInputCECKeyCode) { - MTRKeypadInputCECKeyCodeSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRKeypadInputCECKeyCodeUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTRKeypadInputCECKeyCodeDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTRKeypadInputCECKeyCodeLeft MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, - MTRKeypadInputCECKeyCodeRight MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, - MTRKeypadInputCECKeyCodeRightUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, - MTRKeypadInputCECKeyCodeRightDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x06, - MTRKeypadInputCECKeyCodeLeftUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x07, - MTRKeypadInputCECKeyCodeLeftDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x08, - MTRKeypadInputCECKeyCodeRootMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x09, - MTRKeypadInputCECKeyCodeSetupMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0A, - MTRKeypadInputCECKeyCodeContentsMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0B, - MTRKeypadInputCECKeyCodeFavoriteMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0C, - MTRKeypadInputCECKeyCodeExit MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0D, - MTRKeypadInputCECKeyCodeMediaTopMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x10, - MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x11, - MTRKeypadInputCECKeyCodeNumberEntryMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1D, - MTRKeypadInputCECKeyCodeNumber11 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1E, - MTRKeypadInputCECKeyCodeNumber12 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1F, - MTRKeypadInputCECKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x20, - MTRKeypadInputCECKeyCodeNumbers1 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x21, - MTRKeypadInputCECKeyCodeNumbers2 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x22, - MTRKeypadInputCECKeyCodeNumbers3 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x23, - MTRKeypadInputCECKeyCodeNumbers4 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x24, - MTRKeypadInputCECKeyCodeNumbers5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x25, - MTRKeypadInputCECKeyCodeNumbers6 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x26, - MTRKeypadInputCECKeyCodeNumbers7 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x27, - MTRKeypadInputCECKeyCodeNumbers8 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x28, - MTRKeypadInputCECKeyCodeNumbers9 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x29, - MTRKeypadInputCECKeyCodeDot MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2A, - MTRKeypadInputCECKeyCodeEnter MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2B, - MTRKeypadInputCECKeyCodeClear MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2C, - MTRKeypadInputCECKeyCodeNextFavorite MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2F, - MTRKeypadInputCECKeyCodeChannelUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x30, - MTRKeypadInputCECKeyCodeChannelDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x31, - MTRKeypadInputCECKeyCodePreviousChannel MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x32, - MTRKeypadInputCECKeyCodeSoundSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x33, - MTRKeypadInputCECKeyCodeInputSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x34, - MTRKeypadInputCECKeyCodeDisplayInformation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x35, - MTRKeypadInputCECKeyCodeHelp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x36, - MTRKeypadInputCECKeyCodePageUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x37, - MTRKeypadInputCECKeyCodePageDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x38, - MTRKeypadInputCECKeyCodePower MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, - MTRKeypadInputCECKeyCodeVolumeUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, - MTRKeypadInputCECKeyCodeVolumeDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, - MTRKeypadInputCECKeyCodeMute MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, - MTRKeypadInputCECKeyCodePlay MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, - MTRKeypadInputCECKeyCodeStop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, - MTRKeypadInputCECKeyCodePause MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, - MTRKeypadInputCECKeyCodeRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, - MTRKeypadInputCECKeyCodeRewind MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, - MTRKeypadInputCECKeyCodeFastForward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x49, - MTRKeypadInputCECKeyCodeEject MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4A, - MTRKeypadInputCECKeyCodeForward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4B, - MTRKeypadInputCECKeyCodeBackward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4C, - MTRKeypadInputCECKeyCodeStopRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4D, - MTRKeypadInputCECKeyCodePauseRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4E, - MTRKeypadInputCECKeyCodeReserved MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4F, - MTRKeypadInputCECKeyCodeAngle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x50, - MTRKeypadInputCECKeyCodeSubPicture MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x51, - MTRKeypadInputCECKeyCodeVideoOnDemand MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x52, - MTRKeypadInputCECKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x53, - MTRKeypadInputCECKeyCodeTimerProgramming MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x54, - MTRKeypadInputCECKeyCodeInitialConfiguration MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x55, - MTRKeypadInputCECKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x56, - MTRKeypadInputCECKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x57, - MTRKeypadInputCECKeyCodePlayFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x60, - MTRKeypadInputCECKeyCodePausePlayFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x61, - MTRKeypadInputCECKeyCodeRecordFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x62, - MTRKeypadInputCECKeyCodePauseRecordFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x63, - MTRKeypadInputCECKeyCodeStopFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x64, - MTRKeypadInputCECKeyCodeMuteFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x65, - MTRKeypadInputCECKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x66, - MTRKeypadInputCECKeyCodeTuneFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x67, - MTRKeypadInputCECKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x68, - MTRKeypadInputCECKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x69, - MTRKeypadInputCECKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6A, - MTRKeypadInputCECKeyCodePowerToggleFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6B, - MTRKeypadInputCECKeyCodePowerOffFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6C, - MTRKeypadInputCECKeyCodePowerOnFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6D, - MTRKeypadInputCECKeyCodeF1Blue MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x71, - MTRKeypadInputCECKeyCodeF2Red MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x72, - MTRKeypadInputCECKeyCodeF3Green MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x73, - MTRKeypadInputCECKeyCodeF4Yellow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x74, - MTRKeypadInputCECKeyCodeF5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x75, - MTRKeypadInputCECKeyCodeData MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x76, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); - -typedef NS_ENUM(uint8_t, MTRKeypadInputCecKeyCode) { - MTRKeypadInputCecKeyCodeSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, - MTRKeypadInputCecKeyCodeUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, - MTRKeypadInputCecKeyCodeDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, - MTRKeypadInputCecKeyCodeLeft MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeft", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x03, - MTRKeypadInputCecKeyCodeRight MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRight", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x04, - MTRKeypadInputCecKeyCodeRightUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x05, - MTRKeypadInputCecKeyCodeRightDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x06, - MTRKeypadInputCecKeyCodeLeftUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x07, - MTRKeypadInputCecKeyCodeLeftDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x08, - MTRKeypadInputCecKeyCodeRootMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRootMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x09, - MTRKeypadInputCecKeyCodeSetupMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSetupMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0A, - MTRKeypadInputCecKeyCodeContentsMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeContentsMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0B, - MTRKeypadInputCecKeyCodeFavoriteMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFavoriteMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0C, - MTRKeypadInputCecKeyCodeExit MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeExit", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0D, - MTRKeypadInputCecKeyCodeMediaTopMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaTopMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x10, - MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x11, - MTRKeypadInputCecKeyCodeNumberEntryMode MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumberEntryMode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1D, - MTRKeypadInputCecKeyCodeNumber11 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber11", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1E, - MTRKeypadInputCecKeyCodeNumber12 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber12", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1F, - MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber0OrNumber10", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x20, - MTRKeypadInputCecKeyCodeNumbers1 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers1", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x21, - MTRKeypadInputCecKeyCodeNumbers2 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers2", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x22, - MTRKeypadInputCecKeyCodeNumbers3 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers3", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x23, - MTRKeypadInputCecKeyCodeNumbers4 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers4", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x24, - MTRKeypadInputCecKeyCodeNumbers5 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers5", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x25, - MTRKeypadInputCecKeyCodeNumbers6 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers6", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x26, - MTRKeypadInputCecKeyCodeNumbers7 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers7", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x27, - MTRKeypadInputCecKeyCodeNumbers8 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers8", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x28, - MTRKeypadInputCecKeyCodeNumbers9 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers9", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x29, - MTRKeypadInputCecKeyCodeDot MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDot", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2A, - MTRKeypadInputCecKeyCodeEnter MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEnter", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2B, - MTRKeypadInputCecKeyCodeClear MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeClear", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2C, - MTRKeypadInputCecKeyCodeNextFavorite MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNextFavorite", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2F, - MTRKeypadInputCecKeyCodeChannelUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x30, - MTRKeypadInputCecKeyCodeChannelDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x31, - MTRKeypadInputCecKeyCodePreviousChannel MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePreviousChannel", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x32, - MTRKeypadInputCecKeyCodeSoundSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSoundSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x33, - MTRKeypadInputCecKeyCodeInputSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInputSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x34, - MTRKeypadInputCecKeyCodeDisplayInformation MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDisplayInformation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x35, - MTRKeypadInputCecKeyCodeHelp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeHelp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x36, - MTRKeypadInputCecKeyCodePageUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x37, - MTRKeypadInputCecKeyCodePageDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x38, - MTRKeypadInputCecKeyCodePower MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePower", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x40, - MTRKeypadInputCecKeyCodeVolumeUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x41, - MTRKeypadInputCecKeyCodeVolumeDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x42, - MTRKeypadInputCecKeyCodeMute MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMute", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x43, - MTRKeypadInputCecKeyCodePlay MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlay", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x44, - MTRKeypadInputCecKeyCodeStop MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStop", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x45, - MTRKeypadInputCecKeyCodePause MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePause", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x46, - MTRKeypadInputCecKeyCodeRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x47, - MTRKeypadInputCecKeyCodeRewind MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRewind", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x48, - MTRKeypadInputCecKeyCodeFastForward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFastForward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x49, - MTRKeypadInputCecKeyCodeEject MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEject", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4A, - MTRKeypadInputCecKeyCodeForward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeForward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4B, - MTRKeypadInputCecKeyCodeBackward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeBackward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4C, - MTRKeypadInputCecKeyCodeStopRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4D, - MTRKeypadInputCecKeyCodePauseRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4E, - MTRKeypadInputCecKeyCodeReserved MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeReserved", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4F, - MTRKeypadInputCecKeyCodeAngle MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeAngle", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x50, - MTRKeypadInputCecKeyCodeSubPicture MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSubPicture", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x51, - MTRKeypadInputCecKeyCodeVideoOnDemand MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVideoOnDemand", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x52, - MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeElectronicProgramGuide", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x53, - MTRKeypadInputCecKeyCodeTimerProgramming MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTimerProgramming", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x54, - MTRKeypadInputCecKeyCodeInitialConfiguration MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInitialConfiguration", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x55, - MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectBroadcastType", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x56, - MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectSoundPresentation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x57, - MTRKeypadInputCecKeyCodePlayFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlayFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x60, - MTRKeypadInputCecKeyCodePausePlayFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePausePlayFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x61, - MTRKeypadInputCecKeyCodeRecordFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecordFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x62, - MTRKeypadInputCecKeyCodePauseRecordFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecordFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x63, - MTRKeypadInputCecKeyCodeStopFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x64, - MTRKeypadInputCecKeyCodeMuteFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMuteFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x65, - MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRestoreVolumeFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x66, - MTRKeypadInputCecKeyCodeTuneFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTuneFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x67, - MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectMediaFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x68, - MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAvInputFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x69, - MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAudioInputFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6A, - MTRKeypadInputCecKeyCodePowerToggleFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerToggleFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6B, - MTRKeypadInputCecKeyCodePowerOffFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOffFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6C, - MTRKeypadInputCecKeyCodePowerOnFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOnFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6D, - MTRKeypadInputCecKeyCodeF1Blue MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF1Blue", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x71, - MTRKeypadInputCecKeyCodeF2Red MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF2Red", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x72, - MTRKeypadInputCecKeyCodeF3Green MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF3Green", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x73, - MTRKeypadInputCecKeyCodeF4Yellow MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF4Yellow", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x74, - MTRKeypadInputCecKeyCodeF5 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF5", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x75, - MTRKeypadInputCecKeyCodeData MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeData", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x76, -} MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); +typedef NS_ENUM(uint8_t, MTREnergyEVSEFaultState) { + MTREnergyEVSEFaultStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEFaultStateMeterFailure MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEFaultStateOverVoltage MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEFaultStateUnderVoltage MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEFaultStateOverCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEFaultStateContactWetFailure MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEFaultStateContactDryFailure MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTREnergyEVSEFaultStateGroundFault MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTREnergyEVSEFaultStatePowerLoss MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTREnergyEVSEFaultStatePowerQuality MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTREnergyEVSEFaultStatePilotShortCircuit MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTREnergyEVSEFaultStateEmergencyStop MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTREnergyEVSEFaultStateEVDisconnected MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTREnergyEVSEFaultStateWrongPowerSupply MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTREnergyEVSEFaultStateLiveNeutralSwap MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTREnergyEVSEFaultStateOverTemperature MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTREnergyEVSEFaultStateOther MTR_PROVISIONALLY_AVAILABLE = 0xFF, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRKeypadInputStatus) { - MTRKeypadInputStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRKeypadInputStatusUnsupportedKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRKeypadInputStatusInvalidKeyInCurrentState MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTREnergyEVSEState) { + MTREnergyEVSEStateNotPluggedIn MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEStatePluggedInNoDemand MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEStatePluggedInDemand MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEStatePluggedInCharging MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEStatePluggedInDischarging MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEStateSessionEnding MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEStateFault MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRKeypadInputFeature) { - MTRKeypadInputFeatureNavigationKeyCodes MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRKeypadInputFeatureLocationKeys MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRKeypadInputFeatureNumberKeys MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTREnergyEVSESupplyState) { + MTREnergyEVSESupplyStateDisabled MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSESupplyStateChargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSESupplyStateDischargingEnabled MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSESupplyStateDisabledError MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSESupplyStateDisabledDiagnostics MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSESupplyStateEnabled MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRContentLauncherCharacteristic) { - MTRContentLauncherCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRContentLauncherCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRContentLauncherCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRContentLauncherCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRContentLauncherCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRContentLauncherCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRContentLauncherCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRContentLauncherCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRContentLauncherCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRContentLauncherCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, - MTRContentLauncherCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, - MTRContentLauncherCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, - MTRContentLauncherCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, - MTRContentLauncherCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, - MTRContentLauncherCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRContentLauncherCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRContentLauncherCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRContentLauncherCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, +typedef NS_OPTIONS(uint32_t, MTREnergyEVSEFeature) { + MTREnergyEVSEFeatureChargingPreferences MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTREnergyEVSEFeatureSoCReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTREnergyEVSEFeaturePlugAndCharge MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTREnergyEVSEFeatureRFID MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTREnergyEVSEFeatureV2X MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRContentLauncherMetricType) { - MTRContentLauncherMetricTypePixels MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRContentLauncherMetricTypePIXELS MTR_DEPRECATED("Please use MTRContentLauncherMetricTypePixels", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRContentLauncherMetricTypePercentage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRContentLauncherMetricTypePERCENTAGE MTR_DEPRECATED("Please use MTRContentLauncherMetricTypePercentage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTREnergyEVSETargetDayOfWeekBitmap) { + MTREnergyEVSETargetDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTREnergyEVSETargetDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTREnergyEVSETargetDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTREnergyEVSETargetDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTREnergyEVSETargetDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTREnergyEVSETargetDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTREnergyEVSETargetDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRContentLauncherParameter) { - MTRContentLauncherParameterActor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRContentLauncherParameterChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRContentLauncherParameterCharacter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRContentLauncherParameterDirector MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRContentLauncherParameterEvent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRContentLauncherParameterFranchise MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTRContentLauncherParameterGenre MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRContentLauncherParameterLeague MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRContentLauncherParameterPopularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, - MTRContentLauncherParameterProvider MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, - MTRContentLauncherParameterSport MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, - MTRContentLauncherParameterSportsTeam MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, - MTRContentLauncherParameterType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, - MTRContentLauncherParameterVideo MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0D, - MTRContentLauncherParameterSeason MTR_PROVISIONALLY_AVAILABLE = 0x0E, - MTRContentLauncherParameterEpisode MTR_PROVISIONALLY_AVAILABLE = 0x0F, - MTRContentLauncherParameterAny MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTREnergyPreferenceEnergyPriority) { + MTREnergyPreferenceEnergyPriorityComfort MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyPreferenceEnergyPrioritySpeed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyPreferenceEnergyPriorityEfficiency MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyPreferenceEnergyPriorityWaterConsumption MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRContentLauncherStatus) { - MTRContentLauncherStatusSuccess MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, - MTRContentLauncherStatusURLNotAvailable MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, - MTRContentLauncherStatusAuthFailed MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, - MTRContentLauncherStatusTextTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRContentLauncherStatusAudioTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_OPTIONS(uint32_t, MTREnergyPreferenceFeature) { + MTREnergyPreferenceFeatureEnergyBalance MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTREnergyPreferenceFeatureLowPowerModeSensitivity MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRContentLauncherContentLaunchStatus) { - MTRContentLauncherContentLaunchStatusSuccess MTR_DEPRECATED("Please use MTRContentLauncherStatusSuccess", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, - MTRContentLauncherContentLaunchStatusUrlNotAvailable MTR_DEPRECATED("Please use MTRContentLauncherStatusURLNotAvailable", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, - MTRContentLauncherContentLaunchStatusAuthFailed MTR_DEPRECATED("Please use MTRContentLauncherStatusAuthFailed", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, -} MTR_DEPRECATED("Please use MTRContentLauncherStatus", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); +typedef NS_OPTIONS(uint32_t, MTRPowerTopologyFeature) { + MTRPowerTopologyFeatureNodeTopology MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRPowerTopologyFeatureTreeTopology MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRPowerTopologyFeatureSetTopology MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRPowerTopologyFeatureDynamicPowerFlow MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRContentLauncherFeature) { - MTRContentLauncherFeatureContentSearch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRContentLauncherFeatureURLPlayback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRContentLauncherFeatureAdvancedSeek MTR_PROVISIONALLY_AVAILABLE = 0x3, - MTRContentLauncherFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRContentLauncherFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x5, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint16_t, MTREnergyEVSEModeModeTag) { + MTREnergyEVSEModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTREnergyEVSEModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTREnergyEVSEModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTREnergyEVSEModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTREnergyEVSEModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTREnergyEVSEModeModeTagTimeOfUse MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTREnergyEVSEModeModeTagSolarCharging MTR_PROVISIONALLY_AVAILABLE = 0x4002, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedProtocolsBitmap) { - MTRContentLauncherSupportedProtocolsBitmapDASH MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, - MTRContentLauncherSupportedProtocolsBitmapHLS MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, -} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); +typedef NS_OPTIONS(uint32_t, MTREnergyEVSEModeFeature) { + MTREnergyEVSEModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedStreamingProtocol) { - MTRContentLauncherSupportedStreamingProtocolDASH MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmapDASH", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, - MTRContentLauncherSupportedStreamingProtocolHLS MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmapHLS", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2, -} MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); +typedef NS_ENUM(uint16_t, MTRWaterHeaterModeModeTag) { + MTRWaterHeaterModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWaterHeaterModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWaterHeaterModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWaterHeaterModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRWaterHeaterModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRWaterHeaterModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRWaterHeaterModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRWaterHeaterModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRWaterHeaterModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRWaterHeaterModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRWaterHeaterModeModeTagOff MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRWaterHeaterModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTRWaterHeaterModeModeTagTimed MTR_PROVISIONALLY_AVAILABLE = 0x4002, +} MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRAudioOutputOutputType) { - MTRAudioOutputOutputTypeHDMI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRAudioOutputOutputTypeHdmi MTR_DEPRECATED("Please use MTRAudioOutputOutputTypeHDMI", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRAudioOutputOutputTypeBT MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRAudioOutputOutputTypeBt MTR_DEPRECATED("Please use MTRAudioOutputOutputTypeBT", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRAudioOutputOutputTypeOptical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRAudioOutputOutputTypeHeadphone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRAudioOutputOutputTypeInternal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRAudioOutputOutputTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRWaterHeaterModeFeature) { + MTRWaterHeaterModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint16_t, MTRDeviceEnergyManagementModeModeTag) { + MTRDeviceEnergyManagementModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDeviceEnergyManagementModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDeviceEnergyManagementModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDeviceEnergyManagementModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDeviceEnergyManagementModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDeviceEnergyManagementModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRDeviceEnergyManagementModeModeTagNoOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4000, + MTRDeviceEnergyManagementModeModeTagDeviceOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4001, + MTRDeviceEnergyManagementModeModeTagLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4002, + MTRDeviceEnergyManagementModeModeTagGridOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4003, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint32_t, MTRDeviceEnergyManagementModeFeature) { + MTRDeviceEnergyManagementModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRDoorLockAlarmCode) { + MTRDoorLockAlarmCodeLockJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockAlarmCodeLockFactoryReset MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockAlarmCodeLockRadioPowerCycled MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockAlarmCodeWrongCodeEntryLimit MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRDoorLockAlarmCodeFrontEsceutcheonRemoved MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockAlarmCodeDoorForcedOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTRDoorLockAlarmCodeDoorAjar MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTRDoorLockAlarmCodeForcedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockDlAlarmCode) { + MTRDoorLockDlAlarmCodeLockJammed MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlAlarmCodeLockFactoryReset MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockFactoryReset", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlAlarmCodeLockRadioPowerCycled MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeLockRadioPowerCycled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlAlarmCodeWrongCodeEntryLimit MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeWrongCodeEntryLimit", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlAlarmCodeFrontEsceutcheonRemoved MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeFrontEsceutcheonRemoved", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockDlAlarmCodeDoorForcedOpen MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeDoorForcedOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRDoorLockDlAlarmCodeDoorAjar MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeDoorAjar", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRDoorLockDlAlarmCodeForcedUser MTR_DEPRECATED("Please use MTRDoorLockAlarmCodeForcedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, +} MTR_DEPRECATED("Please use MTRDoorLockAlarmCode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockCredentialRule) { + MTRDoorLockCredentialRuleSingle MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockCredentialRuleDual MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockCredentialRuleTri MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockDlCredentialRule) { + MTRDoorLockDlCredentialRuleSingle MTR_DEPRECATED("Please use MTRDoorLockCredentialRuleSingle", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlCredentialRuleTri MTR_DEPRECATED("Please use MTRDoorLockCredentialRuleTri", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_DEPRECATED("Please use MTRDoorLockCredentialRule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockCredentialType) { + MTRDoorLockCredentialTypeProgrammingPIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockCredentialTypePIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockCredentialTypeRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockCredentialTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockCredentialTypeFingerVein MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRDoorLockCredentialTypeFace MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockCredentialTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDoorLockCredentialTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDoorLockCredentialTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x08, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockDlCredentialType) { + MTRDoorLockDlCredentialTypeProgrammingPIN MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeProgrammingPIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlCredentialTypePIN MTR_DEPRECATED("Please use MTRDoorLockCredentialTypePIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlCredentialTypeRFID MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlCredentialTypeFingerprint MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFingerprint", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlCredentialTypeFingerVein MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFingerVein", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlCredentialTypeFace MTR_DEPRECATED("Please use MTRDoorLockCredentialTypeFace", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, +} MTR_DEPRECATED("Please use MTRDoorLockCredentialType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +typedef NS_ENUM(uint8_t, MTRDoorLockDataOperationType) { + MTRDoorLockDataOperationTypeAdd MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockDataOperationTypeClear MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockDataOperationTypeModify MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint32_t, MTRAudioOutputFeature) { - MTRAudioOutputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlDataOperationType) { + MTRDoorLockDlDataOperationTypeAdd MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeAdd", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlDataOperationTypeClear MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeClear", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlDataOperationTypeModify MTR_DEPRECATED("Please use MTRDoorLockDataOperationTypeModify", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_DEPRECATED("Please use MTRDoorLockDataOperationType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_ENUM(uint8_t, MTRApplicationLauncherStatus) { - MTRApplicationLauncherStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRApplicationLauncherStatusAppNotAvailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRApplicationLauncherStatusSystemBusy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRApplicationLauncherStatusPendingUserApproval MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRApplicationLauncherStatusDownloading MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRApplicationLauncherStatusInstalling MTR_PROVISIONALLY_AVAILABLE = 0x05, +typedef NS_ENUM(uint8_t, MTRDoorLockDlLockState) { + MTRDoorLockDlLockStateNotFullyLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRDoorLockDlLockStateLocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRDoorLockDlLockStateUnlocked MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRDoorLockDlLockStateUnlatched MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRApplicationLauncherFeature) { - MTRApplicationLauncherFeatureApplicationPlatform MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, +typedef NS_ENUM(uint8_t, MTRDoorLockDlLockType) { + MTRDoorLockDlLockTypeDeadBolt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRDoorLockDlLockTypeMagnetic MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRDoorLockDlLockTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRDoorLockDlLockTypeMortise MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRDoorLockDlLockTypeRim MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRDoorLockDlLockTypeLatchBolt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRDoorLockDlLockTypeCylindricalLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRDoorLockDlLockTypeTubularLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRDoorLockDlLockTypeInterconnectedLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRDoorLockDlLockTypeDeadLatch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRDoorLockDlLockTypeDoorFurniture MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRDoorLockDlLockTypeEurocylinder MTR_PROVISIONALLY_AVAILABLE = 0x0B, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_ENUM(uint8_t, MTRApplicationBasicApplicationStatus) { - MTRApplicationBasicApplicationStatusStopped MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRApplicationBasicApplicationStatusActiveVisibleFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRApplicationBasicApplicationStatusActiveHidden MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRApplicationBasicApplicationStatusActiveVisibleNotFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +typedef NS_ENUM(uint8_t, MTRDoorLockDlStatus) { + MTRDoorLockDlStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRDoorLockDlStatusFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRDoorLockDlStatusDuplicate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRDoorLockDlStatusOccupied MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRDoorLockDlStatusInvalidField MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x85, + MTRDoorLockDlStatusResourceExhausted MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x89, + MTRDoorLockDlStatusNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8B, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRContentControlFeature) { - MTRContentControlFeatureScreenTime MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRContentControlFeaturePINManagement MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRContentControlFeatureBlockUnrated MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRContentControlFeatureOnDemandContentRating MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRContentControlFeatureScheduledContentRating MTR_PROVISIONALLY_AVAILABLE = 0x10, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDoorLockOperationEventCode) { + MTRDoorLockOperationEventCodeUnknownOrMfgSpecific MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnknownOrMfgSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockOperationEventCodeLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockOperationEventCodeUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockOperationEventCodeLockInvalidPinOrId MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLockInvalidPinOrId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockOperationEventCodeLockInvalidSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeLockInvalidSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockOperationEventCodeUnlockInvalidPinOrId MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlockInvalidPinOrId", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockOperationEventCodeUnlockInvalidSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeUnlockInvalidSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRDoorLockOperationEventCodeOneTouchLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeOneTouchLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRDoorLockOperationEventCodeKeyLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeKeyLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, + MTRDoorLockOperationEventCodeKeyUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeKeyUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, + MTRDoorLockOperationEventCodeAutoLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeAutoLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, + MTRDoorLockOperationEventCodeScheduleLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeScheduleLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0B, + MTRDoorLockOperationEventCodeScheduleUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeScheduleUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0C, + MTRDoorLockOperationEventCodeManualLock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeManualLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0D, + MTRDoorLockOperationEventCodeManualUnlock MTR_DEPRECATED("Please use MTRDoorLockOperationEventCodeManualUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0E, +} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) { - MTRContentAppObserverStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRContentAppObserverStatusUnexpectedData MTR_PROVISIONALLY_AVAILABLE = 0x01, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDoorLockProgrammingEventCode) { + MTRDoorLockProgrammingEventCodeUnknownOrMfgSpecific MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeUnknownOrMfgSpecific", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockProgrammingEventCodeMasterCodeChanged MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeMasterCodeChanged", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockProgrammingEventCodePinAdded MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinAdded", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockProgrammingEventCodePinDeleted MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinDeleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockProgrammingEventCodePinChanged MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodePinChanged", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockProgrammingEventCodeIdAdded MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeIdAdded", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockProgrammingEventCodeIdDeleted MTR_DEPRECATED("Please use MTRDoorLockProgrammingEventCodeIdDeleted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, +} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint32_t, MTRCommissionerControlSupportedDeviceCategoryBitmap) { - MTRCommissionerControlSupportedDeviceCategoryBitmapFabricSynchronization MTR_PROVISIONALLY_AVAILABLE = 0x1, -} MTR_PROVISIONALLY_AVAILABLE; +typedef NS_ENUM(uint8_t, MTRDoorLockSetPinOrIdStatus) { + MTRDoorLockSetPinOrIdStatusSuccess MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusSuccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockSetPinOrIdStatusGeneralFailure MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusGeneralFailure", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockSetPinOrIdStatusMemoryFull MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusMemoryFull", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockSetPinOrIdStatusDuplicateCodeError MTR_DEPRECATED("Please use MTRDoorLockSetPinOrIdStatusDuplicateCodeError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("This enum is unused and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_ENUM(uint8_t, MTRUnitTestingSimple) { - MTRUnitTestingSimpleUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRUnitTestingSimpleValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRUnitTestingSimpleValueB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRUnitTestingSimpleValueC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, +typedef NS_ENUM(uint8_t, MTRDoorLockDoorState) { + MTRDoorLockDoorStateDoorOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockDoorStateDoorClosed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockDoorStateDoorJammed MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockDoorStateDoorForcedOpen MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockDoorStateDoorUnspecifiedError MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRDoorLockDoorStateDoorAjar MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_ENUM(uint8_t, MTRTestClusterSimple) { - MTRTestClusterSimpleUnspecified MTR_DEPRECATED("Please use MTRUnitTestingSimpleUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRTestClusterSimpleValueA MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRTestClusterSimpleValueB MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, - MTRTestClusterSimpleValueC MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, -} MTR_DEPRECATED("Please use MTRUnitTestingSimple", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlDoorState) { + MTRDoorLockDlDoorStateDoorOpen MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlDoorStateDoorClosed MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorClosed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlDoorStateDoorJammed MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorJammed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlDoorStateDoorForcedOpen MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorForcedOpen", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlDoorStateDoorUnspecifiedError MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorUnspecifiedError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlDoorStateDoorAjar MTR_DEPRECATED("Please use MTRDoorLockDoorStateDoorAjar", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, +} MTR_DEPRECATED("Please use MTRDoorLockDoorState", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint16_t, MTRUnitTestingBitmap16MaskMap) { - MTRUnitTestingBitmap16MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRUnitTestingBitmap16MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRUnitTestingBitmap16MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, - MTRUnitTestingBitmap16MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4000, +typedef NS_ENUM(uint8_t, MTRDoorLockLockDataType) { + MTRDoorLockLockDataTypeUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockLockDataTypeProgrammingCode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockLockDataTypeUserIndex MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockLockDataTypeWeekDaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockLockDataTypeYearDaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRDoorLockLockDataTypeHolidaySchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockLockDataTypePIN MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTRDoorLockLockDataTypeRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTRDoorLockLockDataTypeFingerprint MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTRDoorLockLockDataTypeFingerVein MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x09, + MTRDoorLockLockDataTypeFace MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x0A, + MTRDoorLockLockDataTypeAliroCredentialIssuerKey MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRDoorLockLockDataTypeAliroEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRDoorLockLockDataTypeAliroNonEvictableEndpointKey MTR_PROVISIONALLY_AVAILABLE = 0x0D, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint16_t, MTRTestClusterBitmap16MaskMap) { - MTRTestClusterBitmap16MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRTestClusterBitmap16MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRTestClusterBitmap16MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRTestClusterBitmap16MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4000, -} MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlLockDataType) { + MTRDoorLockDlLockDataTypeUnspecified MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlLockDataTypeProgrammingCode MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeProgrammingCode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlLockDataTypeUserIndex MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeUserIndex", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlLockDataTypeWeekDaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeWeekDaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlLockDataTypeYearDaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeYearDaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlLockDataTypeHolidaySchedule MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeHolidaySchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockDlLockDataTypePIN MTR_DEPRECATED("Please use MTRDoorLockLockDataTypePIN", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRDoorLockDlLockDataTypeRFID MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRDoorLockDlLockDataTypeFingerprint MTR_DEPRECATED("Please use MTRDoorLockLockDataTypeFingerprint", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, +} MTR_DEPRECATED("Please use MTRDoorLockLockDataType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint32_t, MTRUnitTestingBitmap32MaskMap) { - MTRUnitTestingBitmap32MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRUnitTestingBitmap32MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRUnitTestingBitmap32MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, - MTRUnitTestingBitmap32MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40000000, +typedef NS_ENUM(uint8_t, MTRDoorLockLockOperationType) { + MTRDoorLockLockOperationTypeLock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockLockOperationTypeUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockLockOperationTypeNonAccessUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockLockOperationTypeForcedUserEvent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockLockOperationTypeUnlatch MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint32_t, MTRTestClusterBitmap32MaskMap) { - MTRTestClusterBitmap32MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRTestClusterBitmap32MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRTestClusterBitmap32MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRTestClusterBitmap32MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40000000, -} MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlLockOperationType) { + MTRDoorLockDlLockOperationTypeLock MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeLock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlLockOperationTypeUnlock MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlLockOperationTypeNonAccessUserEvent MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeNonAccessUserEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlLockOperationTypeForcedUserEvent MTR_DEPRECATED("Please use MTRDoorLockLockOperationTypeForcedUserEvent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTRDoorLockLockOperationType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint64_t, MTRUnitTestingBitmap64MaskMap) { - MTRUnitTestingBitmap64MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRUnitTestingBitmap64MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRUnitTestingBitmap64MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, - MTRUnitTestingBitmap64MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4000000000000000, +typedef NS_ENUM(uint8_t, MTRDoorLockOperatingMode) { + MTRDoorLockOperatingModeNormal MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockOperatingModeVacation MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockOperatingModePrivacy MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockOperatingModeNoRemoteLockUnlock MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockOperatingModePassage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint64_t, MTRTestClusterBitmap64MaskMap) { - MTRTestClusterBitmap64MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRTestClusterBitmap64MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRTestClusterBitmap64MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRTestClusterBitmap64MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4000000000000000, -} MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlOperatingMode) { + MTRDoorLockDlOperatingModeNormal MTR_DEPRECATED("Please use MTRDoorLockOperatingModeNormal", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlOperatingModeVacation MTR_DEPRECATED("Please use MTRDoorLockOperatingModeVacation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlOperatingModePrivacy MTR_DEPRECATED("Please use MTRDoorLockOperatingModePrivacy", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlOperatingModeNoRemoteLockUnlock MTR_DEPRECATED("Please use MTRDoorLockOperatingModeNoRemoteLockUnlock", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlOperatingModePassage MTR_DEPRECATED("Please use MTRDoorLockOperatingModePassage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, +} MTR_DEPRECATED("Please use MTRDoorLockOperatingMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint8_t, MTRUnitTestingBitmap8MaskMap) { - MTRUnitTestingBitmap8MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRUnitTestingBitmap8MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRUnitTestingBitmap8MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, - MTRUnitTestingBitmap8MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40, +typedef NS_ENUM(uint8_t, MTRDoorLockOperationError) { + MTRDoorLockOperationErrorUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockOperationErrorInvalidCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockOperationErrorDisabledUserDenied MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockOperationErrorRestricted MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockOperationErrorInsufficientBattery MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint8_t, MTRTestClusterBitmap8MaskMap) { - MTRTestClusterBitmap8MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRTestClusterBitmap8MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRTestClusterBitmap8MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, - MTRTestClusterBitmap8MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40, -} MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlOperationError) { + MTRDoorLockDlOperationErrorUnspecified MTR_DEPRECATED("Please use MTRDoorLockOperationErrorUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlOperationErrorInvalidCredential MTR_DEPRECATED("Please use MTRDoorLockOperationErrorInvalidCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlOperationErrorDisabledUserDenied MTR_DEPRECATED("Please use MTRDoorLockOperationErrorDisabledUserDenied", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlOperationErrorRestricted MTR_DEPRECATED("Please use MTRDoorLockOperationErrorRestricted", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlOperationErrorInsufficientBattery MTR_DEPRECATED("Please use MTRDoorLockOperationErrorInsufficientBattery", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, +} MTR_DEPRECATED("Please use MTRDoorLockOperationError", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -typedef NS_OPTIONS(uint8_t, MTRUnitTestingSimpleBitmap) { - MTRUnitTestingSimpleBitmapValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRUnitTestingSimpleBitmapValueB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRUnitTestingSimpleBitmapValueC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, +typedef NS_ENUM(uint8_t, MTRDoorLockOperationSource) { + MTRDoorLockOperationSourceUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockOperationSourceManual MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRDoorLockOperationSourceProprietaryRemote MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRDoorLockOperationSourceKeypad MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockOperationSourceAuto MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRDoorLockOperationSourceButton MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockOperationSourceSchedule MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTRDoorLockOperationSourceRemote MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTRDoorLockOperationSourceRFID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTRDoorLockOperationSourceBiometric MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTRDoorLockOperationSourceAliro MTR_PROVISIONALLY_AVAILABLE = 0x0A, } MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { - MTRTestClusterSimpleBitmapValueA MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRTestClusterSimpleBitmapValueB MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, - MTRTestClusterSimpleBitmapValueC MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, -} MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlOperationSource) { + MTRDoorLockDlOperationSourceUnspecified MTR_DEPRECATED("Please use MTRDoorLockOperationSourceUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlOperationSourceManual MTR_DEPRECATED("Please use MTRDoorLockOperationSourceManual", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlOperationSourceProprietaryRemote MTR_DEPRECATED("Please use MTRDoorLockOperationSourceProprietaryRemote", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlOperationSourceKeypad MTR_DEPRECATED("Please use MTRDoorLockOperationSourceKeypad", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlOperationSourceAuto MTR_DEPRECATED("Please use MTRDoorLockOperationSourceAuto", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlOperationSourceButton MTR_DEPRECATED("Please use MTRDoorLockOperationSourceButton", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockDlOperationSourceSchedule MTR_DEPRECATED("Please use MTRDoorLockOperationSourceSchedule", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRDoorLockDlOperationSourceRemote MTR_DEPRECATED("Please use MTRDoorLockOperationSourceRemote", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRDoorLockDlOperationSourceRFID MTR_DEPRECATED("Please use MTRDoorLockOperationSourceRFID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, + MTRDoorLockDlOperationSourceBiometric MTR_DEPRECATED("Please use MTRDoorLockOperationSourceBiometric", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, +} MTR_DEPRECATED("Please use MTRDoorLockOperationSource", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterIdentify (Deprecated) +typedef NS_ENUM(uint8_t, MTRDoorLockUserStatus) { + MTRDoorLockUserStatusAvailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRDoorLockUserStatusOccupiedEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRDoorLockUserStatusOccupiedDisabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRDoorLockUserStatusNotSupported MTR_DEPRECATED("This value is not part of the specification and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlUserStatus) { + MTRDoorLockDlUserStatusAvailable MTR_DEPRECATED("Please use MTRDoorLockUserStatusAvailable", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlUserStatusOccupiedEnabled MTR_DEPRECATED("Please use MTRDoorLockUserStatusOccupiedEnabled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlUserStatusOccupiedDisabled MTR_DEPRECATED("Please use MTRDoorLockUserStatusOccupiedDisabled", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTRDoorLockUserStatus", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use identifyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use triggerEffectWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockUserType) { + MTRDoorLockUserTypeUnrestrictedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRDoorLockUserTypeUnrestricted MTR_DEPRECATED("Please use MTRDoorLockUserTypeUnrestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockUserTypeYearDayScheduleUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRDoorLockUserTypeWeekDayScheduleUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRDoorLockUserTypeProgrammingUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, + MTRDoorLockUserTypeMasterUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeProgrammingUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockUserTypeNonAccessUser MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRDoorLockUserTypeForcedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRDoorLockUserTypeDisposableUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x06, + MTRDoorLockUserTypeExpiringUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x07, + MTRDoorLockUserTypeScheduleRestrictedUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTRDoorLockUserTypeRemoteOnlyUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTRDoorLockUserTypeNotSupported MTR_DEPRECATED("This value is not part of the specification and will be removed", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIdentifyTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRDoorLockDlUserType) { + MTRDoorLockDlUserTypeUnrestrictedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeUnrestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRDoorLockDlUserTypeYearDayScheduleUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeYearDayScheduleUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRDoorLockDlUserTypeWeekDayScheduleUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeWeekDayScheduleUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRDoorLockDlUserTypeProgrammingUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeProgrammingUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, + MTRDoorLockDlUserTypeNonAccessUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeNonAccessUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRDoorLockDlUserTypeForcedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeForcedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRDoorLockDlUserTypeDisposableUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeDisposableUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x06, + MTRDoorLockDlUserTypeExpiringUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeExpiringUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x07, + MTRDoorLockDlUserTypeScheduleRestrictedUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeScheduleRestrictedUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x08, + MTRDoorLockDlUserTypeRemoteOnlyUser MTR_DEPRECATED("Please use MTRDoorLockUserTypeRemoteOnlyUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, +} MTR_DEPRECATED("Please use MTRDoorLockUserType", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIdentifyTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRDoorLockDaysMaskMap) { + MTRDoorLockDaysMaskMapSunday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRDoorLockDaysMaskMapMonday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRDoorLockDaysMaskMapTuesday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, + MTRDoorLockDaysMaskMapWednesday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, + MTRDoorLockDaysMaskMapThursday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x10, + MTRDoorLockDaysMaskMapFriday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, + MTRDoorLockDaysMaskMapSaturday MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRDoorLockDlDaysMaskMap) { + MTRDoorLockDlDaysMaskMapSunday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapSunday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRDoorLockDlDaysMaskMapMonday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapMonday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRDoorLockDlDaysMaskMapTuesday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapTuesday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, + MTRDoorLockDlDaysMaskMapWednesday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapWednesday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, + MTRDoorLockDlDaysMaskMapThursday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapThursday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x10, + MTRDoorLockDlDaysMaskMapFriday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapFriday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, + MTRDoorLockDlDaysMaskMapSaturday MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMapSaturday", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40, +} MTR_DEPRECATED("Please use MTRDoorLockDaysMaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRDoorLockDlCredentialRuleMask) { + MTRDoorLockDlCredentialRuleMaskSingle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlCredentialRuleMaskDual MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlCredentialRuleMaskTri MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRDoorLockDlCredentialRulesSupport) { + MTRDoorLockDlCredentialRulesSupportSingle MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlCredentialRulesSupportDual MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlCredentialRulesSupportTri MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlDefaultConfigurationRegister) { + MTRDoorLockDlDefaultConfigurationRegisterEnableLocalProgrammingEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlDefaultConfigurationRegisterKeypadInterfaceDefaultAccessEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlDefaultConfigurationRegisterRemoteInterfaceDefaultAccessIsEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlDefaultConfigurationRegisterSoundEnabled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlDefaultConfigurationRegisterAutoRelockTimeSet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRDoorLockDlDefaultConfigurationRegisterLEDSettingsSet MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlKeypadOperationEventMask) { + MTRDoorLockDlKeypadOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlKeypadOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlKeypadOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlKeypadOperationEventMaskLockInvalidPIN MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlKeypadOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDlKeypadOperationEventMaskUnlockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlKeypadOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRDoorLockDlKeypadOperationEventMaskNonAccessUserOpEvent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlKeypadProgrammingEventMask) { + MTRDoorLockDlKeypadProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlKeypadProgrammingEventMaskProgrammingPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlKeypadProgrammingEventMaskPINAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlKeypadProgrammingEventMaskPINCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlKeypadProgrammingEventMaskPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@interface MTRBaseClusterGroups (Deprecated) +typedef NS_OPTIONS(uint8_t, MTRDoorLockDlLocalProgrammingFeatures) { + MTRDoorLockDlLocalProgrammingFeaturesAddUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlLocalProgrammingFeaturesModifyUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlLocalProgrammingFeaturesClearUsersCredentialsSchedulesLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlLocalProgrammingFeaturesAdjustLockSettingsLocally MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlManualOperationEventMask) { + MTRDoorLockDlManualOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlManualOperationEventMaskThumbturnLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlManualOperationEventMaskThumbturnUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlManualOperationEventMaskOneTouchLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlManualOperationEventMaskKeyLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDlManualOperationEventMaskKeyUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlManualOperationEventMaskAutoLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRDoorLockDlManualOperationEventMaskScheduleLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, + MTRDoorLockDlManualOperationEventMaskScheduleUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, + MTRDoorLockDlManualOperationEventMaskManualLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, + MTRDoorLockDlManualOperationEventMaskManualUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use addGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use viewGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getGroupMembershipWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use removeGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use removeAllGroupsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeAllGroupsWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use removeAllGroupsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use addGroupIfIdentifyingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRFIDOperationEventMask) { + MTRDoorLockDlRFIDOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlRFIDOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlRFIDOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlRFIDOperationEventMaskLockInvalidRFID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlRFIDOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDlRFIDOperationEventMaskUnlockInvalidRFID MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlRFIDOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeNameSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNameSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRFIDProgrammingEventMask) { + MTRDoorLockDlRFIDProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlRFIDProgrammingEventMaskRFIDCodeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlRFIDProgrammingEventMaskRFIDCodeCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRemoteOperationEventMask) { + MTRDoorLockDlRemoteOperationEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlRemoteOperationEventMaskLock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlRemoteOperationEventMaskUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlRemoteOperationEventMaskLockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlRemoteOperationEventMaskLockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDlRemoteOperationEventMaskUnlockInvalidCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlRemoteOperationEventMaskUnlockInvalidSchedule MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlRemoteProgrammingEventMask) { + MTRDoorLockDlRemoteProgrammingEventMaskUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlRemoteProgrammingEventMaskProgrammingPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlRemoteProgrammingEventMaskPINAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlRemoteProgrammingEventMaskPINCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlRemoteProgrammingEventMaskPINChanged MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDlRemoteProgrammingEventMaskRFIDCodeAdded MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDlRemoteProgrammingEventMaskRFIDCodeCleared MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRDoorLockDlSupportedOperatingModes) { + MTRDoorLockDlSupportedOperatingModesNormal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDlSupportedOperatingModesVacation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDlSupportedOperatingModesPrivacy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDlSupportedOperatingModesNoRemoteLockUnlock MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDlSupportedOperatingModesPassage MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRDoorLockDayOfWeek) { + MTRDoorLockDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRDoorLockDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRDoorLockDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRDoorLockDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRDoorLockFeature) { + MTRDoorLockFeaturePINCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRDoorLockFeaturePINCredentials MTR_DEPRECATED("Please use MTRDoorLockFeaturePINCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRDoorLockFeatureRFIDCredential MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRDoorLockFeatureRFIDCredentials MTR_DEPRECATED("Please use MTRDoorLockFeatureRFIDCredential", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRDoorLockFeatureFingerCredentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRDoorLockFeatureLogging MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRDoorLockFeatureWeekDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x10, + MTRDoorLockFeatureWeekDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureWeekDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x10, + MTRDoorLockFeatureDoorPositionSensor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRDoorLockFeatureFaceCredentials MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRDoorLockFeatureCredentialsOverTheAirAccess MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x80, + MTRDoorLockFeatureCredentialsOTA MTR_DEPRECATED("Please use MTRDoorLockFeatureCredentialsOverTheAirAccess", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, + MTRDoorLockFeatureUser MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x100, + MTRDoorLockFeatureUsersManagement MTR_DEPRECATED("Please use MTRDoorLockFeatureUser", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x100, + MTRDoorLockFeatureNotification MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x200, + MTRDoorLockFeatureNotifications MTR_DEPRECATED("Please use MTRDoorLockFeatureNotification", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x200, + MTRDoorLockFeatureYearDayAccessSchedules MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x400, + MTRDoorLockFeatureYearDaySchedules MTR_DEPRECATED("Please use MTRDoorLockFeatureYearDayAccessSchedules", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x400, + MTRDoorLockFeatureHolidaySchedules MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, + MTRDoorLockFeatureUnbolt MTR_PROVISIONALLY_AVAILABLE = 0x1000, + MTRDoorLockFeatureAliroProvisioning MTR_PROVISIONALLY_AVAILABLE = 0x2000, + MTRDoorLockFeatureAliroBLEUWB MTR_PROVISIONALLY_AVAILABLE = 0x4000, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end +typedef NS_ENUM(uint8_t, MTRWindowCoveringEndProductType) { + MTRWindowCoveringEndProductTypeRollerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRWindowCoveringEndProductTypeRomanShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRWindowCoveringEndProductTypeBalloonShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRWindowCoveringEndProductTypeWovenWood MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRWindowCoveringEndProductTypePleatedShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRWindowCoveringEndProductTypeCellularShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRWindowCoveringEndProductTypeLayeredShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRWindowCoveringEndProductTypeLayeredShade2D MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRWindowCoveringEndProductTypeSheerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRWindowCoveringEndProductTypeTiltOnlyInteriorBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRWindowCoveringEndProductTypeInteriorBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRWindowCoveringEndProductTypeVerticalBlindStripCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRWindowCoveringEndProductTypeInteriorVenetianBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, + MTRWindowCoveringEndProductTypeExteriorVenetianBlind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0D, + MTRWindowCoveringEndProductTypeLateralLeftCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0E, + MTRWindowCoveringEndProductTypeLateralRightCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0F, + MTRWindowCoveringEndProductTypeCentralCurtain MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRWindowCoveringEndProductTypeRollerShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x11, + MTRWindowCoveringEndProductTypeExteriorVerticalScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x12, + MTRWindowCoveringEndProductTypeAwningTerracePatio MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x13, + MTRWindowCoveringEndProductTypeAwningVerticalScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x14, + MTRWindowCoveringEndProductTypeTiltOnlyPergola MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x15, + MTRWindowCoveringEndProductTypeSwingingShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x16, + MTRWindowCoveringEndProductTypeSlidingShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x17, + MTRWindowCoveringEndProductTypeUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@interface MTRBaseClusterOnOff (Deprecated) +typedef NS_ENUM(uint8_t, MTRWindowCoveringType) { + MTRWindowCoveringTypeRollerShade MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRWindowCoveringTypeRollerShade2Motor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRWindowCoveringTypeRollerShadeExterior MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRWindowCoveringTypeRollerShadeExterior2Motor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRWindowCoveringTypeDrapery MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRWindowCoveringTypeAwning MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRWindowCoveringTypeShutter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRWindowCoveringTypeTiltBlindTiltOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRWindowCoveringTypeTiltBlindLiftAndTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRWindowCoveringTypeProjectorScreen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRWindowCoveringTypeUnknown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xFF, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRWindowCoveringConfigStatus) { + MTRWindowCoveringConfigStatusOperational MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRWindowCoveringConfigStatusOnlineReserved MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRWindowCoveringConfigStatusLiftMovementReversed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRWindowCoveringConfigStatusLiftPositionAware MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRWindowCoveringConfigStatusTiltPositionAware MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRWindowCoveringConfigStatusLiftEncoderControlled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRWindowCoveringConfigStatusTiltEncoderControlled MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use offWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)offWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use offWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use onWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)onWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use onWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use toggleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use toggleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use offWithEffectWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use onWithRecallGlobalSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use onWithRecallGlobalSceneWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use onWithTimedOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRWindowCoveringFeature) { + MTRWindowCoveringFeatureLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRWindowCoveringFeatureTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRWindowCoveringFeaturePositionAwareLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRWindowCoveringFeatureAbsolutePosition MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRWindowCoveringFeaturePositionAwareTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnOffWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRWindowCoveringMode) { + MTRWindowCoveringModeMotorDirectionReversed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRWindowCoveringModeCalibrationMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRWindowCoveringModeMaintenanceMode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRWindowCoveringModeLedFeedback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGlobalSceneControlWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGlobalSceneControlWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGlobalSceneControlWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRWindowCoveringOperationalStatus) { + MTRWindowCoveringOperationalStatusGlobal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x3, + MTRWindowCoveringOperationalStatusLift MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0xC, + MTRWindowCoveringOperationalStatusTilt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x30, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRWindowCoveringSafetyStatus) { + MTRWindowCoveringSafetyStatusRemoteLockout MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRWindowCoveringSafetyStatusTamperDetection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRWindowCoveringSafetyStatusFailedCommunication MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRWindowCoveringSafetyStatusPositionFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRWindowCoveringSafetyStatusThermalProtection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRWindowCoveringSafetyStatusObstacleDetected MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRWindowCoveringSafetyStatusPower MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, + MTRWindowCoveringSafetyStatusStopInput MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, + MTRWindowCoveringSafetyStatusMotorJammed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x100, + MTRWindowCoveringSafetyStatusHardwareFailure MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x200, + MTRWindowCoveringSafetyStatusManualOperation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x400, + MTRWindowCoveringSafetyStatusProtection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x800, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffWaitTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOffWaitTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffWaitTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRServiceAreaOperationalStatus) { + MTRServiceAreaOperationalStatusPending MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRServiceAreaOperationalStatusOperating MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRServiceAreaOperationalStatusSkipped MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRServiceAreaOperationalStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpOnOffWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpOnOffWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpOnOffWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRServiceAreaSelectAreasStatus) { + MTRServiceAreaSelectAreasStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRServiceAreaSelectAreasStatusUnsupportedArea MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRServiceAreaSelectAreasStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRServiceAreaSelectAreasStatusInvalidSet MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRServiceAreaSkipAreaStatus) { + MTRServiceAreaSkipAreaStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRServiceAreaSkipAreaStatusInvalidAreaList MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRServiceAreaSkipAreaStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRServiceAreaSkipAreaStatusInvalidSkippedArea MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRServiceAreaFeature) { + MTRServiceAreaFeatureSelectWhileRunning MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRServiceAreaFeatureProgressReporting MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRServiceAreaFeatureMaps MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlControlMode) { + MTRPumpConfigurationAndControlControlModeConstantSpeed MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPumpConfigurationAndControlControlModeConstantPressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRPumpConfigurationAndControlControlModeProportionalPressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRPumpConfigurationAndControlControlModeConstantFlow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, + MTRPumpConfigurationAndControlControlModeConstantTemperature MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x05, + MTRPumpConfigurationAndControlControlModeAutomatic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x07, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlPumpControlMode) { + MTRPumpConfigurationAndControlPumpControlModeConstantSpeed MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantSpeed", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRPumpConfigurationAndControlPumpControlModeConstantPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantPressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, + MTRPumpConfigurationAndControlPumpControlModeProportionalPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeProportionalPressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, + MTRPumpConfigurationAndControlPumpControlModeConstantFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantFlow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, + MTRPumpConfigurationAndControlPumpControlModeConstantTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeConstantTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x05, + MTRPumpConfigurationAndControlPumpControlModeAutomatic MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlModeAutomatic", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x07, +} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlControlMode", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlOperationMode) { + MTRPumpConfigurationAndControlOperationModeNormal MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTRPumpConfigurationAndControlOperationModeMinimum MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTRPumpConfigurationAndControlOperationModeMaximum MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTRPumpConfigurationAndControlOperationModeLocal MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -@end +typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlPumpOperationMode) { + MTRPumpConfigurationAndControlPumpOperationModeNormal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeNormal", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x00, + MTRPumpConfigurationAndControlPumpOperationModeMinimum MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeMinimum", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x01, + MTRPumpConfigurationAndControlPumpOperationModeMaximum MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeMaximum", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x02, + MTRPumpConfigurationAndControlPumpOperationModeLocal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationModeLocal", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x03, +} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlOperationMode", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -@interface MTRBaseClusterOnOffSwitchConfiguration (Deprecated) +typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlFeature) { + MTRPumpConfigurationAndControlFeatureConstantPressure MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRPumpConfigurationAndControlFeatureCompensatedPressure MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRPumpConfigurationAndControlFeatureConstantFlow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, + MTRPumpConfigurationAndControlFeatureConstantSpeed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x8, + MTRPumpConfigurationAndControlFeatureConstantTemperature MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x10, + MTRPumpConfigurationAndControlFeatureAutomatic MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x20, + MTRPumpConfigurationAndControlFeatureLocalOperation MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPumpConfigurationAndControlPumpFeature) { + MTRPumpConfigurationAndControlPumpFeatureConstantPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantPressure", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x1, + MTRPumpConfigurationAndControlPumpFeatureCompensatedPressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureCompensatedPressure", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x2, + MTRPumpConfigurationAndControlPumpFeatureConstantFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantFlow", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x4, + MTRPumpConfigurationAndControlPumpFeatureConstantSpeed MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantSpeed", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x8, + MTRPumpConfigurationAndControlPumpFeatureConstantTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureConstantTemperature", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x10, + MTRPumpConfigurationAndControlPumpFeatureAutomatic MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureAutomatic", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x20, + MTRPumpConfigurationAndControlPumpFeatureLocalOperation MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.5, 17.0), macos(13.4, 14.0), watchos(9.5, 10.0), tvos(16.5, 17.0)) = 0x40, + MTRPumpConfigurationAndControlPumpFeatureLocal MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeatureLocalOperation", ios(16.4, 16.5), macos(13.3, 13.4), watchos(9.4, 9.5), tvos(16.4, 16.5)) = 0x40, +} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlFeature", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)); -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSwitchTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatusBitmap) { + MTRPumpConfigurationAndControlPumpStatusBitmapDeviceFault MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, + MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, + MTRPumpConfigurationAndControlPumpStatusBitmapSupplyfault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault", ios(16.5, 17.4), macos(13.4, 14.4), watchos(9.5, 10.4), tvos(16.5, 17.4)) = 0x2, + MTRPumpConfigurationAndControlPumpStatusBitmapSpeedLow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4, + MTRPumpConfigurationAndControlPumpStatusBitmapSpeedHigh MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x8, + MTRPumpConfigurationAndControlPumpStatusBitmapLocalOverride MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x10, + MTRPumpConfigurationAndControlPumpStatusBitmapRunning MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x20, + MTRPumpConfigurationAndControlPumpStatusBitmapRemotePressure MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x40, + MTRPumpConfigurationAndControlPumpStatusBitmapRemoteFlow MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x80, + MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x100, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchActionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSwitchActionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSwitchActionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSwitchActionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { + MTRPumpConfigurationAndControlPumpStatusDeviceFault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapDeviceFault", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x1, + MTRPumpConfigurationAndControlPumpStatusSupplyfault MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSupplyFault", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x2, + MTRPumpConfigurationAndControlPumpStatusSpeedLow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSpeedLow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x4, + MTRPumpConfigurationAndControlPumpStatusSpeedHigh MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapSpeedHigh", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x8, + MTRPumpConfigurationAndControlPumpStatusLocalOverride MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapLocalOverride", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x10, + MTRPumpConfigurationAndControlPumpStatusRunning MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRunning", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x20, + MTRPumpConfigurationAndControlPumpStatusRemotePressure MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemotePressure", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x40, + MTRPumpConfigurationAndControlPumpStatusRemoteFlow MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteFlow", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x80, + MTRPumpConfigurationAndControlPumpStatusRemoteTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x100, +} MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmap", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatACCapacityFormat) { + MTRThermostatACCapacityFormatBTUh MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatACCompressorType) { + MTRThermostatACCompressorTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACCompressorTypeT1 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACCompressorTypeT2 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACCompressorTypeT3 MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatACLouverPosition) { + MTRThermostatACLouverPositionClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACLouverPositionOpen MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACLouverPositionQuarter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACLouverPositionHalf MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatACLouverPositionThreeQuarters MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatACRefrigerantType) { + MTRThermostatACRefrigerantTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACRefrigerantTypeR22 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACRefrigerantTypeR410a MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACRefrigerantTypeR407c MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatACType) { + MTRThermostatACTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACTypeCoolingFixed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACTypeHeatPumpFixed MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACTypeCoolingInverter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACTypeHeatPumpInverter MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; -@end +typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { + MTRThermostatControlSequenceOfOperationCoolingOnly MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTRThermostatControlSequenceOfOperationHeatingOnly MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, + MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, + MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -@interface MTRBaseClusterLevelControl (Deprecated) +typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { + MTRThermostatControlSequenceCoolingOnly MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingOnly", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, + MTRThermostatControlSequenceCoolingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, + MTRThermostatControlSequenceHeatingOnly MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingOnly", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, + MTRThermostatControlSequenceHeatingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x03, + MTRThermostatControlSequenceCoolingAndHeating MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeating", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x04, + MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x05, +} MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatPresetScenario) { + MTRThermostatPresetScenarioOccupied MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatPresetScenarioUnoccupied MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatPresetScenarioSleep MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatPresetScenarioWake MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatPresetScenarioVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatPresetScenarioGoingToSleep MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRThermostatPresetScenarioUserDefined MTR_PROVISIONALLY_AVAILABLE = 0xFE, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToLevelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToLevelWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToClosestFrequencyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { + MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSetpointChangeSourceExternal MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { + MTRThermostatSetpointRaiseLowerModeHeat MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRThermostatSetpointRaiseLowerModeCool MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTRThermostatSetpointRaiseLowerModeBoth MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { + MTRThermostatSetpointAdjustModeHeat MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x00, + MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRThermostatSetpointAdjustModeCool MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x01, + MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRThermostatSetpointAdjustModeBoth MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x02, + MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerMode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { + MTRThermostatStartOfWeekSunday MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatStartOfWeekMonday MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatStartOfWeekTuesday MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatStartOfWeekWednesday MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatStartOfWeekThursday MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatStartOfWeekFriday MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatStartOfWeekSaturday MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { + MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatSystemModeAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRThermostatSystemModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatSystemModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRThermostatSystemModeEmergencyHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRThermostatSystemModeEmergencyHeating MTR_DEPRECATED("Please use MTRThermostatSystemModeEmergencyHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRThermostatSystemModePrecooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRThermostatSystemModeFanOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRThermostatSystemModeDry MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + MTRThermostatSystemModeSleep MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { + MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatTemperatureSetpointHoldSetpointHoldOn MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { + MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { + MTRThermostatACErrorCodeBitmapCompressorFail MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatACErrorCodeBitmapRoomSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatACErrorCodeBitmapOutdoorSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatACErrorCodeBitmapCoilSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { + MTRThermostatFeatureHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRThermostatFeatureCooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRThermostatFeatureOccupancy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRThermostatFeatureScheduleConfiguration MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, + MTRThermostatFeatureSchedule MTR_DEPRECATED("Please use MTRThermostatFeatureScheduleConfiguration", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, + MTRThermostatFeatureSetback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, + MTRThermostatFeatureAutoMode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, + MTRThermostatFeatureAutomode MTR_DEPRECATED("Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, + MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, + MTRThermostatFeatureMatterScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRThermostatFeaturePresets MTR_PROVISIONALLY_AVAILABLE = 0x100, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnOffTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { + MTRThermostatHVACSystemTypeBitmapCoolingStage MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRThermostatHVACSystemTypeBitmapHeatingStage MTR_PROVISIONALLY_AVAILABLE = 0xC, + MTRThermostatHVACSystemTypeBitmapHeatingIsHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatOccupancyBitmap) { + MTRThermostatOccupancyBitmapOccupied MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRThermostatPresetTypeFeaturesBitmap) { + MTRThermostatPresetTypeFeaturesBitmapAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatPresetTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOffTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { + MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatProgrammingOperationModeBitmapEconomy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultMoveRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultMoveRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultMoveRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRThermostatRelayStateBitmap) { + MTRThermostatRelayStateBitmapHeat MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRelayStateBitmapCool MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRelayStateBitmapFan MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatRelayStateBitmapHeatStage2 MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatRelayStateBitmapCoolStage2 MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatRelayStateBitmapFanStage2 MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRThermostatRelayStateBitmapFanStage3 MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpCurrentLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { + MTRThermostatRemoteSensingBitmapLocalTemperature MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRemoteSensingBitmapOutdoorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRemoteSensingBitmapOccupancy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { + MTRThermostatScheduleDayOfWeekBitmapSunday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, + MTRThermostatScheduleDayOfWeekBitmapMonday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, + MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4, + MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x8, + MTRThermostatScheduleDayOfWeekBitmapThursday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x10, + MTRThermostatScheduleDayOfWeekBitmapFriday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x20, + MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, + MTRThermostatScheduleDayOfWeekBitmapAway MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x80, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { + MTRThermostatDayOfWeekSunday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSunday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, + MTRThermostatDayOfWeekMonday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapMonday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2, + MTRThermostatDayOfWeekTuesday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapTuesday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4, + MTRThermostatDayOfWeekWednesday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapWednesday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x8, + MTRThermostatDayOfWeekThursday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapThursday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x10, + MTRThermostatDayOfWeekFriday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapFriday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x20, + MTRThermostatDayOfWeekSaturday MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSaturday", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x40, + MTRThermostatDayOfWeekAway MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x80, + MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +} MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { + MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, + MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { + MTRThermostatModeForSequenceHeatSetpointPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x1, + MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRThermostatModeForSequenceCoolSetpointPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.4, 17.4), macos(13.3, 14.4), watchos(9.4, 10.4), tvos(16.4, 17.4)) = 0x2, + MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, +} MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRThermostatScheduleTypeFeaturesBitmap) { + MTRThermostatScheduleTypeFeaturesBitmapSupportsPresets MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatScheduleTypeFeaturesBitmapSupportsSetpoints MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatScheduleTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatScheduleTypeFeaturesBitmapSupportsOff MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; -@end +typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { + MTRFanControlAirflowDirectionForward MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRFanControlAirflowDirectionReverse MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -@interface MTRBaseClusterBinaryInputBasic (Deprecated) +typedef NS_ENUM(uint8_t, MTRFanControlFanMode) { + MTRFanControlFanModeOff MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRFanControlFanModeLow MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRFanControlFanModeMedium MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRFanControlFanModeHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRFanControlFanModeOn MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x04, + MTRFanControlFanModeAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x05, + MTRFanControlFanModeSmart MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x06, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFanControlFanModeType) { + MTRFanControlFanModeTypeOff MTR_DEPRECATED("Please use MTRFanControlFanModeOff", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x00, + MTRFanControlFanModeTypeLow MTR_DEPRECATED("Please use MTRFanControlFanModeLow", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, + MTRFanControlFanModeTypeMedium MTR_DEPRECATED("Please use MTRFanControlFanModeMedium", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, + MTRFanControlFanModeTypeHigh MTR_DEPRECATED("Please use MTRFanControlFanModeHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x03, + MTRFanControlFanModeTypeOn MTR_DEPRECATED("Please use MTRFanControlFanModeOn", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x04, + MTRFanControlFanModeTypeAuto MTR_DEPRECATED("Please use MTRFanControlFanModeAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x05, + MTRFanControlFanModeTypeSmart MTR_DEPRECATED("Please use MTRFanControlFanModeSmart", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x06, +} MTR_DEPRECATED("Please use MTRFanControlFanMode", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeActiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveTextWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveTextWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequence) { + MTRFanControlFanModeSequenceOffLowMedHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x00, + MTRFanControlFanModeSequenceOffLowHigh MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x01, + MTRFanControlFanModeSequenceOffLowMedHighAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x02, + MTRFanControlFanModeSequenceOffLowHighAuto MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x03, + MTRFanControlFanModeSequenceOffHighAuto MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, + MTRFanControlFanModeSequenceOffOnAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHighAuto", ios(17.0, 17.4), macos(14.0, 14.4), watchos(10.0, 10.4), tvos(17.0, 17.4)) = 0x04, + MTRFanControlFanModeSequenceOffHigh MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, + MTRFanControlFanModeSequenceOffOn MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHigh", ios(17.0, 17.4), macos(14.0, 14.4), watchos(10.0, 10.4), tvos(17.0, 17.4)) = 0x05, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDescriptionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDescriptionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequenceType) { + MTRFanControlFanModeSequenceTypeOffLowMedHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x00, + MTRFanControlFanModeSequenceTypeOffLowHigh MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x01, + MTRFanControlFanModeSequenceTypeOffLowMedHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowMedHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x02, + MTRFanControlFanModeSequenceTypeOffLowHighAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffLowHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x03, + MTRFanControlFanModeSequenceTypeOffOnAuto MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHighAuto", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x04, + MTRFanControlFanModeSequenceTypeOffOn MTR_DEPRECATED("Please use MTRFanControlFanModeSequenceOffHigh", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x05, +} MTR_DEPRECATED("Please use MTRFanControlFanModeSequence", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInactiveTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInactiveTextWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInactiveTextWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInactiveTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInactiveTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFanControlStepDirection) { + MTRFanControlStepDirectionIncrease MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRFanControlStepDirectionDecrease MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutOfServiceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOutOfServiceWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutOfServiceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutOfServiceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRFanControlFeature) { + MTRFanControlFeatureMultiSpeed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRFanControlFeatureAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRFanControlFeatureRocking MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRFanControlFeatureWind MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRFanControlFeatureStep MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRFanControlFeatureAirflowDirection MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributePolarityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePolarityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePolarityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePolarityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRFanControlRockBitmap) { + MTRFanControlRockBitmapRockLeftRight MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRFanControlRockBitmapRockUpDown MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, + MTRFanControlRockBitmapRockRound MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x4, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributePresentValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePresentValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePresentValueWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePresentValueWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePresentValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePresentValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRFanControlRockSupportMask) { + MTRFanControlRockSupportMaskRockLeftRight MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockLeftRight", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, + MTRFanControlRockSupportMaskRockUpDown MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockUpDown", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x2, + MTRFanControlRockSupportMaskRockRound MTR_DEPRECATED("Please use MTRFanControlRockBitmapRockRound", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x4, +} MTR_DEPRECATED("Please use MTRFanControlRockBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeReliabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReliabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeReliabilityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeReliabilityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReliabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReliabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRFanControlWindBitmap) { + MTRFanControlWindBitmapSleepWind MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, + MTRFanControlWindBitmapNaturalWind MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x2, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusFlagsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusFlagsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusFlagsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRFanControlWindSupportMask) { + MTRFanControlWindSupportMaskSleepWind MTR_DEPRECATED("Please use MTRFanControlWindBitmapSleepWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x1, + MTRFanControlWindSupportMaskNaturalWind MTR_DEPRECATED("Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) = 0x2, +} MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationKeypadLockout) { + MTRThermostatUserInterfaceConfigurationKeypadLockoutNoLockout MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout1 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout2 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout3 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout4 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, + MTRThermostatUserInterfaceConfigurationKeypadLockoutLockout5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibility) { + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingPermitted MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityScheduleProgrammingDenied MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRThermostatUserInterfaceConfigurationTemperatureDisplayMode) { + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeCelsius MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRThermostatUserInterfaceConfigurationTemperatureDisplayModeFahrenheit MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlColorLoopAction) { + MTRColorControlColorLoopActionDeactivate MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRColorControlColorLoopActionActivateFromColorLoopStartEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRColorControlColorLoopActionActivateFromEnhancedCurrentHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlColorLoopDirection) { + MTRColorControlColorLoopDirectionDecrement MTR_NEWLY_AVAILABLE = 0x00, + MTRColorControlColorLoopDirectionDecrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorLoopDirectionDecrement") + = 0x00, + MTRColorControlColorLoopDirectionIncrement MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlColorLoopDirectionIncrementHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorLoopDirectionIncrement") + = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlColorMode) { + MTRColorControlColorModeCurrentHueAndCurrentSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRColorControlColorModeCurrentXAndCurrentY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRColorControlColorModeColorTemperatureMireds MTR_NEWLY_AVAILABLE = 0x02, + MTRColorControlColorModeColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorModeColorTemperatureMireds") + = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end +typedef NS_ENUM(uint8_t, MTRColorControlDirection) { + MTRColorControlDirectionShortest MTR_NEWLY_AVAILABLE = 0x00, + MTRColorControlDirectionLongest MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlDirectionUp MTR_NEWLY_AVAILABLE = 0x02, + MTRColorControlDirectionDown MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; -@interface MTRBaseClusterDescriptor (Deprecated) +typedef NS_ENUM(uint8_t, MTRColorControlHueDirection) { + MTRColorControlHueDirectionShortestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionShortest") + = 0x00, + MTRColorControlHueDirectionLongestDistance MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionLongest") + = 0x01, + MTRColorControlHueDirectionUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionUp") + = 0x02, + MTRColorControlHueDirectionDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirectionDown") + = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlDirection"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlDriftCompensation) { + MTRColorControlDriftCompensationNone MTR_NEWLY_AVAILABLE = 0x00, + MTRColorControlDriftCompensationOtherOrUnknown MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlDriftCompensationTemperatureMonitoring MTR_NEWLY_AVAILABLE = 0x02, + MTRColorControlDriftCompensationOpticalLuminanceMonitoringAndFeedback MTR_NEWLY_AVAILABLE = 0x03, + MTRColorControlDriftCompensationOpticalColorMonitoringAndFeedback MTR_NEWLY_AVAILABLE = 0x04, +} MTR_NEWLY_AVAILABLE; -- (void)readAttributeDeviceListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDeviceTypeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDeviceTypeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDeviceTypeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlEnhancedColorMode) { + MTRColorControlEnhancedColorModeCurrentHueAndCurrentSaturation MTR_NEWLY_AVAILABLE = 0x00, + MTRColorControlEnhancedColorModeCurrentXAndCurrentY MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlEnhancedColorModeColorTemperatureMireds MTR_NEWLY_AVAILABLE = 0x02, + MTRColorControlEnhancedColorModeEnhancedCurrentHueAndCurrentSaturation MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; -- (void)readAttributeServerListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeServerListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeServerListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeServerListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlMoveMode) { + MTRColorControlMoveModeStop MTR_NEWLY_AVAILABLE = 0x00, + MTRColorControlMoveModeUp MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlMoveModeDown MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; -- (void)readAttributeClientListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClientListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClientListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClientListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlHueMoveMode) { + MTRColorControlHueMoveModeStop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeStop") + = 0x00, + MTRColorControlHueMoveModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeUp") + = 0x01, + MTRColorControlHueMoveModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveModeDown") + = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlMoveMode"); -- (void)readAttributePartsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartsListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartsListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartsListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlStepMode) { + MTRColorControlStepModeUp MTR_NEWLY_AVAILABLE = 0x01, + MTRColorControlStepModeDown MTR_NEWLY_AVAILABLE = 0x03, +} MTR_NEWLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRColorControlHueStepMode) { + MTRColorControlHueStepModeUp MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeUp") + = 0x01, + MTRColorControlHueStepModeDown MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepModeDown") + = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlStepMode"); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilitiesBitmap) { + MTRColorControlColorCapabilitiesBitmapHueSaturation MTR_NEWLY_AVAILABLE = 0x1, + MTRColorControlColorCapabilitiesBitmapEnhancedHue MTR_NEWLY_AVAILABLE = 0x2, + MTRColorControlColorCapabilitiesBitmapColorLoop MTR_NEWLY_AVAILABLE = 0x4, + MTRColorControlColorCapabilitiesBitmapXY MTR_NEWLY_AVAILABLE = 0x8, + MTRColorControlColorCapabilitiesBitmapColorTemperature MTR_NEWLY_AVAILABLE = 0x10, +} MTR_NEWLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRColorControlColorCapabilities) { + MTRColorControlColorCapabilitiesHueSaturationSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapHueSaturation") + = 0x1, + MTRColorControlColorCapabilitiesEnhancedHueSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapEnhancedHue") + = 0x2, + MTRColorControlColorCapabilitiesColorLoopSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapColorLoop") + = 0x4, + MTRColorControlColorCapabilitiesXYAttributesSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapXY") + = 0x8, + MTRColorControlColorCapabilitiesColorTemperatureSupported MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmapColorTemperature") + = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlColorCapabilitiesBitmap"); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRColorControlFeature) { + MTRColorControlFeatureHueAndSaturation MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRColorControlFeatureEnhancedHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRColorControlFeatureColorLoop MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, + MTRColorControlFeatureXY MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRColorControlFeatureColorTemperature MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRColorControlOptionsBitmap) { + MTRColorControlOptionsBitmapExecuteIfOff MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; -@end +typedef NS_OPTIONS(uint8_t, MTRColorControlUpdateFlagsBitmap) { + MTRColorControlUpdateFlagsBitmapUpdateAction MTR_NEWLY_AVAILABLE = 0x1, + MTRColorControlUpdateFlagsBitmapUpdateDirection MTR_NEWLY_AVAILABLE = 0x2, + MTRColorControlUpdateFlagsBitmapUpdateTime MTR_NEWLY_AVAILABLE = 0x4, + MTRColorControlUpdateFlagsBitmapUpdateStartHue MTR_NEWLY_AVAILABLE = 0x8, +} MTR_NEWLY_AVAILABLE; -@interface MTRBaseClusterBinding (Deprecated) +typedef NS_OPTIONS(uint8_t, MTRColorControlColorLoopUpdateFlags) { + MTRColorControlColorLoopUpdateFlagsUpdateAction MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateAction") + = 0x1, + MTRColorControlColorLoopUpdateFlagsUpdateDirection MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateDirection") + = 0x2, + MTRColorControlColorLoopUpdateFlagsUpdateTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateTime") + = 0x4, + MTRColorControlColorLoopUpdateFlagsUpdateStartHue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmapUpdateStartHue") + = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRColorControlUpdateFlagsBitmap"); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRBallastConfigurationBallastStatusBitmap) { + MTRBallastConfigurationBallastStatusBitmapBallastNonOperational MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRBallastConfigurationBallastStatusBitmapLampFailure MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBindingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBindingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBindingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBindingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBindingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRBallastConfigurationLampAlarmModeBitmap) { + MTRBallastConfigurationLampAlarmModeBitmapLampBurnHours MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRIlluminanceMeasurementLightSensorType) { + MTRIlluminanceMeasurementLightSensorTypePhotodiode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRIlluminanceMeasurementLightSensorTypeCMOS MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementFeature) { + MTRPressureMeasurementFeatureExtended MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x1, +} MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPressureMeasurementPressureFeature) { + MTRPressureMeasurementPressureFeatureExtended MTR_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended", ios(16.4, 17.0), macos(13.3, 14.0), watchos(9.4, 10.0), tvos(16.4, 17.0)) = 0x1, + MTRPressureMeasurementPressureFeatureEXT MTR_DEPRECATED("Please use MTRPressureMeasurementFeatureExtended", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, +} MTR_DEPRECATED("Please use MTRPressureMeasurementFeature", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTROccupancySensingOccupancySensorType) { + MTROccupancySensingOccupancySensorTypePIR MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x00, + MTROccupancySensingOccupancySensorTypeUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x01, + MTROccupancySensingOccupancySensorTypePIRAndUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x02, + MTROccupancySensingOccupancySensorTypePhysicalContact MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x03, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTROccupancySensingFeature) { + MTROccupancySensingFeatureOther MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTROccupancySensingFeaturePassiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTROccupancySensingFeatureUltrasonic MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTROccupancySensingFeaturePhysicalContact MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTROccupancySensingFeatureActiveInfrared MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTROccupancySensingFeatureRadar MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTROccupancySensingFeatureRFSensing MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTROccupancySensingFeatureVision MTR_PROVISIONALLY_AVAILABLE = 0x80, +} MTR_PROVISIONALLY_AVAILABLE; -@end +typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancyBitmap) { + MTROccupancySensingOccupancyBitmapOccupied MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -@interface MTRBaseClusterAccessControl (Deprecated) +typedef NS_OPTIONS(uint8_t, MTROccupancySensingOccupancySensorTypeBitmap) { + MTROccupancySensingOccupancySensorTypeBitmapPIR MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x1, + MTROccupancySensingOccupancySensorTypeBitmapUltrasonic MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x2, + MTROccupancySensingOccupancySensorTypeBitmapPhysicalContact MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)) = 0x4, +} MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementLevelValue) { + MTRCarbonMonoxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonMonoxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonMonoxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRCarbonMonoxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRCarbonMonoxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementMedium) { + MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonMonoxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtensionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExtensionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExtensionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExtensionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtensionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonMonoxideConcentrationMeasurementMeasurementUnit) { + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRCarbonMonoxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSubjectsPerAccessControlEntryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRCarbonMonoxideConcentrationMeasurementFeature) { + MTRCarbonMonoxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRCarbonMonoxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRCarbonMonoxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRCarbonMonoxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRCarbonMonoxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRCarbonMonoxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetsPerAccessControlEntryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementLevelValue) { + MTRCarbonDioxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonDioxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonDioxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRCarbonDioxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRCarbonDioxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAccessControlEntriesPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementMedium) { + MTRCarbonDioxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonDioxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonDioxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRCarbonDioxideConcentrationMeasurementMeasurementUnit) { + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRCarbonDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRCarbonDioxideConcentrationMeasurementFeature) { + MTRCarbonDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRCarbonDioxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRCarbonDioxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRCarbonDioxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRCarbonDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRCarbonDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementLevelValue) { + MTRNitrogenDioxideConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRNitrogenDioxideConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRNitrogenDioxideConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRNitrogenDioxideConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRNitrogenDioxideConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementMedium) { + MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRNitrogenDioxideConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRNitrogenDioxideConcentrationMeasurementMeasurementUnit) { + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRNitrogenDioxideConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -@end +typedef NS_OPTIONS(uint32_t, MTRNitrogenDioxideConcentrationMeasurementFeature) { + MTRNitrogenDioxideConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRNitrogenDioxideConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRNitrogenDioxideConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRNitrogenDioxideConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRNitrogenDioxideConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRNitrogenDioxideConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -@interface MTRBaseClusterActions (Deprecated) +typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementLevelValue) { + MTROzoneConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTROzoneConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTROzoneConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTROzoneConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTROzoneConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementMedium) { + MTROzoneConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTROzoneConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTROzoneConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use instantActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use instantActionWithTransitionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use startActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use startActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use pauseActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use pauseActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resumeActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enableActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enableActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use disableActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use disableActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTROzoneConcentrationMeasurementMeasurementUnit) { + MTROzoneConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTROzoneConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTROzoneConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTROzoneConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTROzoneConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTROzoneConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTROzoneConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTROzoneConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeActionListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActionListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActionListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActionListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTROzoneConcentrationMeasurementFeature) { + MTROzoneConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTROzoneConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTROzoneConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTROzoneConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTROzoneConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTROzoneConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndpointListsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEndpointListsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndpointListsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementLevelValue) { + MTRPM25ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM25ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM25ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM25ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM25ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeSetupURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetupURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetupURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetupURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementMedium) { + MTRPM25ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM25ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM25ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM25ConcentrationMeasurementMeasurementUnit) { + MTRPM25ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM25ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM25ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM25ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM25ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRPM25ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRPM25ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRPM25ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPM25ConcentrationMeasurementFeature) { + MTRPM25ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRPM25ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRPM25ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRPM25ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRPM25ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRPM25ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementLevelValue) { + MTRFormaldehydeConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRFormaldehydeConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRFormaldehydeConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRFormaldehydeConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRFormaldehydeConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementMedium) { + MTRFormaldehydeConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRFormaldehydeConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRFormaldehydeConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRFormaldehydeConcentrationMeasurementMeasurementUnit) { + MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRFormaldehydeConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -@end +typedef NS_OPTIONS(uint32_t, MTRFormaldehydeConcentrationMeasurementFeature) { + MTRFormaldehydeConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRFormaldehydeConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRFormaldehydeConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRFormaldehydeConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRFormaldehydeConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRFormaldehydeConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -@interface MTRBaseClusterBasic (Deprecated) +typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementLevelValue) { + MTRPM1ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM1ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM1ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM1ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM1ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementMedium) { + MTRPM1ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM1ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM1ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use mfgSpecificPingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use mfgSpecificPingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM1ConcentrationMeasurementMeasurementUnit) { + MTRPM1ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM1ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM1ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM1ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM1ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRPM1ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRPM1ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRPM1ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataModelRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDataModelRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataModelRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPM1ConcentrationMeasurementFeature) { + MTRPM1ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRPM1ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRPM1ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRPM1ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRPM1ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRPM1ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementLevelValue) { + MTRPM10ConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM10ConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM10ConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM10ConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM10ConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementMedium) { + MTRPM10ConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM10ConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM10ConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRPM10ConcentrationMeasurementMeasurementUnit) { + MTRPM10ConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRPM10ConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRPM10ConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRPM10ConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRPM10ConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRPM10ConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRPM10ConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRPM10ConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRPM10ConcentrationMeasurementFeature) { + MTRPM10ConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRPM10ConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRPM10ConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRPM10ConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRPM10ConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRPM10ConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue) { + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeLocationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium) { + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit) { + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeature) { + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementLevelValue) { + MTRRadonConcentrationMeasurementLevelValueUnknown MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRRadonConcentrationMeasurementLevelValueLow MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRRadonConcentrationMeasurementLevelValueMedium MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRRadonConcentrationMeasurementLevelValueHigh MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRRadonConcentrationMeasurementLevelValueCritical MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementMedium) { + MTRRadonConcentrationMeasurementMeasurementMediumAir MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRRadonConcentrationMeasurementMeasurementMediumWater MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRRadonConcentrationMeasurementMeasurementMediumSoil MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRRadonConcentrationMeasurementMeasurementUnit) { + MTRRadonConcentrationMeasurementMeasurementUnitPPM MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00, + MTRRadonConcentrationMeasurementMeasurementUnitPPB MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x01, + MTRRadonConcentrationMeasurementMeasurementUnitPPT MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x02, + MTRRadonConcentrationMeasurementMeasurementUnitMGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x03, + MTRRadonConcentrationMeasurementMeasurementUnitUGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x04, + MTRRadonConcentrationMeasurementMeasurementUnitNGM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x05, + MTRRadonConcentrationMeasurementMeasurementUnitPM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x06, + MTRRadonConcentrationMeasurementMeasurementUnitBQM3 MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x07, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRRadonConcentrationMeasurementFeature) { + MTRRadonConcentrationMeasurementFeatureNumericMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x1, + MTRRadonConcentrationMeasurementFeatureLevelIndication MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x2, + MTRRadonConcentrationMeasurementFeatureMediumLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x4, + MTRRadonConcentrationMeasurementFeatureCriticalLevel MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x8, + MTRRadonConcentrationMeasurementFeaturePeakMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x10, + MTRRadonConcentrationMeasurementFeatureAverageMeasurement MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x20, +} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); -- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRThreadBorderRouterManagementFeature) { + MTRThreadBorderRouterManagementFeaturePANChange MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRChannelType) { + MTRChannelTypeSatellite MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRChannelTypeCable MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRChannelTypeTerrestrial MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRChannelTypeOTT MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRChannelLineupInfoType) { + MTRChannelLineupInfoTypeMSO MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRChannelLineupInfoTypeMso MTR_DEPRECATED("Please use MTRChannelLineupInfoTypeMSO", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalConfigDisabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalConfigDisabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalConfigDisabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRChannelStatus) { + MTRChannelStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRChannelStatusMultipleMatches MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRChannelStatusNoMatches MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRChannelFeature) { + MTRChannelFeatureChannelList MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRChannelFeatureLineupInfo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRChannelFeatureElectronicGuide MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRChannelFeatureRecordProgram MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRChannelRecordingFlagBitmap) { + MTRChannelRecordingFlagBitmapScheduled MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRChannelRecordingFlagBitmapRecordSeries MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRChannelRecordingFlagBitmapRecorded MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapabilityMinimaWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCapabilityMinimaWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapabilityMinimaWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRTargetNavigatorStatus) { + MTRTargetNavigatorStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRTargetNavigatorStatusTargetNotFound MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRTargetNavigatorStatusNotAllowed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRMediaPlaybackCharacteristic) { + MTRMediaPlaybackCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMediaPlaybackCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMediaPlaybackCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMediaPlaybackCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRMediaPlaybackCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRMediaPlaybackCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRMediaPlaybackCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRMediaPlaybackCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRMediaPlaybackCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRMediaPlaybackCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRMediaPlaybackCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRMediaPlaybackCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRMediaPlaybackCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRMediaPlaybackCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRMediaPlaybackCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRMediaPlaybackCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRMediaPlaybackCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRMediaPlaybackCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRMediaPlaybackPlaybackState) { + MTRMediaPlaybackPlaybackStatePlaying MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRMediaPlaybackPlaybackStatePaused MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRMediaPlaybackPlaybackStateNotPlaying MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRMediaPlaybackPlaybackStateBuffering MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRMediaPlaybackStatus) { + MTRMediaPlaybackStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRMediaPlaybackStatusInvalidStateForCommand MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRMediaPlaybackStatusNotAllowed MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRMediaPlaybackStatusNotActive MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRMediaPlaybackStatusSpeedOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRMediaPlaybackStatusSeekOutOfRange MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRMediaPlaybackFeature) { + MTRMediaPlaybackFeatureAdvancedSeek MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x1, + MTRMediaPlaybackFeatureVariableSpeed MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)) = 0x2, + MTRMediaPlaybackFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRMediaPlaybackFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRMediaPlaybackFeatureAudioAdvance MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRMediaInputInputType) { + MTRMediaInputInputTypeInternal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRMediaInputInputTypeAux MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRMediaInputInputTypeCoax MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRMediaInputInputTypeComposite MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRMediaInputInputTypeHDMI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x04, + MTRMediaInputInputTypeHdmi MTR_DEPRECATED("Please use MTRMediaInputInputTypeHDMI", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x04, + MTRMediaInputInputTypeInput MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRMediaInputInputTypeLine MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRMediaInputInputTypeOptical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRMediaInputInputTypeVideo MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRMediaInputInputTypeSCART MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, + MTRMediaInputInputTypeScart MTR_DEPRECATED("Please use MTRMediaInputInputTypeSCART", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x09, + MTRMediaInputInputTypeUSB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0A, + MTRMediaInputInputTypeUsb MTR_DEPRECATED("Please use MTRMediaInputInputTypeUSB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0A, + MTRMediaInputInputTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@end +typedef NS_OPTIONS(uint32_t, MTRMediaInputFeature) { + MTRMediaInputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@interface MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) +typedef NS_ENUM(uint8_t, MTRKeypadInputCECKeyCode) { + MTRKeypadInputCECKeyCodeSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRKeypadInputCECKeyCodeUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTRKeypadInputCECKeyCodeDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTRKeypadInputCECKeyCodeLeft MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x03, + MTRKeypadInputCECKeyCodeRight MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x04, + MTRKeypadInputCECKeyCodeRightUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x05, + MTRKeypadInputCECKeyCodeRightDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x06, + MTRKeypadInputCECKeyCodeLeftUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x07, + MTRKeypadInputCECKeyCodeLeftDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x08, + MTRKeypadInputCECKeyCodeRootMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x09, + MTRKeypadInputCECKeyCodeSetupMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0A, + MTRKeypadInputCECKeyCodeContentsMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0B, + MTRKeypadInputCECKeyCodeFavoriteMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0C, + MTRKeypadInputCECKeyCodeExit MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x0D, + MTRKeypadInputCECKeyCodeMediaTopMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x10, + MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x11, + MTRKeypadInputCECKeyCodeNumberEntryMode MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1D, + MTRKeypadInputCECKeyCodeNumber11 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1E, + MTRKeypadInputCECKeyCodeNumber12 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1F, + MTRKeypadInputCECKeyCodeNumber0OrNumber10 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x20, + MTRKeypadInputCECKeyCodeNumbers1 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x21, + MTRKeypadInputCECKeyCodeNumbers2 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x22, + MTRKeypadInputCECKeyCodeNumbers3 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x23, + MTRKeypadInputCECKeyCodeNumbers4 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x24, + MTRKeypadInputCECKeyCodeNumbers5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x25, + MTRKeypadInputCECKeyCodeNumbers6 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x26, + MTRKeypadInputCECKeyCodeNumbers7 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x27, + MTRKeypadInputCECKeyCodeNumbers8 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x28, + MTRKeypadInputCECKeyCodeNumbers9 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x29, + MTRKeypadInputCECKeyCodeDot MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2A, + MTRKeypadInputCECKeyCodeEnter MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2B, + MTRKeypadInputCECKeyCodeClear MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2C, + MTRKeypadInputCECKeyCodeNextFavorite MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2F, + MTRKeypadInputCECKeyCodeChannelUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x30, + MTRKeypadInputCECKeyCodeChannelDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x31, + MTRKeypadInputCECKeyCodePreviousChannel MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x32, + MTRKeypadInputCECKeyCodeSoundSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x33, + MTRKeypadInputCECKeyCodeInputSelect MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x34, + MTRKeypadInputCECKeyCodeDisplayInformation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x35, + MTRKeypadInputCECKeyCodeHelp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x36, + MTRKeypadInputCECKeyCodePageUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x37, + MTRKeypadInputCECKeyCodePageDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x38, + MTRKeypadInputCECKeyCodePower MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, + MTRKeypadInputCECKeyCodeVolumeUp MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, + MTRKeypadInputCECKeyCodeVolumeDown MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, + MTRKeypadInputCECKeyCodeMute MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x43, + MTRKeypadInputCECKeyCodePlay MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x44, + MTRKeypadInputCECKeyCodeStop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x45, + MTRKeypadInputCECKeyCodePause MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x46, + MTRKeypadInputCECKeyCodeRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x47, + MTRKeypadInputCECKeyCodeRewind MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x48, + MTRKeypadInputCECKeyCodeFastForward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x49, + MTRKeypadInputCECKeyCodeEject MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4A, + MTRKeypadInputCECKeyCodeForward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4B, + MTRKeypadInputCECKeyCodeBackward MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4C, + MTRKeypadInputCECKeyCodeStopRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4D, + MTRKeypadInputCECKeyCodePauseRecord MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4E, + MTRKeypadInputCECKeyCodeReserved MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4F, + MTRKeypadInputCECKeyCodeAngle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x50, + MTRKeypadInputCECKeyCodeSubPicture MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x51, + MTRKeypadInputCECKeyCodeVideoOnDemand MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x52, + MTRKeypadInputCECKeyCodeElectronicProgramGuide MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x53, + MTRKeypadInputCECKeyCodeTimerProgramming MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x54, + MTRKeypadInputCECKeyCodeInitialConfiguration MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x55, + MTRKeypadInputCECKeyCodeSelectBroadcastType MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x56, + MTRKeypadInputCECKeyCodeSelectSoundPresentation MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x57, + MTRKeypadInputCECKeyCodePlayFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x60, + MTRKeypadInputCECKeyCodePausePlayFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x61, + MTRKeypadInputCECKeyCodeRecordFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x62, + MTRKeypadInputCECKeyCodePauseRecordFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x63, + MTRKeypadInputCECKeyCodeStopFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x64, + MTRKeypadInputCECKeyCodeMuteFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x65, + MTRKeypadInputCECKeyCodeRestoreVolumeFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x66, + MTRKeypadInputCECKeyCodeTuneFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x67, + MTRKeypadInputCECKeyCodeSelectMediaFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x68, + MTRKeypadInputCECKeyCodeSelectAvInputFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x69, + MTRKeypadInputCECKeyCodeSelectAudioInputFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6A, + MTRKeypadInputCECKeyCodePowerToggleFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6B, + MTRKeypadInputCECKeyCodePowerOffFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6C, + MTRKeypadInputCECKeyCodePowerOnFunction MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x6D, + MTRKeypadInputCECKeyCodeF1Blue MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x71, + MTRKeypadInputCECKeyCodeF2Red MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x72, + MTRKeypadInputCECKeyCodeF3Green MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x73, + MTRKeypadInputCECKeyCodeF4Yellow MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x74, + MTRKeypadInputCECKeyCodeF5 MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x75, + MTRKeypadInputCECKeyCodeData MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x76, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRKeypadInputCecKeyCode) { + MTRKeypadInputCecKeyCodeSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, + MTRKeypadInputCecKeyCodeUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, + MTRKeypadInputCecKeyCodeDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, + MTRKeypadInputCecKeyCodeLeft MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeft", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x03, + MTRKeypadInputCecKeyCodeRight MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRight", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x04, + MTRKeypadInputCecKeyCodeRightUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x05, + MTRKeypadInputCecKeyCodeRightDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRightDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x06, + MTRKeypadInputCecKeyCodeLeftUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x07, + MTRKeypadInputCecKeyCodeLeftDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeLeftDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x08, + MTRKeypadInputCecKeyCodeRootMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRootMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x09, + MTRKeypadInputCecKeyCodeSetupMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSetupMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0A, + MTRKeypadInputCecKeyCodeContentsMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeContentsMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0B, + MTRKeypadInputCecKeyCodeFavoriteMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFavoriteMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0C, + MTRKeypadInputCecKeyCodeExit MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeExit", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x0D, + MTRKeypadInputCecKeyCodeMediaTopMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaTopMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x10, + MTRKeypadInputCecKeyCodeMediaContextSensitiveMenu MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMediaContextSensitiveMenu", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x11, + MTRKeypadInputCecKeyCodeNumberEntryMode MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumberEntryMode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1D, + MTRKeypadInputCecKeyCodeNumber11 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber11", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1E, + MTRKeypadInputCecKeyCodeNumber12 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber12", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1F, + MTRKeypadInputCecKeyCodeNumber0OrNumber10 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumber0OrNumber10", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x20, + MTRKeypadInputCecKeyCodeNumbers1 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers1", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x21, + MTRKeypadInputCecKeyCodeNumbers2 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers2", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x22, + MTRKeypadInputCecKeyCodeNumbers3 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers3", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x23, + MTRKeypadInputCecKeyCodeNumbers4 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers4", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x24, + MTRKeypadInputCecKeyCodeNumbers5 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers5", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x25, + MTRKeypadInputCecKeyCodeNumbers6 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers6", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x26, + MTRKeypadInputCecKeyCodeNumbers7 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers7", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x27, + MTRKeypadInputCecKeyCodeNumbers8 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers8", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x28, + MTRKeypadInputCecKeyCodeNumbers9 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNumbers9", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x29, + MTRKeypadInputCecKeyCodeDot MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDot", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2A, + MTRKeypadInputCecKeyCodeEnter MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEnter", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2B, + MTRKeypadInputCecKeyCodeClear MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeClear", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2C, + MTRKeypadInputCecKeyCodeNextFavorite MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeNextFavorite", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2F, + MTRKeypadInputCecKeyCodeChannelUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x30, + MTRKeypadInputCecKeyCodeChannelDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeChannelDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x31, + MTRKeypadInputCecKeyCodePreviousChannel MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePreviousChannel", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x32, + MTRKeypadInputCecKeyCodeSoundSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSoundSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x33, + MTRKeypadInputCecKeyCodeInputSelect MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInputSelect", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x34, + MTRKeypadInputCecKeyCodeDisplayInformation MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeDisplayInformation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x35, + MTRKeypadInputCecKeyCodeHelp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeHelp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x36, + MTRKeypadInputCecKeyCodePageUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x37, + MTRKeypadInputCecKeyCodePageDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePageDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x38, + MTRKeypadInputCecKeyCodePower MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePower", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x40, + MTRKeypadInputCecKeyCodeVolumeUp MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeUp", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x41, + MTRKeypadInputCecKeyCodeVolumeDown MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVolumeDown", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x42, + MTRKeypadInputCecKeyCodeMute MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMute", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x43, + MTRKeypadInputCecKeyCodePlay MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlay", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x44, + MTRKeypadInputCecKeyCodeStop MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStop", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x45, + MTRKeypadInputCecKeyCodePause MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePause", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x46, + MTRKeypadInputCecKeyCodeRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x47, + MTRKeypadInputCecKeyCodeRewind MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRewind", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x48, + MTRKeypadInputCecKeyCodeFastForward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeFastForward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x49, + MTRKeypadInputCecKeyCodeEject MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeEject", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4A, + MTRKeypadInputCecKeyCodeForward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeForward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4B, + MTRKeypadInputCecKeyCodeBackward MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeBackward", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4C, + MTRKeypadInputCecKeyCodeStopRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4D, + MTRKeypadInputCecKeyCodePauseRecord MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecord", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4E, + MTRKeypadInputCecKeyCodeReserved MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeReserved", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x4F, + MTRKeypadInputCecKeyCodeAngle MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeAngle", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x50, + MTRKeypadInputCecKeyCodeSubPicture MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSubPicture", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x51, + MTRKeypadInputCecKeyCodeVideoOnDemand MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeVideoOnDemand", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x52, + MTRKeypadInputCecKeyCodeElectronicProgramGuide MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeElectronicProgramGuide", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x53, + MTRKeypadInputCecKeyCodeTimerProgramming MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTimerProgramming", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x54, + MTRKeypadInputCecKeyCodeInitialConfiguration MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeInitialConfiguration", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x55, + MTRKeypadInputCecKeyCodeSelectBroadcastType MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectBroadcastType", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x56, + MTRKeypadInputCecKeyCodeSelectSoundPresentation MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectSoundPresentation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x57, + MTRKeypadInputCecKeyCodePlayFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePlayFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x60, + MTRKeypadInputCecKeyCodePausePlayFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePausePlayFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x61, + MTRKeypadInputCecKeyCodeRecordFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRecordFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x62, + MTRKeypadInputCecKeyCodePauseRecordFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePauseRecordFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x63, + MTRKeypadInputCecKeyCodeStopFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeStopFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x64, + MTRKeypadInputCecKeyCodeMuteFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeMuteFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x65, + MTRKeypadInputCecKeyCodeRestoreVolumeFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeRestoreVolumeFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x66, + MTRKeypadInputCecKeyCodeTuneFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeTuneFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x67, + MTRKeypadInputCecKeyCodeSelectMediaFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectMediaFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x68, + MTRKeypadInputCecKeyCodeSelectAvInputFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAvInputFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x69, + MTRKeypadInputCecKeyCodeSelectAudioInputFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeSelectAudioInputFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6A, + MTRKeypadInputCecKeyCodePowerToggleFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerToggleFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6B, + MTRKeypadInputCecKeyCodePowerOffFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOffFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6C, + MTRKeypadInputCecKeyCodePowerOnFunction MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodePowerOnFunction", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x6D, + MTRKeypadInputCecKeyCodeF1Blue MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF1Blue", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x71, + MTRKeypadInputCecKeyCodeF2Red MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF2Red", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x72, + MTRKeypadInputCecKeyCodeF3Green MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF3Green", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x73, + MTRKeypadInputCecKeyCodeF4Yellow MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF4Yellow", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x74, + MTRKeypadInputCecKeyCodeF5 MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeF5", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x75, + MTRKeypadInputCecKeyCodeData MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCodeData", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x76, +} MTR_DEPRECATED("Please use MTRKeypadInputCECKeyCode", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use queryImageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use applyUpdateRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use notifyUpdateAppliedWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRKeypadInputStatus) { + MTRKeypadInputStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRKeypadInputStatusUnsupportedKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRKeypadInputStatusInvalidKeyInCurrentState MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRKeypadInputFeature) { + MTRKeypadInputFeatureNavigationKeyCodes MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRKeypadInputFeatureLocationKeys MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRKeypadInputFeatureNumberKeys MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRContentLauncherCharacteristic) { + MTRContentLauncherCharacteristicForcedSubtitles MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRContentLauncherCharacteristicDescribesVideo MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRContentLauncherCharacteristicEasyToRead MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRContentLauncherCharacteristicFrameBased MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRContentLauncherCharacteristicMainProgram MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRContentLauncherCharacteristicOriginalContent MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRContentLauncherCharacteristicVoiceOverTranslation MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRContentLauncherCharacteristicCaption MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRContentLauncherCharacteristicSubtitle MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRContentLauncherCharacteristicAlternate MTR_PROVISIONALLY_AVAILABLE = 0x09, + MTRContentLauncherCharacteristicSupplementary MTR_PROVISIONALLY_AVAILABLE = 0x0A, + MTRContentLauncherCharacteristicCommentary MTR_PROVISIONALLY_AVAILABLE = 0x0B, + MTRContentLauncherCharacteristicDubbedTranslation MTR_PROVISIONALLY_AVAILABLE = 0x0C, + MTRContentLauncherCharacteristicDescription MTR_PROVISIONALLY_AVAILABLE = 0x0D, + MTRContentLauncherCharacteristicMetadata MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRContentLauncherCharacteristicEnhancedAudioIntelligibility MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRContentLauncherCharacteristicEmergency MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRContentLauncherCharacteristicKaraoke MTR_PROVISIONALLY_AVAILABLE = 0x11, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRContentLauncherMetricType) { + MTRContentLauncherMetricTypePixels MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRContentLauncherMetricTypePIXELS MTR_DEPRECATED("Please use MTRContentLauncherMetricTypePixels", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRContentLauncherMetricTypePercentage MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRContentLauncherMetricTypePERCENTAGE MTR_DEPRECATED("Please use MTRContentLauncherMetricTypePercentage", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRContentLauncherParameter) { + MTRContentLauncherParameterActor MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRContentLauncherParameterChannel MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRContentLauncherParameterCharacter MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRContentLauncherParameterDirector MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRContentLauncherParameterEvent MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRContentLauncherParameterFranchise MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRContentLauncherParameterGenre MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRContentLauncherParameterLeague MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRContentLauncherParameterPopularity MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x08, + MTRContentLauncherParameterProvider MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x09, + MTRContentLauncherParameterSport MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0A, + MTRContentLauncherParameterSportsTeam MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0B, + MTRContentLauncherParameterType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x0C, + MTRContentLauncherParameterVideo MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0D, + MTRContentLauncherParameterSeason MTR_PROVISIONALLY_AVAILABLE = 0x0E, + MTRContentLauncherParameterEpisode MTR_PROVISIONALLY_AVAILABLE = 0x0F, + MTRContentLauncherParameterAny MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRContentLauncherStatus) { + MTRContentLauncherStatusSuccess MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, + MTRContentLauncherStatusURLNotAvailable MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, + MTRContentLauncherStatusAuthFailed MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x02, + MTRContentLauncherStatusTextTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRContentLauncherStatusAudioTrackNotAvailable MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -@end +typedef NS_ENUM(uint8_t, MTRContentLauncherContentLaunchStatus) { + MTRContentLauncherContentLaunchStatusSuccess MTR_DEPRECATED("Please use MTRContentLauncherStatusSuccess", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x00, + MTRContentLauncherContentLaunchStatusUrlNotAvailable MTR_DEPRECATED("Please use MTRContentLauncherStatusURLNotAvailable", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x01, + MTRContentLauncherContentLaunchStatusAuthFailed MTR_DEPRECATED("Please use MTRContentLauncherStatusAuthFailed", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x02, +} MTR_DEPRECATED("Please use MTRContentLauncherStatus", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -@interface MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) +typedef NS_OPTIONS(uint32_t, MTRContentLauncherFeature) { + MTRContentLauncherFeatureContentSearch MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, + MTRContentLauncherFeatureURLPlayback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRContentLauncherFeatureAdvancedSeek MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRContentLauncherFeatureTextTracks MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentLauncherFeatureAudioTracks MTR_PROVISIONALLY_AVAILABLE = 0x5, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedProtocolsBitmap) { + MTRContentLauncherSupportedProtocolsBitmapDASH MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x1, + MTRContentLauncherSupportedProtocolsBitmapHLS MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x2, +} MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); -- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use announceOTAProviderWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRContentLauncherSupportedStreamingProtocol) { + MTRContentLauncherSupportedStreamingProtocolDASH MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmapDASH", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x1, + MTRContentLauncherSupportedStreamingProtocolHLS MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmapHLS", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x2, +} MTR_DEPRECATED("Please use MTRContentLauncherSupportedProtocolsBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultOTAProvidersWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRAudioOutputOutputType) { + MTRAudioOutputOutputTypeHDMI MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRAudioOutputOutputTypeHdmi MTR_DEPRECATED("Please use MTRAudioOutputOutputTypeHDMI", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRAudioOutputOutputTypeBT MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRAudioOutputOutputTypeBt MTR_DEPRECATED("Please use MTRAudioOutputOutputTypeBT", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRAudioOutputOutputTypeOptical MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRAudioOutputOutputTypeHeadphone MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRAudioOutputOutputTypeInternal MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRAudioOutputOutputTypeOther MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdatePossibleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdatePossibleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdatePossibleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRAudioOutputFeature) { + MTRAudioOutputFeatureNameUpdates MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdateStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRApplicationLauncherStatus) { + MTRApplicationLauncherStatusSuccess MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRApplicationLauncherStatusAppNotAvailable MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRApplicationLauncherStatusSystemBusy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRApplicationLauncherStatusPendingUserApproval MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRApplicationLauncherStatusDownloading MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRApplicationLauncherStatusInstalling MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateProgressWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdateStateProgressWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateProgressWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRApplicationLauncherFeature) { + MTRApplicationLauncherFeatureApplicationPlatform MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRApplicationBasicApplicationStatus) { + MTRApplicationBasicApplicationStatusStopped MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRApplicationBasicApplicationStatusActiveVisibleFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRApplicationBasicApplicationStatusActiveHidden MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRApplicationBasicApplicationStatusActiveVisibleNotFocus MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRContentControlFeature) { + MTRContentControlFeatureScreenTime MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRContentControlFeaturePINManagement MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRContentControlFeatureBlockUnrated MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRContentControlFeatureOnDemandContentRating MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRContentControlFeatureScheduledContentRating MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRContentAppObserverStatus) { + MTRContentAppObserverStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRContentAppObserverStatusUnexpectedData MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRCommissionerControlSupportedDeviceCategoryBitmap) { + MTRCommissionerControlSupportedDeviceCategoryBitmapFabricSynchronization MTR_PROVISIONALLY_AVAILABLE = 0x1, +} MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_ENUM(uint8_t, MTRUnitTestingSimple) { + MTRUnitTestingSimpleUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, + MTRUnitTestingSimpleValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, + MTRUnitTestingSimpleValueB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, + MTRUnitTestingSimpleValueC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x03, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@end +typedef NS_ENUM(uint8_t, MTRTestClusterSimple) { + MTRTestClusterSimpleUnspecified MTR_DEPRECATED("Please use MTRUnitTestingSimpleUnspecified", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRTestClusterSimpleValueA MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRTestClusterSimpleValueB MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, + MTRTestClusterSimpleValueC MTR_DEPRECATED("Please use MTRUnitTestingSimpleValueC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x03, +} MTR_DEPRECATED("Please use MTRUnitTestingSimple", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterLocalizationConfiguration (Deprecated) +typedef NS_OPTIONS(uint16_t, MTRUnitTestingBitmap16MaskMap) { + MTRUnitTestingBitmap16MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRUnitTestingBitmap16MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRUnitTestingBitmap16MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, + MTRUnitTestingBitmap16MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4000, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint16_t, MTRTestClusterBitmap16MaskMap) { + MTRTestClusterBitmap16MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRTestClusterBitmap16MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRTestClusterBitmap16MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, + MTRTestClusterBitmap16MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4000, +} MTR_DEPRECATED("Please use MTRUnitTestingBitmap16MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveLocaleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveLocaleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveLocaleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRUnitTestingBitmap32MaskMap) { + MTRUnitTestingBitmap32MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRUnitTestingBitmap32MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRUnitTestingBitmap32MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, + MTRUnitTestingBitmap32MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40000000, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedLocalesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedLocalesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedLocalesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint32_t, MTRTestClusterBitmap32MaskMap) { + MTRTestClusterBitmap32MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRTestClusterBitmap32MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRTestClusterBitmap32MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, + MTRTestClusterBitmap32MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40000000, +} MTR_DEPRECATED("Please use MTRUnitTestingBitmap32MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint64_t, MTRUnitTestingBitmap64MaskMap) { + MTRUnitTestingBitmap64MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRUnitTestingBitmap64MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRUnitTestingBitmap64MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, + MTRUnitTestingBitmap64MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4000000000000000, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint64_t, MTRTestClusterBitmap64MaskMap) { + MTRTestClusterBitmap64MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRTestClusterBitmap64MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRTestClusterBitmap64MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, + MTRTestClusterBitmap64MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4000000000000000, +} MTR_DEPRECATED("Please use MTRUnitTestingBitmap64MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRUnitTestingBitmap8MaskMap) { + MTRUnitTestingBitmap8MaskMapMaskVal1 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRUnitTestingBitmap8MaskMapMaskVal2 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRUnitTestingBitmap8MaskMapMaskVal3 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, + MTRUnitTestingBitmap8MaskMapMaskVal4 MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x40, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRTestClusterBitmap8MaskMap) { + MTRTestClusterBitmap8MaskMapMaskVal1 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal1", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRTestClusterBitmap8MaskMapMaskVal2 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal2", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRTestClusterBitmap8MaskMapMaskVal3 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal3", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, + MTRTestClusterBitmap8MaskMapMaskVal4 MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMapMaskVal4", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x40, +} MTR_DEPRECATED("Please use MTRUnitTestingBitmap8MaskMap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +typedef NS_OPTIONS(uint8_t, MTRUnitTestingSimpleBitmap) { + MTRUnitTestingSimpleBitmapValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, + MTRUnitTestingSimpleBitmapValueB MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, + MTRUnitTestingSimpleBitmapValueC MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x4, +} MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -@end +typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { + MTRTestClusterSimpleBitmapValueA MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueA", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRTestClusterSimpleBitmapValueB MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueB", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, + MTRTestClusterSimpleBitmapValueC MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmapValueC", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x4, +} MTR_DEPRECATED("Please use MTRUnitTestingSimpleBitmap", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterTimeFormatLocalization (Deprecated) +@interface MTRBaseClusterIdentify (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHourFormatWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHourFormatWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHourFormatWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHourFormatWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHourFormatWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)identifyWithParams:(MTRIdentifyClusterIdentifyParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use identifyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)triggerEffectWithParams:(MTRIdentifyClusterTriggerEffectParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use triggerEffectWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCalendarTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCalendarTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCalendarTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeIdentifyTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeIdentifyTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIdentifyTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeIdentifyTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIdentifyTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeIdentifyTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedCalendarTypesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeIdentifyTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeIdentifyTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIdentifyTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeIdentifyTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIdentifyTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -22708,20 +20225,33 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterUnitLocalization (Deprecated) +@interface MTRBaseClusterGroups (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureUnitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureUnitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureUnitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addGroupWithParams:(MTRGroupsClusterAddGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterAddGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use addGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)viewGroupWithParams:(MTRGroupsClusterViewGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterViewGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use viewGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getGroupMembershipWithParams:(MTRGroupsClusterGetGroupMembershipParams *)params completionHandler:(void (^)(MTRGroupsClusterGetGroupMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getGroupMembershipWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)removeGroupWithParams:(MTRGroupsClusterRemoveGroupParams *)params completionHandler:(void (^)(MTRGroupsClusterRemoveGroupResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use removeGroupWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)removeAllGroupsWithParams:(MTRGroupsClusterRemoveAllGroupsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use removeAllGroupsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)removeAllGroupsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use removeAllGroupsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use addGroupIfIdentifyingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNameSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNameSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNameSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNameSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNameSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -22760,18 +20290,73 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterPowerSourceConfiguration (Deprecated) +@interface MTRBaseClusterOnOff (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSourcesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSourcesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSourcesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use offWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)offWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use offWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use onWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)onWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use onWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use toggleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use toggleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use offWithEffectWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use onWithRecallGlobalSceneWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use onWithRecallGlobalSceneWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use onWithTimedOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnOffWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGlobalSceneControlWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGlobalSceneControlWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGlobalSceneControlWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffWaitTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffWaitTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOffWaitTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffWaitTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpOnOffWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpOnOffWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpOnOffWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpOnOffWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -22810,228 +20395,142 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterPowerSource (Deprecated) +@interface MTRBaseClusterLevelControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToLevelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToLevelWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopWithOnOffWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToClosestFrequencyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOrderWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOrderWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOrderWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedInputVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedInputFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredCurrentTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeCurrentFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredCurrentTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredCurrentTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredNominalVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredNominalVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredNominalVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredMaximumCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredPresentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMinFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredPresentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredPresentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveWiredFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveWiredFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveWiredFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPercentRemainingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeOnOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnOffTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatPercentRemainingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPercentRemainingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnOffTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnOffTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeRemainingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeOnLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOnTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatTimeRemainingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeRemainingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargeLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementNeededWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplacementNeededWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementNeededWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplaceabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeOffTransitionTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffTransitionTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOffTransitionTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOffTransitionTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplaceabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplaceabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPresentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatPresentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPresentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOffTransitionTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOffTransitionTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOffTransitionTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeDefaultMoveRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultMoveRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultMoveRateWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDefaultMoveRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveBatFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplacementDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCommonDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatCommonDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCommonDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatANSIDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatANSIDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatANSIDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatIECDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatIECDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatIECDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatApprovedChemistryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatApprovedChemistryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatApprovedChemistryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatQuantityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatQuantityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatQuantityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargeStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultMoveRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDefaultMoveRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultMoveRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpCurrentLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatTimeToFullChargeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatFunctionalWhileChargingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargingCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargingCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargingCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveBatChargeFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpCurrentLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartUpCurrentLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpCurrentLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23070,57 +20569,39 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterGeneralCommissioning (Deprecated) +@interface MTRBaseClusterDescriptor (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use armFailSafeWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use setRegulatoryConfigWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use commissioningCompleteWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use commissioningCompleteWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBreadcrumbWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBreadcrumbWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBreadcrumbWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBasicCommissioningInfoWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRegulatoryConfigWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRegulatoryConfigWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRegulatoryConfigWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDeviceTypeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDeviceTypeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDeviceTypeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationCapabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocationCapabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationCapabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeServerListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeServerListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeServerListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeServerListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportsConcurrentConnectionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClientListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClientListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClientListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClientListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePartsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartsListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartsListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartsListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23159,82 +20640,20 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterNetworkCommissioning (Deprecated) +@interface MTRBaseClusterBinding (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use scanNetworksWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use addOrUpdateWiFiNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use addOrUpdateThreadNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use removeNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use connectNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use reorderNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxNetworksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxNetworksWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxNetworksWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworksWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworksWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScanMaxTimeSecondsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeConnectMaxTimeSecondsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInterfaceEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInterfaceEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInterfaceEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkingStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastNetworkingStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkingStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastNetworkIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConnectErrorValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastConnectErrorValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConnectErrorValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBindingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBindingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBindingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBindingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBindingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23273,14 +20692,50 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterDiagnosticLogs (Deprecated) +@interface MTRBaseClusterAccessControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use retrieveLogsRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtensionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExtensionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExtensionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExtensionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtensionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSubjectsPerAccessControlEntryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSubjectsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetsPerAccessControlEntryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetsPerAccessControlEntryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAccessControlEntriesPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAccessControlEntriesPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23319,77 +20774,57 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterGeneralDiagnostics (Deprecated) +@interface MTRBaseClusterActions (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use testEventTriggerWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkInterfacesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworkInterfacesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkInterfacesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRebootCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRebootCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRebootCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalOperationalHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalOperationalHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalOperationalHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBootReasonWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBootReasonWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBootReasonWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveHardwareFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveRadioFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveRadioFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveRadioFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use instantActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use instantActionWithTransitionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use startActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use startActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use pauseActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use pauseActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resumeActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enableActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enableActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use disableActionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use disableActionWithDurationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActionListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActionListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActionListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActionListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTestEventTriggersEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndpointListsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEndpointListsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndpointListsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSetupURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetupURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetupURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetupURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23428,44 +20863,162 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterSoftwareDiagnostics (Deprecated) +@interface MTRBaseClusterBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetWatermarksWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetWatermarksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use mfgSpecificPingWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use mfgSpecificPingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThreadMetricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThreadMetricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThreadMetricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataModelRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDataModelRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataModelRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapFreeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLocationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapFreeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapFreeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapUsedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapUsedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapUsedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapHighWatermarkWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalConfigDisabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalConfigDisabledWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalConfigDisabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalConfigDisabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapabilityMinimaWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCapabilityMinimaWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapabilityMinimaWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23498,463 +21051,329 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - -@interface MTRBaseClusterThreadNetworkDiagnostics (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRoutingRoleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRoutingRoleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRoutingRoleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworkNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePanIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePanIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePanIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtendedPanIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExtendedPanIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtendedPanIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeshLocalPrefixWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeshLocalPrefixWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeshLocalPrefixWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeighborTableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNeighborTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeighborTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouteTableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRouteTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouteTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartitionIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWeightingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWeightingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWeightingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) -- (void)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDataVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStableDataVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStableDataVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStableDataVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use queryImageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use applyUpdateRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use notifyUpdateAppliedWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRouterIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLeaderRouterIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRouterIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDetachedRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDetachedRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDetachedRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChildRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChildRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChildRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouterRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRouterRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouterRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLeaderRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttachAttemptCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttachAttemptCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttachAttemptCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdChangeCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartitionIdChangeCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdChangeCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBetterPartitionAttachAttemptCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeParentChangeCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeParentChangeCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeParentChangeCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxTotalCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxTotalCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxTotalCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) -- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxUnicastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxUnicastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxUnicastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBroadcastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBroadcastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBroadcastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use announceOTAProviderWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckRequestedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDefaultOTAProvidersWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxAckRequestedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckRequestedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxAckedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultOTAProvidersWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultOTAProvidersWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxNoAckRequestedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdatePossibleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdatePossibleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdatePossibleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDataCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataPollCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDataPollCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataPollCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdateStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBeaconCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateProgressWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpdateStateProgressWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpdateStateProgressWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBeaconRequestCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxRetryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxRetryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxRetryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCcaCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrCcaCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCcaCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrAbortCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrAbortCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrAbortCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrBusyChannelCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxTotalCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +@interface MTRBaseClusterLocalizationConfiguration (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveLocaleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveLocaleWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxTotalCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxTotalCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxUnicastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxUnicastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxUnicastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveLocaleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveLocaleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBroadcastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedLocalesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBroadcastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBroadcastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedLocalesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedLocalesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDataCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataPollCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDataPollCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataPollCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBeaconCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBeaconRequestCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxAddressFilteredCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDestAddrFilteredCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterTimeFormatLocalization (Deprecated) -- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDuplicatedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDuplicatedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDuplicatedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrNoFrameCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHourFormatWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHourFormatWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHourFormatWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHourFormatWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHourFormatWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrUnknownNeighborCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCalendarTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeActiveCalendarTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCalendarTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCalendarTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrInvalidSrcAddrCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedCalendarTypesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedCalendarTypesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrSecCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrSecCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrSecCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrFcsCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrFcsCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrFcsCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +@end + +@interface MTRBaseClusterUnitLocalization (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureUnitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureUnitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureUnitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureUnitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePendingTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePendingTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePendingTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityPolicyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSecurityPolicyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityPolicyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelPage0MaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelPage0MaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelPage0MaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterPowerSourceConfiguration (Deprecated) -- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationalDatasetComponentsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSourcesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSourcesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSourcesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -23993,107 +21412,228 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) +@interface MTRBaseClusterPowerSource (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBSSIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOrderWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBSSIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBSSIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOrderWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOrderWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedInputVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedInputFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedInputFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredCurrentTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredCurrentTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredCurrentTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredAssessedCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredAssessedCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredNominalVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredNominalVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredNominalVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredMaximumCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredMaximumCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredPresentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSecurityTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiredPresentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiredPresentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiFiVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiFiVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiFiVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveWiredFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveWiredFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveWiredFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRSSIWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRSSIWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRSSIWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPercentRemainingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatPercentRemainingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPercentRemainingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconLostCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBeaconLostCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconLostCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeRemainingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatTimeRemainingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeRemainingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBeaconRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargeLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketMulticastRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementNeededWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplacementNeededWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementNeededWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketMulticastTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplaceabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplaceabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplaceabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPresentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatPresentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatPresentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveBatFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatReplacementDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatReplacementDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCommonDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketUnicastRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatCommonDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCommonDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatANSIDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatANSIDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatANSIDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatIECDesignationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatIECDesignationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatIECDesignationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatApprovedChemistryWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketUnicastTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatApprovedChemistryWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatApprovedChemistryWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentMaxRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatQuantityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatQuantityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatQuantityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentMaxRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentMaxRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargeStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargeStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatTimeToFullChargeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatTimeToFullChargeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatFunctionalWhileChargingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatFunctionalWhileChargingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargingCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBatChargingCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBatChargingCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveBatChargeFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveBatChargeFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24132,79 +21672,57 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) +@interface MTRBaseClusterGeneralCommissioning (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePHYRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePHYRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePHYRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFullDuplexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFullDuplexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFullDuplexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use armFailSafeWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use setRegulatoryConfigWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use commissioningCompleteWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use commissioningCompleteWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBreadcrumbWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBreadcrumbWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBreadcrumbWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBreadcrumbWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCollisionCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCollisionCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCollisionCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBasicCommissioningInfoWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBasicCommissioningInfoWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRegulatoryConfigWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRegulatoryConfigWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRegulatoryConfigWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCarrierDetectWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCarrierDetectWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCarrierDetectWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationCapabilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocationCapabilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocationCapabilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTimeSinceResetWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTimeSinceResetWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTimeSinceResetWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportsConcurrentConnectionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportsConcurrentConnectionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24243,118 +21761,82 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterBridgedDeviceBasic (Deprecated) +@interface MTRBaseClusterNetworkCommissioning (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use scanNetworksWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use addOrUpdateWiFiNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use addOrUpdateThreadNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use removeNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use connectNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use reorderNetworkWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxNetworksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxNetworksWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxNetworksWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworksWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworksWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScanMaxTimeSecondsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScanMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeConnectMaxTimeSecondsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConnectMaxTimeSecondsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInterfaceEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeInterfaceEnabledWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInterfaceEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInterfaceEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkingStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastNetworkingStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkingStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastNetworkIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastNetworkIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConnectErrorValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLastConnectErrorValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLastConnectErrorValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24393,32 +21875,14 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterSwitch (Deprecated) +@interface MTRBaseClusterDiagnosticLogs (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPositionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPositionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPositionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMultiPressMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMultiPressMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMultiPressMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use retrieveLogsRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24457,41 +21921,77 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterAdministratorCommissioning (Deprecated) +@interface MTRBaseClusterGeneralDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use openCommissioningWindowWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use openBasicCommissioningWindowWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use revokeCommissioningWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use revokeCommissioningWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use testEventTriggerWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindowStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindowStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindowStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkInterfacesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworkInterfacesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkInterfacesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminFabricIndexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAdminFabricIndexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminFabricIndexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRebootCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRebootCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRebootCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminVendorIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAdminVendorIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminVendorIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUpTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUpTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalOperationalHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalOperationalHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalOperationalHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBootReasonWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBootReasonWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBootReasonWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveHardwareFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveHardwareFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveRadioFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveRadioFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveRadioFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTestEventTriggersEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTestEventTriggersEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24530,70 +22030,44 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterOperationalCredentials (Deprecated) +@interface MTRBaseClusterSoftwareDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use attestationRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use certificateChainRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use CSRRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use addNOCWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use updateNOCWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use updateFabricLabelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use removeFabricWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use addTrustedRootCertificateWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNOCsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNOCsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNOCsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFabricsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetWatermarksWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetWatermarksWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedFabricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThreadMetricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThreadMetricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThreadMetricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCommissionedFabricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCommissionedFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCommissionedFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapFreeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapFreeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapFreeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTrustedRootCertificatesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapUsedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapUsedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapUsedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFabricIndexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentFabricIndexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFabricIndexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHeapHighWatermarkWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHeapHighWatermarkWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24632,294 +22106,457 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterGroupKeyManagement (Deprecated) +@interface MTRBaseClusterThreadNetworkDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use keySetWriteWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use keySetReadWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use keySetRemoveWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use keySetReadAllIndicesWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupKeyMapWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRoutingRoleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGroupKeyMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupKeyMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRoutingRoleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRoutingRoleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupTableWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGroupTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNetworkNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNetworkNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePanIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePanIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePanIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtendedPanIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExtendedPanIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExtendedPanIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeshLocalPrefixWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeshLocalPrefixWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeshLocalPrefixWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeighborTableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNeighborTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeighborTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouteTableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRouteTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouteTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartitionIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWeightingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWeightingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWeightingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDataVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDataVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStableDataVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStableDataVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStableDataVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRouterIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLeaderRouterIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRouterIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDetachedRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDetachedRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDetachedRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChildRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChildRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChildRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouterRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRouterRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRouterRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRoleCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLeaderRoleCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLeaderRoleCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttachAttemptCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxGroupsPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttachAttemptCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttachAttemptCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxGroupKeysPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdChangeCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartitionIdChangeCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartitionIdChangeCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBetterPartitionAttachAttemptCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeParentChangeCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeParentChangeCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeParentChangeCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxTotalCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxTotalCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxTotalCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxUnicastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxUnicastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxUnicastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBroadcastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBroadcastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBroadcastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckRequestedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxAckRequestedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckRequestedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxAckedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxAckedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxNoAckRequestedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxNoAckRequestedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDataCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataPollCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDataPollCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDataPollCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBeaconCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterFixedLabel (Deprecated) +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxBeaconRequestCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxRetryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxRetryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxRetryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCcaCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrCcaCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCcaCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrAbortCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrAbortCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrAbortCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrBusyChannelCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrBusyChannelCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterUserLabel (Deprecated) +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxTotalCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxTotalCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxTotalCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxUnicastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxUnicastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxUnicastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLabelListWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLabelListWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBroadcastCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBroadcastCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBroadcastCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDataCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataPollCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDataPollCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDataPollCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBeaconCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxBeaconRequestCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxBeaconRequestCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxAddressFilteredCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxAddressFilteredCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterBooleanState (Deprecated) +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDestAddrFilteredCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDestAddrFilteredCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDuplicatedCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxDuplicatedCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxDuplicatedCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStateValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStateValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStateValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrNoFrameCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrNoFrameCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrUnknownNeighborCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrUnknownNeighborCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrInvalidSrcAddrCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrSecCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrSecCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrSecCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrFcsCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrFcsCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrFcsCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrOtherCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - -@interface MTRBaseClusterModeSelect (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRxErrOtherCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRxErrOtherCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use changeToModeWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePendingTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePendingTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePendingTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStandardNamespaceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStandardNamespaceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStandardNamespaceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedModesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityPolicyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedModesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedModesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSecurityPolicyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityPolicyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelPage0MaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelPage0MaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelPage0MaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationalDatasetComponentsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalDatasetComponentsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveNetworkFaultsListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveNetworkFaultsListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -24958,336 +22595,218 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterDoorLock (Deprecated) +@interface MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use lockDoorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use unlockDoorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use unlockWithTimeoutWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use setCredentialWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getCredentialStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearCredentialWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLockStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLockStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLockTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLockTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActuatorEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActuatorEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActuatorEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDoorStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorClosedEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorClosedEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorClosedEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOpenPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOpenPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOpenPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfTotalUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPINUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfRFIDUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBSSIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBSSIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBSSIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSecurityTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSecurityTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxPINCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiFiVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWiFiVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWiFiVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinPINCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinPINCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinPINCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxRFIDCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRSSIWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRSSIWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRSSIWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinRFIDCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconLostCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBeaconLostCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconLostCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCredentialRulesSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBeaconRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBeaconRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCredentialRulesSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCredentialRulesSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketMulticastRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketMulticastTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketMulticastTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLanguageWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLanguageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLanguageWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLanguageWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLanguageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLanguageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketUnicastRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLEDSettingsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLEDSettingsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLEDSettingsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketUnicastTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketUnicastTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAutoRelockTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentMaxRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAutoRelockTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAutoRelockTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentMaxRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentMaxRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoundVolumeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoundVolumeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoundVolumeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperatingModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperatingModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperatingModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperatingModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperatingModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedOperatingModesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedOperatingModesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedOperatingModesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultConfigurationRegisterWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableLocalProgrammingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableOneTouchLockingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) -- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableInsideStatusLEDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnablePrivacyModeButtonWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use resetCountsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalProgrammingFeaturesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePHYRateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePHYRateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePHYRateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWrongCodeEntryLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFullDuplexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFullDuplexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFullDuplexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketRxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketRxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketRxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketTxCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePacketTxCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePacketTxCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTxErrCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTxErrCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUserCodeTemporaryDisableTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCollisionCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCollisionCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCollisionCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSendPINOverTheAirWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSendPINOverTheAirWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSendPINOverTheAirWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverrunCountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverrunCountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRequirePINforRemoteOperationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCarrierDetectWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCarrierDetectWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCarrierDetectWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExpiringUserTimeoutWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTimeSinceResetWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTimeSinceResetWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTimeSinceResetWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -25326,188 +22845,118 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterWindowCovering (Deprecated) +@interface MTRBaseClusterBridgedDeviceBasic (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use upOrOpenWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use upOrOpenWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use downOrCloseWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use downOrCloseWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopMotionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopMotionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use goToLiftValueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use goToLiftPercentageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use goToTiltValueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use goToTiltPercentageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfActuationsLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfActuationsTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConfigStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeConfigStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConfigStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercentageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercentageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationalStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndProductTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEndProductTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndProductTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeNodeLabelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNodeLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNodeLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHardwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHardwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoftwareVersionStringWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoftwareVersionStringWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeManufacturingDateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeManufacturingDateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePartNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePartNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductURLWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductURLWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSafetyStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSafetyStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSafetyStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductLabelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductLabelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSerialNumberWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSerialNumberWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReachableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReachableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUniqueIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUniqueIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -25546,100 +22995,105 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterBarrierControl (Deprecated) +@interface MTRBaseClusterSwitch (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use barrierControlGoToPercentWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use barrierControlStopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use barrierControlStopWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPositionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPositionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPositionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierMovingStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierMovingStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierMovingStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMultiPressMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMultiPressMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMultiPressMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierSafetyStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierSafetyStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCapabilitiesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCapabilitiesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCloseEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCloseEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCloseEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCloseEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCommandOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierCommandCloseEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierCommandCloseEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierCommandCloseEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierOpenPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierOpenPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierOpenPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterAdministratorCommissioning (Deprecated) -- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierClosePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBarrierClosePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierClosePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierClosePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBarrierPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBarrierPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use openCommissioningWindowWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use openBasicCommissioningWindowWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use revokeCommissioningWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use revokeCommissioningWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindowStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindowStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindowStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminFabricIndexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAdminFabricIndexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminFabricIndexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminVendorIdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAdminVendorIdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAdminVendorIdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -25678,180 +23132,152 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterPumpConfigurationAndControl (Deprecated) +@interface MTRBaseClusterOperationalCredentials (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use attestationRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use certificateChainRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use CSRRequestWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use addNOCWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use updateNOCWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use updateFabricLabelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use removeFabricWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use addTrustedRootCertificateWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNOCsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNOCsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNOCsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFabricsWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedFabricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCompPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinCompPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCompPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCompPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxCompPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCompPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCommissionedFabricsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCommissionedFabricsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCommissionedFabricsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTrustedRootCertificatesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTrustedRootCertificatesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFabricIndexWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentFabricIndexWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentFabricIndexWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstTempWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstTempWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstTempWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstTempWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstTempWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstTempWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePumpStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePumpStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePumpStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEffectiveOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveControlModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEffectiveControlModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveControlModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterGroupKeyManagement (Deprecated) -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLifetimeRunningHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use keySetWriteWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use keySetReadWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use keySetRemoveWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use keySetReadAllIndicesWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupKeyMapWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeGroupKeyMapWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGroupKeyMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupKeyMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLifetimeEnergyConsumedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupTableWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGroupTableWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGroupTableWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperationModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperationModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxGroupsPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupsPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeControlModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxGroupKeysPerFabricWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxGroupKeysPerFabricWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -25890,551 +23316,580 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterThermostat (Deprecated) +@interface MTRBaseClusterFixedLabel (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setpointRaiseLowerWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use setWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use clearWeeklyScheduleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutdoorTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutdoorTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutdoorTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePICoolingDemandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePICoolingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePICoolingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIHeatingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHVACSystemTypeConfigurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalTemperatureCalibrationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedCoolingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedHeatingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterUserLabel (Deprecated) -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLabelListWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLabelListWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLabelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLabelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +@end + +@interface MTRBaseClusterBooleanState (Deprecated) + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStateValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStateValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStateValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinSetpointDeadBandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemoteSensingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemoteSensingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemoteSensingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeControlSequenceOfOperationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSystemModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSystemModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSystemModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSystemModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSystemModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatRunningModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartOfWeekWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartOfWeekWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartOfWeekWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterModeSelect (Deprecated) -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfDailyTransitionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use changeToModeWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDescriptionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDescriptionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStandardNamespaceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStandardNamespaceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStandardNamespaceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedModesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedModesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedModesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatProgrammingOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatRunningStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOnModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOnModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOnModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeAmountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeAmountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeAmountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterDoorLock (Deprecated) -- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use lockDoorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use unlockDoorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use unlockWithTimeoutWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearWeekDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearYearDayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearHolidayScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearUserWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completionHandler:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use setCredentialWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completionHandler:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getCredentialStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearCredentialWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLockStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLockStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLockStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLockStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEmergencyHeatDeltaWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLockTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLockTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLockTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLockTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLockTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeActuatorEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActuatorEnabledWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeActuatorEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActuatorEnabledWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeActuatorEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActuatorEnabledWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeDoorStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDoorStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDoorStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDoorOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorOpenEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorOpenEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDoorOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorOpenEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDoorOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorOpenEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDoorClosedEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorClosedEventsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeDoorClosedEventsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDoorClosedEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDoorClosedEventsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDoorClosedEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDoorClosedEventsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOpenPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOpenPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOpenPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOpenPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfTotalUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfTotalUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfTotalUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNumberOfPINUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfPINUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPINUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfPINUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPINUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfRFIDUsersSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfRFIDUsersSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACRefrigerantTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACRefrigerantTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACRefrigerantTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfYearDaySchedulesSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCompressorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfHolidaySchedulesSupportedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCompressorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCompressorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACErrorCodeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACErrorCodeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACErrorCodeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxPINCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPINCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLouverPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMinPINCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinPINCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinPINCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACLouverPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLouverPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinPINCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinPINCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinPINCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCoilTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCoilTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCoilTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxRFIDCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityformatWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCapacityformatWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityformatWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinRFIDCodeLengthWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinRFIDCodeLengthWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinRFIDCodeLengthWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinRFIDCodeLengthWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinRFIDCodeLengthWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCredentialRulesSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCredentialRulesSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCredentialRulesSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCredentialRulesSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCredentialRulesSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCredentialRulesSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfCredentialsSupportedPerUserWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLanguageWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLanguageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLanguageWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLanguageWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLanguageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLanguageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLanguageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLanguageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLEDSettingsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLEDSettingsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLEDSettingsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLEDSettingsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLEDSettingsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLEDSettingsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLEDSettingsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAutoRelockTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAutoRelockTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAutoRelockTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAutoRelockTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAutoRelockTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAutoRelockTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAutoRelockTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeSoundVolumeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoundVolumeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSoundVolumeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSoundVolumeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSoundVolumeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSoundVolumeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSoundVolumeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterFanControl (Deprecated) +- (void)readAttributeOperatingModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperatingModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperatingModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperatingModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOperatingModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperatingModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOperatingModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperatingModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSupportedOperatingModesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedOperatingModesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedOperatingModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedOperatingModesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedOperatingModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedOperatingModesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFanModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDefaultConfigurationRegisterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDefaultConfigurationRegisterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDefaultConfigurationRegisterWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDefaultConfigurationRegisterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDefaultConfigurationRegisterWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeSequenceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFanModeSequenceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeSequenceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEnableLocalProgrammingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableLocalProgrammingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnableLocalProgrammingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableLocalProgrammingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnableLocalProgrammingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableLocalProgrammingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePercentSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePercentSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePercentSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEnableOneTouchLockingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableOneTouchLockingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnableOneTouchLockingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableOneTouchLockingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnableOneTouchLockingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableOneTouchLockingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePercentCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEnableInsideStatusLEDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnableInsideStatusLEDWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnableInsideStatusLEDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnableInsideStatusLEDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnableInsideStatusLEDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnableInsideStatusLEDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEnablePrivacyModeButtonWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEnablePrivacyModeButtonWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnablePrivacyModeButtonWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnablePrivacyModeButtonWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnablePrivacyModeButtonWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnablePrivacyModeButtonWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLocalProgrammingFeaturesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalProgrammingFeaturesWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocalProgrammingFeaturesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalProgrammingFeaturesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocalProgrammingFeaturesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalProgrammingFeaturesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeWrongCodeEntryLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWrongCodeEntryLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWrongCodeEntryLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWrongCodeEntryLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWrongCodeEntryLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWrongCodeEntryLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRockSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUserCodeTemporaryDisableTimeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUserCodeTemporaryDisableTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUserCodeTemporaryDisableTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRockSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRockSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRockSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSendPINOverTheAirWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSendPINOverTheAirWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSendPINOverTheAirWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSendPINOverTheAirWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSendPINOverTheAirWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSendPINOverTheAirWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSendPINOverTheAirWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeRequirePINforRemoteOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRequirePINforRemoteOperationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRequirePINforRemoteOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRequirePINforRemoteOperationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRequirePINforRemoteOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRequirePINforRemoteOperationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWindSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWindSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeExpiringUserTimeoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeExpiringUserTimeoutWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeExpiringUserTimeoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeExpiringUserTimeoutWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeExpiringUserTimeoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeExpiringUserTimeoutWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -26473,38 +23928,188 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) +@interface MTRBaseClusterWindowCovering (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use upOrOpenWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use upOrOpenWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use downOrCloseWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use downOrCloseWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopMotionWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopMotionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use goToLiftValueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use goToLiftPercentageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use goToTiltValueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use goToTiltPercentageWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalClosedLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalClosedLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureDisplayModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfActuationsLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeKeypadLockoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeKeypadLockoutWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeKeypadLockoutWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfActuationsTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfActuationsTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConfigStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeConfigStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeConfigStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercentageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercentageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercentageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercentageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationalStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationalStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndProductTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEndProductTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEndProductTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitLiftWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitLiftWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledOpenLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledOpenLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstalledClosedLimitTiltWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstalledClosedLimitTiltWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScheduleProgrammingVisibilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSafetyStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSafetyStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSafetyStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -26538,445 +24143,185 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - -@interface MTRBaseClusterColorControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToHueAndSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveToColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enhancedMoveToHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enhancedMoveHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enhancedStepHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use enhancedMoveToHueAndSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use colorLoopSetWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stopMoveStepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use moveColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use stepColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSaturationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentSaturationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSaturationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDriftCompensationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDriftCompensationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDriftCompensationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCompensationTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCompensationTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCompensationTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTemperatureMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPrimariesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPrimariesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPrimariesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterPumpConfigurationAndControl (Deprecated) -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWhitePointXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWhitePointYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCompPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinCompPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCompPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCompPressureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxCompPressureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCompPressureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstFlowWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstFlowWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstFlowWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstTempWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinConstTempWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinConstTempWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstTempWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnhancedCurrentHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedColorModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnhancedColorModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedColorModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxConstTempWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxConstTempWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopActiveWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopActiveWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopActiveWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePumpStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePumpStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePumpStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopDirectionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopDirectionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopDirectionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEffectiveOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveControlModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEffectiveControlModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEffectiveControlModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopStartEnhancedHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorCapabilitiesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorCapabilitiesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorCapabilitiesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeRunningHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLifetimeRunningHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeRunningHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLifetimeEnergyConsumedWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLifetimeEnergyConsumedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLifetimeEnergyConsumedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperationModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOperationModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeControlModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27015,278 +24360,419 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterBallastConfiguration (Deprecated) +@interface MTRBaseClusterThermostat (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setpointRaiseLowerWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use setWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearWeeklyScheduleWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use clearWeeklyScheduleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBallastStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutdoorTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutdoorTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutdoorTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIntrinsicBallastFactorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIntrinsicBallastFactorWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIntrinsicBallastFactorWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIntrinsicBallastFactorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIntrinsicBallastFactorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBallastFactorAdjustmentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampQuantityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampQuantityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampQuantityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampTypeWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePICoolingDemandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePICoolingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePICoolingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampManufacturerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampManufacturerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampManufacturerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIHeatingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampRatedHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampRatedHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampRatedHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHVACSystemTypeConfigurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampBurnHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLocalTemperatureCalibrationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedCoolingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedCoolingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedHeatingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedHeatingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedCoolingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedCoolingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedHeatingSetpointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedHeatingSetpointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampAlarmModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampAlarmModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampAlarmModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinHeatSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampBurnHoursTripPointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxHeatSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxHeatSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxHeatSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinCoolSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxCoolSetpointLimitWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxCoolSetpointLimitWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxCoolSetpointLimitWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinSetpointDeadBandWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinSetpointDeadBandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinSetpointDeadBandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemoteSensingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRemoteSensingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemoteSensingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemoteSensingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeControlSequenceOfOperationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeControlSequenceOfOperationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeControlSequenceOfOperationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSystemModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSystemModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSystemModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSystemModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSystemModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatRunningModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartOfWeekWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartOfWeekWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartOfWeekWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterIlluminanceMeasurement (Deprecated) +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfWeeklyTransitionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfDailyTransitionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfDailyTransitionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureSetpointHoldDurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureSetpointHoldDurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeThermostatProgrammingOperationModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatProgrammingOperationModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatProgrammingOperationModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeThermostatRunningStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeThermostatRunningStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLightSensorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeAmountWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeAmountWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeAmountWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSetpointChangeSourceTimestampWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSetpointChangeSourceTimestampWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOccupiedSetbackWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLightSensorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLightSensorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupiedSetbackMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUnoccupiedSetbackWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUnoccupiedSetbackMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUnoccupiedSetbackMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeEmergencyHeatDeltaWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEmergencyHeatDeltaWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEmergencyHeatDeltaWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCapacityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterTemperatureMeasurement (Deprecated) +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACRefrigerantTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACRefrigerantTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACRefrigerantTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACRefrigerantTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCompressorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCompressorTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCompressorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCompressorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACErrorCodeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACErrorCodeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACErrorCodeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACErrorCodeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLouverPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACLouverPositionWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACLouverPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACLouverPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCoilTemperatureWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCoilTemperatureWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCoilTemperatureWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityformatWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeACCapacityformatWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeACCapacityformatWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeACCapacityformatWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27325,74 +24811,100 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterPressureMeasurement (Deprecated) +@interface MTRBaseClusterFanControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFanModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeSequenceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeFanModeSequenceWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFanModeSequenceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFanModeSequenceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePercentSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePercentSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePercentSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePercentCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePercentCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaledToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSpeedSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSpeedCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSpeedCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRockSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRockSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRockSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRockSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRockSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSupportWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindSupportWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSupportWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSettingWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWindSettingWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWindSettingWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWindSettingWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWindSettingWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27431,39 +24943,38 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterFlowMeasurement (Deprecated) +@interface MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeTemperatureDisplayModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTemperatureDisplayModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTemperatureDisplayModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeKeypadLockoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeKeypadLockoutWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeKeypadLockoutWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeKeypadLockoutWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeScheduleProgrammingVisibilityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScheduleProgrammingVisibilityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScheduleProgrammingVisibilityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27502,234 +25013,440 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterRelativeHumidityMeasurement (Deprecated) +@interface MTRBaseClusterColorControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToHueAndSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepColorWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveToColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enhancedMoveToHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enhancedMoveHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enhancedStepHueWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use enhancedMoveToHueAndSaturationWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use colorLoopSetWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stopMoveStepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use moveColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use stepColorTemperatureWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSaturationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentSaturationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentSaturationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRemainingTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRemainingTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDriftCompensationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDriftCompensationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDriftCompensationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCompensationTextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCompensationTextWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCompensationTextWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTemperatureMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOptionsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOptionsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOptionsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPrimariesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNumberOfPrimariesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNumberOfPrimariesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary1IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary1IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary2IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary2IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary3IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary3IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary4IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary4IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterOccupancySensing (Deprecated) +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary5IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary5IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6XWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6XWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6XWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6YWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6YWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6YWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6IntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePrimary6IntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePrimary6IntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeBitmapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWhitePointXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIROccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIROccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIROccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIROccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeWhitePointYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeWhitePointYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeWhitePointYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointRIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointRIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointRIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointGIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointGIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointGIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBXWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBXWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBXWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBXWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBXWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBYWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBYWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBYWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBYWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBYWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBIntensityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeColorPointBIntensityWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorPointBIntensityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorPointBIntensityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnhancedCurrentHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedCurrentHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedColorModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeEnhancedColorModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeEnhancedColorModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopActiveWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopActiveWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopActiveWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopDirectionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopDirectionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopDirectionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopStartEnhancedHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStartEnhancedHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorLoopStoredEnhancedHueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorCapabilitiesWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorCapabilitiesWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorCapabilitiesWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterWakeOnLan (Deprecated) +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMinMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMACAddressWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMACAddressWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMACAddressWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMACAddressWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeStartUpColorTemperatureMiredsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartUpColorTemperatureMiredsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27768,99 +25485,129 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterChannel (Deprecated) +@interface MTRBaseClusterBallastConfiguration (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use changeChannelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use changeChannelByNumberWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use skipChannelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeChannelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineupWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineupWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineupWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentChannelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentChannelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentChannelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBallastStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMinLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxLevelWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeMaxLevelWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxLevelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxLevelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIntrinsicBallastFactorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIntrinsicBallastFactorWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeIntrinsicBallastFactorWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeIntrinsicBallastFactorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeIntrinsicBallastFactorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@interface MTRBaseClusterTargetNavigator (Deprecated) +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeBallastFactorAdjustmentWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeBallastFactorAdjustmentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeBallastFactorAdjustmentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampQuantityWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampQuantityWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampQuantityWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use navigateTargetWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampTypeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampTypeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeTargetListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampManufacturerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampManufacturerWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampManufacturerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampManufacturerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentTargetWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampRatedHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampRatedHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampRatedHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampRatedHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentTargetWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentTargetWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampBurnHoursWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampAlarmModeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampAlarmModeWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampAlarmModeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampAlarmModeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLampBurnHoursTripPointWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLampBurnHoursTripPointWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLampBurnHoursTripPointWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -27899,99 +25646,46 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterMediaPlayback (Deprecated) +@interface MTRBaseClusterIlluminanceMeasurement (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use playWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use playWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use pauseWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use pauseWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use stopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use stopWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use startOverWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use startOverWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use previousWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use previousWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use nextWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use nextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use rewindWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use rewindWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use fastForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use fastForwardWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use skipForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use skipBackwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use seekWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSampledPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLightSensorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSampledPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSampledPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePlaybackSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePlaybackSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePlaybackSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeEndWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSeekRangeEndWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeEndWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeStartWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSeekRangeStartWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeStartWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLightSensorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLightSensorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28030,38 +25724,39 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterMediaInput (Deprecated) +@interface MTRBaseClusterTemperatureMeasurement (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use selectInputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use showInputStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use showInputStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use hideInputStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use hideInputStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use renameInputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeInputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInputListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInputListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInputListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentInputWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentInputWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentInputWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28100,16 +25795,74 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterLowPower (Deprecated) +@interface MTRBaseClusterPressureMeasurement (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use sleepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use sleepWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxScaledValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxScaledValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxScaledValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaledToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaledToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaleWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeScaleWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeScaleWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28148,14 +25901,39 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterKeypadInput (Deprecated) +@interface MTRBaseClusterFlowMeasurement (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use sendKeyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28194,32 +25972,39 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterContentLauncher (Deprecated) +@interface MTRBaseClusterRelativeHumidityMeasurement (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use launchContentWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use launchURLWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptHeaderWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptHeaderWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptHeaderWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMinMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMinMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedStreamingProtocolsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMaxMeasuredValueWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMaxMeasuredValueWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeToleranceWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeToleranceWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28258,30 +26043,113 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterAudioOutput (Deprecated) +@interface MTRBaseClusterOccupancySensing (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use selectOutputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use renameOutputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutputListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutputListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutputListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOutputWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentOutputWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOutputWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOccupancySensorTypeBitmapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOccupancySensorTypeBitmapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIROccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIROccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIROccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIROccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIRUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28320,34 +26188,18 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterApplicationLauncher (Deprecated) +@interface MTRBaseClusterWakeOnLan (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use launchAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use stopAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use hideAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCatalogListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCatalogListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCatalogListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentAppWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeCurrentAppWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeCurrentAppWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeMACAddressWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMACAddressWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentAppWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentAppWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMACAddressWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMACAddressWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28386,67 +26238,39 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterApplicationBasic (Deprecated) +@interface MTRBaseClusterChannel (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use changeChannelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use changeChannelByNumberWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use skipChannelWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeChannelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeChannelListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeChannelListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineupWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineupWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineupWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAllowedVendorListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAllowedVendorListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAllowedVendorListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentChannelWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentChannelWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentChannelWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28485,20 +26309,28 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterAccountLogin (Deprecated) +@interface MTRBaseClusterTargetNavigator (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler - MTR_DEPRECATED("Please use getSetupPINWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use loginWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use logoutWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use logoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use navigateTargetWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeTargetListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTargetListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTargetListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentTargetWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentTargetWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentTargetWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval @@ -28537,930 +26369,606 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { @end -@interface MTRBaseClusterElectricalMeasurement (Deprecated) +@interface MTRBaseClusterMediaPlayback (Deprecated) - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use getProfileInfoCommandWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use getProfileInfoCommandWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completionHandler:(MTRStatusCompletion)completionHandler - MTR_DEPRECATED("Please use getMeasurementProfileCommandWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasurementTypeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasurementTypeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasurementTypeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use playWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use playWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use pauseWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use pauseWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use stopWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use stopWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use startOverWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use startOverWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use previousWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use previousWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use nextWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use nextWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use rewindWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use rewindWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use fastForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use fastForwardWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use skipForwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use skipBackwardWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use seekWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentStateWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentStateWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentStateWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartTimeWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcVoltageDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcVoltageDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcCurrentDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcCurrentDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStartTimeWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStartTimeWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDcPowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDcPowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeDurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeDurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSampledPositionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSampledPositionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSampledPositionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePlaybackSpeedWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePlaybackSpeedWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePlaybackSpeedWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeEndWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSeekRangeEndWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeEndWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeutralCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeStartWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeNeutralCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeNeutralCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalActivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalActivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalActivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalReactivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalReactivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalReactivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalApparentPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeTotalApparentPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeTotalApparentPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured1stHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured3rdHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured5thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured7thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured9thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSeekRangeStartWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSeekRangeStartWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasured11thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasured11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterMediaInput (Deprecated) -- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcFrequencyDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcFrequencyDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use selectInputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use showInputStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use showInputStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use hideInputStatusWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use hideInputStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use renameInputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeInputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInputListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInputListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInputListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentInputWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentInputWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentInputWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHarmonicCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousLineCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousLineCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousActiveCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousActiveCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousReactiveCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousReactiveCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeInstantaneousPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeInstantaneousPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterLowPower (Deprecated) -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use sleepWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use sleepWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributePowerFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAverageRmsUnderVoltageCounterWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeOverVoltagePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterKeypadInput (Deprecated) -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsExtremeUnderVoltagePeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSagPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use sendKeyWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeRmsVoltageSwellPeriodWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerMultiplierWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcPowerMultiplierWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerMultiplierWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerDivisorWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcPowerDivisorWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcPowerDivisorWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterContentLauncher (Deprecated) -- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeOverloadAlarmsMaskWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOverloadAlarmsMaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVoltageOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVoltageOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVoltageOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use launchContentWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use launchURLWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptHeaderWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptHeaderWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptHeaderWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeSupportedStreamingProtocolsWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeSupportedStreamingProtocolsWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeSupportedStreamingProtocolsWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeAcOverloadAlarmsMaskWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcOverloadAlarmsMaskWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcOverloadAlarmsMaskWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcVoltageOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcVoltageOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcCurrentOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcCurrentOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcActivePowerOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcActivePowerOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcReactivePowerOverloadWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcReactivePowerOverloadWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterAudioOutput (Deprecated) -- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltageWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltageWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use selectOutputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use renameOutputWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutputListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeOutputListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeOutputListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOutputWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentOutputWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentOutputWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterApplicationLauncher (Deprecated) -- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use launchAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use stopAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use hideAppWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCatalogListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCatalogListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCatalogListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentAppWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeCurrentAppWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeCurrentAppWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeCurrentAppWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeCurrentAppWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeLineCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLineCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterApplicationBasic (Deprecated) -- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActiveCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactiveCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactiveCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltagePhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltagePhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeVendorIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeVendorIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationNameWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationNameWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationNameWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeProductIDWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeProductIDWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeStatusWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeStatusWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsCurrentMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsCurrentMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationVersionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApplicationVersionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApplicationVersionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAllowedVendorListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMinPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMinPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAllowedVendorListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAllowedVendorListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeActivePowerMaxPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeActivePowerMaxPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeReactivePowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeReactivePowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeGeneratedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeApparentPowerPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeApparentPowerPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePowerFactorPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePowerFactorPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAcceptedCommandListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAcceptedCommandListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAttributeListWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAttributeListWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeFeatureMapWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeFeatureMapWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeClusterRevisionWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeClusterRevisionWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@end -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +@interface MTRBaseClusterAccountLogin (Deprecated) -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpointID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + MTR_DEPRECATED("Please use getSetupPINWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use loginWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use logoutWithParams:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler + MTR_DEPRECATED("Please use logoutWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeGeneratedCommandListWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 84e03c5adeb430..6f586f7fcba17d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -2459,11 +2459,228 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOnOffSwitchConfiguration +@implementation MTRBaseClusterLevelControl + +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterMoveToLevelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveToLevel::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterMoveParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::Move::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterStepParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::Step::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterMoveWithOnOffParams + alloc] init]; + } -- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterStepWithOnOffParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::StepWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterStopWithOnOffParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::StopWithOnOff::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLevelControlClusterMoveToClosestFrequencyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2472,11 +2689,11 @@ - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2486,9 +2703,9 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2497,9 +2714,9 @@ + (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2508,39 +2725,11 @@ - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2550,9 +2739,9 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2561,9 +2750,9 @@ + (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2572,11 +2761,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2586,9 +2775,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2597,9 +2786,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2608,11 +2797,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2622,9 +2811,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2633,9 +2822,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2644,11 +2833,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2658,9 +2847,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2669,9 +2858,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2680,11 +2869,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2694,9 +2883,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2705,9 +2894,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2716,11 +2905,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2730,9 +2919,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2741,9 +2930,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2752,11 +2941,39 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2766,9 +2983,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2777,507 +2994,188 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterOnOffSwitchConfiguration (Deprecated) - -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSwitchTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSwitchTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeSwitchTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSwitchActionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeSwitchActionsWithValue:value params:nil completion:completionHandler]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeSwitchActionsWithValue:value params:params completion:completionHandler]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSwitchActionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -+ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeSwitchActionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterLevelControl - -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveToLevelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveToLevel::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::Move::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStepParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LevelControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRLevelControlClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterMoveToLevelWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LevelControl::Commands::MoveToLevelWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRLevelControlClusterMoveWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::MoveWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLevelControlClusterStepWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LevelControl::Commands::StepWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRLevelControlClusterStopWithOnOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LevelControl::Commands::StopWithOnOff::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRLevelControlClusterMoveToClosestFrequencyParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - using RequestType = LevelControl::Commands::MoveToClosestFrequency::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } -- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3287,9 +3185,9 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3298,9 +3196,9 @@ + (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3309,11 +3207,44 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3323,9 +3254,9 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3334,9 +3265,9 @@ + (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3345,522 +3276,7 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } @@ -4983,11 +4399,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterBinaryInputBasic +@implementation MTRBaseClusterPulseWidthModulation -- (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4996,39 +4412,11 @@ - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeActiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5038,9 +4426,9 @@ - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5049,9 +4437,9 @@ + (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5060,39 +4448,11 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va completion:completion]; } -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDescriptionWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5102,9 +4462,9 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5113,9 +4473,9 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5124,39 +4484,11 @@ - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable v completion:completion]; } -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeInactiveTextWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5166,9 +4498,9 @@ - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5177,9 +4509,9 @@ + (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5188,39 +4520,11 @@ - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5230,9 +4534,9 @@ - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5241,9 +4545,9 @@ + (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5252,11 +4556,11 @@ - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5266,9 +4570,9 @@ - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5277,9 +4581,9 @@ + (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5288,39 +4592,51 @@ - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePresentValueWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +@end - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; +@implementation MTRBaseClusterDescriptor - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5330,9 +4646,9 @@ - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDeviceTypeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; + using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5341,9 +4657,9 @@ + (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5352,39 +4668,47 @@ - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeReliabilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; ++ (void)readAttributeServerListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5394,9 +4718,9 @@ - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClientListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5405,9 +4729,9 @@ + (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5416,11 +4740,11 @@ - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5430,9 +4754,9 @@ - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; + using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5441,9 +4765,9 @@ + (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5452,11 +4776,11 @@ - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5466,9 +4790,9 @@ - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTagListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; + using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5479,7 +4803,7 @@ + (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5492,7 +4816,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5504,7 +4828,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5515,7 +4839,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5528,7 +4852,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5540,7 +4864,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5551,7 +4875,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5564,7 +4888,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5576,7 +4900,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5587,7 +4911,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5600,7 +4924,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5612,7 +4936,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5623,7 +4947,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5636,7 +4960,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5648,7 +4972,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5659,7 +4983,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5672,7 +4996,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -5684,7 +5008,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -5695,28 +5019,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBinaryInputBasic (Deprecated) +@implementation MTRBaseClusterDescriptor (Deprecated) -- (void)readAttributeActiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDeviceListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveTextWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeDeviceTypeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveTextWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveTextWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5725,41 +5041,33 @@ - (void)subscribeAttributeActiveTextWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeDeviceTypeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeActiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeDeviceTypeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeServerListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeServerListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDescriptionWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDescriptionWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5768,41 +5076,33 @@ - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeServerListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeServerListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeInactiveTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClientListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInactiveTextWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeClientListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeInactiveTextWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeInactiveTextWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5811,41 +5111,33 @@ - (void)subscribeAttributeInactiveTextWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeInactiveTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClientListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeInactiveTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInactiveTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClientListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOutOfServiceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOutOfServiceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributePartsListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOutOfServiceWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOutOfServiceWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5854,33 +5146,33 @@ - (void)subscribeAttributeOutOfServiceWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOutOfServiceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePartsListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOutOfServiceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOutOfServiceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePartsListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePolarityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePolarityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5889,41 +5181,33 @@ - (void)subscribeAttributePolarityWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePolarityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePolarityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePolarityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePresentValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePresentValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePresentValueWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePresentValueWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -5932,196 +5216,13 @@ - (void)subscribeAttributePresentValueWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePresentValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePresentValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePresentValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeReliabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeReliabilityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeReliabilityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeReliabilityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeReliabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReliabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeReliabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeReliabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeStatusFlagsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusFlagsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStatusFlagsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStatusFlagsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStatusFlagsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusFlagsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { @@ -6244,11 +5345,112 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterPulseWidthModulation +@implementation MTRBaseClusterBinding + +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRBindingClusterTargetStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRBindingClusterTargetStruct *)value[i_0]; + if (element_0.node != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); + definedValue_2 = element_0.node.unsignedLongLongValue; + } + if (element_0.group != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); + definedValue_2 = element_0.group.unsignedShortValue; + } + if (element_0.endpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); + definedValue_2 = element_0.endpoint.unsignedShortValue; + } + if (element_0.cluster != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); + definedValue_2 = element_0.cluster.unsignedIntValue; + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBindingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Binding::Attributes::Binding::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6261,7 +5463,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6273,7 +5475,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6284,7 +5486,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6297,7 +5499,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6309,7 +5511,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6320,7 +5522,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + using TypeInfo = Binding::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6333,7 +5535,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + using TypeInfo = Binding::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6345,7 +5547,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + using TypeInfo = Binding::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6356,7 +5558,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6369,7 +5571,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6381,7 +5583,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6392,7 +5594,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6405,7 +5607,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6417,7 +5619,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6428,7 +5630,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6441,7 +5643,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6453,7 +5655,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6464,168 +5666,400 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDescriptor +@implementation MTRBaseClusterBinding (Deprecated) -- (void)readAttributeDeviceTypeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBindingWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeDeviceTypeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeBindingWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeDeviceTypeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Descriptor::Attributes::DeviceTypeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeBindingWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeServerListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBindingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeServerListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeBindingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeServerListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::ServerList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClientListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClientListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClientListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::ClientList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePartsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePartsListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePartsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Descriptor::Attributes::PartsList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeTagListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterAccessControl + +- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRAccessControlClusterReviewFabricRestrictionsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = AccessControl::Commands::ReviewFabricRestrictions::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRAccessControlClusterReviewFabricRestrictionsResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; + [self writeAttributeACLWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRAccessControlClusterAccessControlEntryStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRAccessControlClusterAccessControlEntryStruct *)value[i_0]; + listHolder_0->mList[i_0].privilege = static_castmList[i_0].privilege)>>(element_0.privilege.unsignedCharValue); + listHolder_0->mList[i_0].authMode = static_castmList[i_0].authMode)>>(element_0.authMode.unsignedCharValue); + if (element_0.subjects == nil) { + listHolder_0->mList[i_0].subjects.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.subjects.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.subjects.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.subjects.count; ++i_3) { + if ( ! [element_0.subjects[i_3] isKindOfClass: [NSNumber class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (NSNumber *)element_0.subjects[i_3]; + listHolder_3->mList[i_3] = element_3.unsignedLongLongValue; + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.subjects.count); + } else { + nonNullValue_2 = ListType_3(); + } + } + } + if (element_0.targets == nil) { + listHolder_0->mList[i_0].targets.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); + { + using ListType_3 = std::remove_reference_t; + using ListMemberType_3 = ListMemberTypeGetter::Type; + if (element_0.targets.count != 0) { + auto * listHolder_3 = new ListHolder(element_0.targets.count); + if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_3); + for (size_t i_3 = 0; i_3 < element_0.targets.count; ++i_3) { + if ( ! [element_0.targets[i_3] isKindOfClass: [MTRAccessControlClusterAccessControlTargetStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_3 = (MTRAccessControlClusterAccessControlTargetStruct *)element_0.targets[i_3]; + if (element_3.cluster == nil) { + listHolder_3->mList[i_3].cluster.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); + nonNullValue_5 = element_3.cluster.unsignedIntValue; + } + if (element_3.endpoint == nil) { + listHolder_3->mList[i_3].endpoint.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); + nonNullValue_5 = element_3.endpoint.unsignedShortValue; + } + if (element_3.deviceType == nil) { + listHolder_3->mList[i_3].deviceType.SetNull(); + } else { + auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); + nonNullValue_5 = element_3.deviceType.unsignedIntValue; + } + } + nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.targets.count); + } else { + nonNullValue_2 = ListType_3(); + } + } + } + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6635,9 +6069,9 @@ - (void)subscribeAttributeTagListWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTagListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::TagList::TypeInfo; + using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6646,22 +6080,72 @@ + (void)readAttributeTagListWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRAccessControlClusterAccessControlExtensionStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRAccessControlClusterAccessControlExtensionStruct *)value[i_0]; + listHolder_0->mList[i_0].data = AsByteSpan(element_0.data); + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6671,9 +6155,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6682,9 +6166,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6693,11 +6177,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6707,9 +6191,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6718,9 +6202,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6729,11 +6213,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6743,9 +6227,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6754,9 +6238,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6765,11 +6249,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6779,9 +6263,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::AttributeList::TypeInfo; + using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6790,9 +6274,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissioningARLWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6801,11 +6285,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissioningARLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6815,9 +6299,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCommissioningARLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6826,22 +6310,22 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeARLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeARLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -6851,9 +6335,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeARLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Descriptor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -6862,92 +6346,246 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDescriptor (Deprecated) - -- (void)readAttributeDeviceListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeDeviceTypeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeDeviceListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDeviceTypeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDeviceListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeDeviceTypeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeServerListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeServerListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeServerListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeServerListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeServerListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeServerListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClientListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClientListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterAccessControl (Deprecated) + +- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACLWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -6956,30 +6594,38 @@ - (void)subscribeAttributeClientListWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClientListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClientListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClientListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePartsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartsListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeExtensionWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExtensionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeExtensionWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -6991,21 +6637,126 @@ - (void)subscribeAttributePartsListWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartsListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeExtensionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributePartsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartsListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeExtensionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } +- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSubjectsPerAccessControlEntryWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSubjectsPerAccessControlEntryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetsPerAccessControlEntryWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTargetsPerAccessControlEntryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetsPerAccessControlEntryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAccessControlEntriesPerFabricWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAccessControlEntriesPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAccessControlEntriesPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeGeneratedCommandListWithCompletion: @@ -7190,125 +6941,421 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterBinding +@implementation MTRBaseClusterActions -- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRActionsClusterInstantActionParams + alloc] init]; + } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBindingWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::InstantAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + if (params == nil) { + params = [[MTRActionsClusterInstantActionWithTransitionParams + alloc] init]; + } - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; - ListFreer listFreer; - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRBindingClusterTargetStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRBindingClusterTargetStruct *)value[i_0]; - if (element_0.node != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].node.Emplace(); - definedValue_2 = element_0.node.unsignedLongLongValue; - } - if (element_0.group != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].group.Emplace(); - definedValue_2 = element_0.group.unsignedShortValue; - } - if (element_0.endpoint != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].endpoint.Emplace(); - definedValue_2 = element_0.endpoint.unsignedShortValue; - } - if (element_0.cluster != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].cluster.Emplace(); - definedValue_2 = element_0.cluster.unsignedIntValue; - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + using RequestType = Actions::Commands::InstantActionWithTransition::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } - -- (void)subscribeAttributeBindingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRActionsClusterStartActionParams + alloc] init]; + } -+ (void)readAttributeBindingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Binding::Attributes::Binding::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + using RequestType = Actions::Commands::StartAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterStartActionWithDurationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::StartActionWithDuration::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterStopActionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::StopAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterPauseActionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::PauseAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterPauseActionWithDurationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::PauseActionWithDuration::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterResumeActionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::ResumeAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterEnableActionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::EnableAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterEnableActionWithDurationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::EnableActionWithDuration::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterDisableActionParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::DisableAction::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRActionsClusterDisableActionWithDurationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Actions::Commands::DisableActionWithDuration::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7320,7 +7367,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7331,7 +7378,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7344,7 +7391,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7356,7 +7403,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7367,7 +7414,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::EventList::TypeInfo; + using TypeInfo = Actions::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7380,7 +7427,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::EventList::TypeInfo; + using TypeInfo = Actions::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7392,7 +7439,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::EventList::TypeInfo; + using TypeInfo = Actions::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7403,7 +7450,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7416,7 +7463,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7428,7 +7475,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::AttributeList::TypeInfo; + using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7439,7 +7486,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7452,7 +7499,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7464,7 +7511,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7475,7 +7522,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7488,7 +7535,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7500,7 +7547,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Binding::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7511,63 +7558,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBinding (Deprecated) +@implementation MTRBaseClusterActions (Deprecated) -- (void)readAttributeBindingWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeBindingWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self instantActionWithParams:params completion: + completionHandler]; } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeBindingWithValue:value params:nil completion:completionHandler]; + [self instantActionWithTransitionWithParams:params completion: + completionHandler]; } -- (void)writeAttributeBindingWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeBindingWithValue:value params:params completion:completionHandler]; + [self startActionWithParams:params completion: + completionHandler]; } -- (void)subscribeAttributeBindingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBindingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self startActionWithDurationWithParams:params completion: + completionHandler]; } -+ (void)readAttributeBindingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeBindingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self stopActionWithParams:params completion: + completionHandler]; +} +- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithParams:params completion: + completionHandler]; +} +- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self pauseActionWithDurationWithParams:params completion: + completionHandler]; +} +- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resumeActionWithParams:params completion: + completionHandler]; +} +- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithParams:params completion: + completionHandler]; +} +- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enableActionWithDurationWithParams:params completion: + completionHandler]; +} +- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithParams:params completion: + completionHandler]; +} +- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self disableActionWithDurationWithParams:params completion: + completionHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActionListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: + [self readAttributeActionListWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -7576,33 +7641,138 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeActionListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeActionListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: + [self readAttributeEndpointListsWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEndpointListsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEndpointListsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSetupURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSetupURLWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSetupURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSetupURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -7740,171 +7910,53 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterAccessControl +@implementation MTRBaseClusterBasicInformation -- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion +{ + [self mfgSpecificPingWithParams:nil completion:completion]; +} +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRAccessControlClusterReviewFabricRestrictionsParams + params = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = AccessControl::Commands::ReviewFabricRestrictions::Type; + using RequestType = BasicInformation::Commands::MfgSpecificPing::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRAccessControlClusterReviewFabricRestrictionsResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACLWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRAccessControlClusterAccessControlEntryStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRAccessControlClusterAccessControlEntryStruct *)value[i_0]; - listHolder_0->mList[i_0].privilege = static_castmList[i_0].privilege)>>(element_0.privilege.unsignedCharValue); - listHolder_0->mList[i_0].authMode = static_castmList[i_0].authMode)>>(element_0.authMode.unsignedCharValue); - if (element_0.subjects == nil) { - listHolder_0->mList[i_0].subjects.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].subjects.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.subjects.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.subjects.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.subjects.count; ++i_3) { - if ( ! [element_0.subjects[i_3] isKindOfClass: [NSNumber class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (NSNumber *)element_0.subjects[i_3]; - listHolder_3->mList[i_3] = element_3.unsignedLongLongValue; - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.subjects.count); - } else { - nonNullValue_2 = ListType_3(); - } - } - } - if (element_0.targets == nil) { - listHolder_0->mList[i_0].targets.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].targets.SetNonNull(); - { - using ListType_3 = std::remove_reference_t; - using ListMemberType_3 = ListMemberTypeGetter::Type; - if (element_0.targets.count != 0) { - auto * listHolder_3 = new ListHolder(element_0.targets.count); - if (listHolder_3 == nullptr || listHolder_3->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_3); - for (size_t i_3 = 0; i_3 < element_0.targets.count; ++i_3) { - if ( ! [element_0.targets[i_3] isKindOfClass: [MTRAccessControlClusterAccessControlTargetStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_3 = (MTRAccessControlClusterAccessControlTargetStruct *)element_0.targets[i_3]; - if (element_3.cluster == nil) { - listHolder_3->mList[i_3].cluster.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].cluster.SetNonNull(); - nonNullValue_5 = element_3.cluster.unsignedIntValue; - } - if (element_3.endpoint == nil) { - listHolder_3->mList[i_3].endpoint.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].endpoint.SetNonNull(); - nonNullValue_5 = element_3.endpoint.unsignedShortValue; - } - if (element_3.deviceType == nil) { - listHolder_3->mList[i_3].deviceType.SetNull(); - } else { - auto & nonNullValue_5 = listHolder_3->mList[i_3].deviceType.SetNonNull(); - nonNullValue_5 = element_3.deviceType.unsignedIntValue; - } - } - nonNullValue_2 = ListType_3(listHolder_3->mList, element_0.targets.count); - } else { - nonNullValue_2 = ListType_3(); - } - } - } - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -7914,9 +7966,9 @@ - (void)subscribeAttributeACLWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDataModelRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Acl::TypeInfo; + using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -7925,72 +7977,22 @@ + (void)readAttributeACLWithClusterStateCache:(MTRClusterStateCacheContainer *)c completion:completion]; } -- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeExtensionWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRAccessControlClusterAccessControlExtensionStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRAccessControlClusterAccessControlExtensionStruct *)value[i_0]; - listHolder_0->mList[i_0].data = AsByteSpan(element_0.data); - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8000,9 +8002,9 @@ - (void)subscribeAttributeExtensionWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Extension::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8011,9 +8013,9 @@ + (void)readAttributeExtensionWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8022,11 +8024,11 @@ - (void)readAttributeSubjectsPerAccessControlEntryWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8036,9 +8038,9 @@ - (void)subscribeAttributeSubjectsPerAccessControlEntryWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::SubjectsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8047,9 +8049,9 @@ + (void)readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8058,11 +8060,11 @@ - (void)readAttributeTargetsPerAccessControlEntryWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8072,9 +8074,9 @@ - (void)subscribeAttributeTargetsPerAccessControlEntryWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::TargetsPerAccessControlEntry::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8083,9 +8085,9 @@ + (void)readAttributeTargetsPerAccessControlEntryWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8094,11 +8096,11 @@ - (void)readAttributeAccessControlEntriesPerFabricWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8108,9 +8110,9 @@ - (void)subscribeAttributeAccessControlEntriesPerFabricWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AccessControlEntriesPerFabric::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8119,9 +8121,9 @@ + (void)readAttributeAccessControlEntriesPerFabricWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeCommissioningARLWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; + using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8130,11 +8132,39 @@ - (void)readAttributeCommissioningARLWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeCommissioningARLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8144,9 +8174,9 @@ - (void)subscribeAttributeCommissioningARLWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCommissioningARLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::CommissioningARL::TypeInfo; + using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8155,22 +8185,50 @@ + (void)readAttributeCommissioningARLWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeARLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; + using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeARLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; + [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8180,9 +8238,9 @@ - (void)subscribeAttributeARLWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeARLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::Arl::TypeInfo; + using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8191,9 +8249,9 @@ + (void)readAttributeARLWithClusterStateCache:(MTRClusterStateCacheContainer *)c completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8202,11 +8260,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8216,9 +8274,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8227,9 +8285,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8238,11 +8296,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8252,9 +8310,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8263,9 +8321,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8274,11 +8332,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8288,9 +8346,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8299,9 +8357,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8310,11 +8368,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8324,9 +8382,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8335,9 +8393,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8346,11 +8404,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8360,9 +8418,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8371,9 +8429,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8382,11 +8440,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -8396,9 +8454,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccessControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -8407,704 +8465,314 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterAccessControl (Deprecated) - -- (void)readAttributeAclWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeACLWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeACLWithValue:value params:nil completion:completionHandler]; + using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeAclWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeACLWithValue:value params:params completion:completionHandler]; + using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAclWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAclWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeACLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeExtensionWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeExtensionWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeExtensionWithValue:value params:nil completion:completionHandler]; + using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeExtensionWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeExtensionWithValue:value params:params completion:completionHandler]; + using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeExtensionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeExtensionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeExtensionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeExtensionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeSubjectsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeSubjectsPerAccessControlEntryWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeSubjectsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSubjectsPerAccessControlEntryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSubjectsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSubjectsPerAccessControlEntryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTargetsPerAccessControlEntryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTargetsPerAccessControlEntryWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTargetsPerAccessControlEntryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTargetsPerAccessControlEntryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTargetsPerAccessControlEntryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTargetsPerAccessControlEntryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAccessControlEntriesPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAccessControlEntriesPerFabricWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAccessControlEntriesPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAccessControlEntriesPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAccessControlEntriesPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAccessControlEntriesPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterActions - -- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterInstantActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::InstantAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterInstantActionWithTransitionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::InstantActionWithTransition::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterStartActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::StartAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterStartActionWithDurationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::StartActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterStopActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::StopAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterPauseActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::PauseAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterPauseActionWithDurationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::PauseActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterResumeActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::ResumeAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterEnableActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::EnableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterEnableActionWithDurationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::EnableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterDisableActionParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::DisableAction::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRActionsClusterDisableActionWithDurationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Actions::Commands::DisableActionWithDuration::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeActionListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeActionListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Actions::Attributes::ActionList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Actions::Attributes::ActionList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9113,9 +8781,9 @@ + (void)readAttributeActionListWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9124,11 +8792,11 @@ - (void)readAttributeEndpointListsWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9138,9 +8806,9 @@ - (void)subscribeAttributeEndpointListsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::EndpointLists::TypeInfo; + using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9149,9 +8817,9 @@ + (void)readAttributeEndpointListsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9160,11 +8828,11 @@ - (void)readAttributeSetupURLWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9174,9 +8842,9 @@ - (void)subscribeAttributeSetupURLWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::SetupURL::TypeInfo; + using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9187,7 +8855,7 @@ + (void)readAttributeSetupURLWithClusterStateCache:(MTRClusterStateCacheContaine - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9200,7 +8868,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9212,7 +8880,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9223,7 +8891,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9236,7 +8904,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9248,7 +8916,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9259,7 +8927,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9272,7 +8940,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9284,7 +8952,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::EventList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9295,7 +8963,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9308,7 +8976,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9320,7 +8988,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::AttributeList::TypeInfo; + using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9331,7 +8999,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9344,7 +9012,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9356,7 +9024,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9367,7 +9035,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9380,7 +9048,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -9392,7 +9060,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Actions::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -9403,81 +9071,68 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterActions (Deprecated) +@implementation MTRBaseClusterBasic +@end -- (void)instantActionWithParams:(MTRActionsClusterInstantActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +@implementation MTRBaseClusterBasic (Deprecated) + +- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self instantActionWithParams:params completion: - completionHandler]; + [self mfgSpecificPingWithParams:params completion: + completionHandler]; } -- (void)instantActionWithTransitionWithParams:(MTRActionsClusterInstantActionWithTransitionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self instantActionWithTransitionWithParams:params completion: - completionHandler]; -} -- (void)startActionWithParams:(MTRActionsClusterStartActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self startActionWithParams:params completion: - completionHandler]; -} -- (void)startActionWithDurationWithParams:(MTRActionsClusterStartActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self startActionWithDurationWithParams:params completion: - completionHandler]; -} -- (void)stopActionWithParams:(MTRActionsClusterStopActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopActionWithParams:params completion: - completionHandler]; -} -- (void)pauseActionWithParams:(MTRActionsClusterPauseActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self pauseActionWithParams:params completion: - completionHandler]; -} -- (void)pauseActionWithDurationWithParams:(MTRActionsClusterPauseActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self pauseActionWithDurationWithParams:params completion: - completionHandler]; -} -- (void)resumeActionWithParams:(MTRActionsClusterResumeActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self resumeActionWithParams:params completion: - completionHandler]; -} -- (void)enableActionWithParams:(MTRActionsClusterEnableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enableActionWithParams:params completion: - completionHandler]; + [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; } -- (void)enableActionWithDurationWithParams:(MTRActionsClusterEnableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self enableActionWithDurationWithParams:params completion: - completionHandler]; + [self readAttributeDataModelRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)disableActionWithParams:(MTRActionsClusterDisableActionParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self disableActionWithParams:params completion: - completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDataModelRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithDurationParams *)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self disableActionWithDurationWithParams:params completion: - completionHandler]; + [self readAttributeDataModelRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeActionListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActionListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9486,33 +9141,33 @@ - (void)subscribeAttributeActionListWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActionListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeActionListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActionListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeEndpointListsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEndpointListsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorIDWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9521,33 +9176,33 @@ - (void)subscribeAttributeEndpointListsWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEndpointListsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEndpointListsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEndpointListsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSetupURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSetupURLWithCompletion: + [self readAttributeProductNameWithCompletion: ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9556,33 +9211,33 @@ - (void)subscribeAttributeSetupURLWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSetupURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSetupURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetupURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeProductIDWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9591,33 +9246,41 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeNodeLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9626,33 +9289,41 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeLocationWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9661,33 +9332,33 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLocationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLocationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: + [self readAttributeHardwareVersionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -9696,30 +9367,65 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeHardwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributeHardwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -9731,660 +9437,641 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeSoftwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterBasicInformation - -- (void)mfgSpecificPingWithCompletion:(MTRStatusCompletion)completion +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self mfgSpecificPingWithParams:nil completion:completion]; + [self readAttributeSoftwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRBasicClusterMfgSpecificPingParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BasicInformation::Commands::MfgSpecificPing::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDataModelRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeDataModelRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeManufacturingDateWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDataModelRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::DataModelRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePartNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::VendorName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeProductURLWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::VendorID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeProductLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ProductName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeSerialNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ProductID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self readAttributeLocalConfigDisabledWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeLocalConfigDisabledWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLocalConfigDisabledWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::NodeLabel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLocalConfigDisabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLocationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLocalConfigDisabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeLocationWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self readAttributeReachableWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReachableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLocationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::Location::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeUniqueIDWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeCapabilityMinimaWithCompletion: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCapabilityMinimaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCapabilityMinimaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::HardwareVersionString::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::SoftwareVersionString::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ManufacturingDate::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::PartNumber::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = BasicInformation::Attributes::ProductURL::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterOTASoftwareUpdateProvider + +- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROTASoftwareUpdateProviderClusterQueryImageResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams + alloc] init]; + } -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = BasicInformation::Attributes::ProductLabel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10393,11 +10080,11 @@ - (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable v completion:completion]; } -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10407,9 +10094,9 @@ - (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10418,9 +10105,9 @@ + (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10429,39 +10116,11 @@ - (void)readAttributeLocalConfigDisabledWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10471,9 +10130,9 @@ - (void)subscribeAttributeLocalConfigDisabledWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::LocalConfigDisabled::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10482,9 +10141,9 @@ + (void)readAttributeLocalConfigDisabledWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10493,11 +10152,11 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10507,9 +10166,9 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10518,9 +10177,9 @@ + (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10529,11 +10188,11 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10543,9 +10202,9 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10554,9 +10213,9 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10565,11 +10224,11 @@ - (void)readAttributeCapabilityMinimaWithCompletion:(void (^)(MTRBasicInformatio completion:completion]; } -- (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10579,9 +10238,9 @@ - (void)subscribeAttributeCapabilityMinimaWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::CapabilityMinima::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10590,9 +10249,9 @@ + (void)readAttributeCapabilityMinimaWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10601,11 +10260,11 @@ - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBasicInformati completion:completion]; } -- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10615,9 +10274,9 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10626,34 +10285,325 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeSpecificationVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} +@end -- (void)subscribeAttributeSpecificationVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterOtaSoftwareUpdateProvider +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) + +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) + [self queryImageWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self applyUpdateRequestWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self notifyUpdateAppliedWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterOTASoftwareUpdateRequestor + +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTROTASoftwareUpdateRequestorClusterProviderLocation class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTROTASoftwareUpdateRequestorClusterProviderLocation *)value[i_0]; + listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; + listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) params:params queue:self.callbackQueue reportHandler:reportHandler subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::SpecificationVersion::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10662,9 +10612,9 @@ + (void)readAttributeSpecificationVersionWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10673,11 +10623,11 @@ - (void)readAttributeMaxPathsPerInvokeWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10687,9 +10637,81 @@ - (void)subscribeAttributeMaxPathsPerInvokeWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::MaxPathsPerInvoke::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10700,7 +10722,7 @@ + (void)readAttributeMaxPathsPerInvokeWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10713,7 +10735,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10725,7 +10747,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10736,7 +10758,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10749,7 +10771,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10761,7 +10783,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10772,7 +10794,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10785,7 +10807,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10797,7 +10819,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10808,7 +10830,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10821,7 +10843,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10833,7 +10855,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10844,7 +10866,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10857,7 +10879,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10869,7 +10891,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10880,7 +10902,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10893,7 +10915,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -10905,7 +10927,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BasicInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -10916,33 +10938,37 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBasic +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor @end -@implementation MTRBaseClusterBasic (Deprecated) +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) -- (void)mfgSpecificPingWithParams:(MTRBasicClusterMfgSpecificPingParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self mfgSpecificPingWithParams:params completion: - completionHandler]; + [self announceOTAProviderWithParams:params completion: + completionHandler]; } -- (void)mfgSpecificPingWithCompletionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self mfgSpecificPingWithParams:nil completionHandler:completionHandler]; + [self readAttributeDefaultOTAProvidersWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDataModelRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeDataModelRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeDefaultOTAProvidersWithValue:value params:nil completion:completionHandler]; } -- (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultOTAProvidersWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -10951,33 +10977,33 @@ - (void)subscribeAttributeDataModelRevisionWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDataModelRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeDefaultOTAProvidersWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDataModelRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDataModelRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeDefaultOTAProvidersWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeUpdatePossibleWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -10986,68 +11012,33 @@ - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUpdatePossibleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUpdatePossibleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorIDWithCompletion: + [self readAttributeUpdateStateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11056,33 +11047,33 @@ - (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeUpdateStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeUpdateStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductIDWithCompletion: + [self readAttributeUpdateStateProgressWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11091,41 +11082,33 @@ - (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUpdateStateProgressWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUpdateStateProgressWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNodeLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11134,41 +11117,33 @@ - (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLocationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLocationWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLocationWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11177,33 +11152,33 @@ - (void)subscribeAttributeLocationWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLocationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLocationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLocationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11212,33 +11187,33 @@ - (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeHardwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11247,30 +11222,30 @@ - (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSoftwareVersionWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -11282,321 +11257,372 @@ - (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSoftwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +@end + +@implementation MTRBaseClusterLocalizationConfiguration + +- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeManufacturingDateWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePartNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductURLWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSerialNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLocalConfigDisabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLocalConfigDisabledWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeLocalConfigDisabledWithValue:value params:nil completion:completionHandler]; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeLocalConfigDisabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeLocalConfigDisabledWithValue:value params:params completion:completionHandler]; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLocalConfigDisabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLocalConfigDisabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLocalConfigDisabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLocalConfigDisabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeReachableWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReachableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeUniqueIDWithCompletion: + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) + +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveLocaleWithCompletion: ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveLocaleWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveLocaleWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11605,33 +11631,33 @@ - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeActiveLocaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeActiveLocaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCapabilityMinimaWithCompletion: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeSupportedLocalesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -11640,18 +11666,18 @@ - (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCapabilityMinimaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeSupportedLocalesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCapabilityMinimaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeSupportedLocalesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } @@ -11839,97 +11865,52 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOTASoftwareUpdateProvider +@implementation MTRBaseClusterTimeFormatLocalization -- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROTASoftwareUpdateProviderClusterQueryImageResponseParams.class + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -11939,9 +11920,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -11950,9 +11931,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -11961,11 +11942,39 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -11975,9 +11984,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -11986,9 +11995,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -11997,11 +12006,119 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12013,7 +12130,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12024,7 +12141,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12037,7 +12154,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12049,7 +12166,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12060,7 +12177,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12073,7 +12190,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12085,7 +12202,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12096,7 +12213,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12109,7 +12226,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12121,7 +12238,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12132,31 +12249,127 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOtaSoftwareUpdateProvider -@end +@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) -@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHourFormatWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHourFormatWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHourFormatWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHourFormatWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHourFormatWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self queryImageWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeActiveCalendarTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self applyUpdateRequestWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self writeAttributeActiveCalendarTypeWithValue:value params:nil completion:completionHandler]; } -- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self notifyUpdateAppliedWithParams:params completion: - completionHandler]; + [self writeAttributeActiveCalendarTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveCalendarTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCalendarTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedCalendarTypesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedCalendarTypesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedCalendarTypesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -12343,49 +12556,24 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOTASoftwareUpdateRequestor - -- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterUnitLocalization -- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -12400,151 +12588,20 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value par } ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTROTASoftwareUpdateRequestorClusterProviderLocation class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROTASoftwareUpdateRequestorClusterProviderLocation *)value[i_0]; - listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; - listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12554,9 +12611,9 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12567,7 +12624,7 @@ + (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12580,7 +12637,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12592,7 +12649,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12603,7 +12660,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12616,7 +12673,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12628,7 +12685,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12639,7 +12696,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12652,7 +12709,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12664,7 +12721,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12675,7 +12732,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12688,7 +12745,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12700,7 +12757,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12711,7 +12768,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12724,7 +12781,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12736,7 +12793,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12747,7 +12804,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12760,7 +12817,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -12772,7 +12829,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -12783,142 +12840,28 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor -@end - -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) +@implementation MTRBaseClusterUnitLocalization (Deprecated) -- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self announceOTAProviderWithParams:params completion: - completionHandler]; + [self readAttributeTemperatureUnitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeDefaultOTAProvidersWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeTemperatureUnitWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeDefaultOTAProvidersWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDefaultOTAProvidersWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDefaultOTAProvidersWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDefaultOTAProvidersWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUpdatePossibleWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUpdatePossibleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUpdatePossibleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUpdateStateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUpdateStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUpdateStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUpdateStateProgressWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeTemperatureUnitWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -12927,19 +12870,19 @@ - (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUpdateStateProgressWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureUnitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpdateStateProgressWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureUnitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -13126,75 +13069,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterLocalizationConfiguration - -- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterPowerSourceConfiguration -- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13203,11 +13082,11 @@ - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13217,9 +13096,9 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13230,7 +13109,7 @@ + (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13243,7 +13122,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13255,7 +13134,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13266,7 +13145,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13279,7 +13158,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13291,7 +13170,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13302,7 +13181,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13315,7 +13194,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13327,7 +13206,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13338,7 +13217,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13351,7 +13230,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13363,7 +13242,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13374,7 +13253,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13387,7 +13266,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13399,7 +13278,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13410,7 +13289,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13423,7 +13302,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13435,7 +13314,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13446,63 +13325,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) - -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveLocaleWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveLocaleWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveLocaleWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveLocaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveLocaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) -- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedLocalesWithCompletion: + [self readAttributeSourcesWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -13511,19 +13347,19 @@ - (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSupportedLocalesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSourcesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedLocalesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSourcesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -13710,11 +13546,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterTimeFormatLocalization +@implementation MTRBaseClusterPowerSource -- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13723,39 +13559,47 @@ - (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); ++ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13765,9 +13609,9 @@ - (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13776,9 +13620,9 @@ + (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13787,39 +13631,83 @@ - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); +- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13829,9 +13717,9 @@ - (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13840,9 +13728,9 @@ + (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13851,11 +13739,11 @@ - (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _N completion:completion]; } -- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13865,9 +13753,9 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13876,9 +13764,9 @@ + (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13887,11 +13775,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13901,9 +13789,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13912,9 +13800,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13923,11 +13811,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13937,9 +13825,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13948,9 +13836,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13959,11 +13847,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13973,9 +13861,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13984,9 +13872,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13995,11 +13883,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14009,9 +13897,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14020,9 +13908,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14031,11 +13919,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14045,9 +13933,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14056,9 +13944,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14067,11 +13955,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14081,9 +13969,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14092,320 +13980,333 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) - -- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeHourFormatWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeHourFormatWithValue:value params:nil completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeHourFormatWithValue:value params:params completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHourFormatWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeHourFormatWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveCalendarTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeActiveCalendarTypeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeActiveCalendarTypeWithValue:value params:params completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveCalendarTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveCalendarTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSupportedCalendarTypesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedCalendarTypesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSupportedCalendarTypesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterUnitLocalization - -- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14414,39 +14315,47 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); ++ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14456,9 +14365,9 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14467,9 +14376,9 @@ + (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14478,11 +14387,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14492,9 +14401,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14503,9 +14412,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14514,11 +14423,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14528,9 +14437,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14539,9 +14448,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14550,11 +14459,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14564,9 +14473,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14575,9 +14484,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14586,11 +14495,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14600,9 +14509,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14611,9 +14520,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14622,11 +14531,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14636,9 +14545,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14647,9 +14556,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14658,11 +14567,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14672,9 +14581,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14683,242 +14592,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterUnitLocalization (Deprecated) - -- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureUnitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeTemperatureUnitWithValue:value params:nil completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeTemperatureUnitWithValue:value params:params completion:completionHandler]; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureUnitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTemperatureUnitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterPowerSourceConfiguration - -- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14927,11 +14675,11 @@ - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14941,9 +14689,9 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14954,7 +14702,7 @@ + (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14967,7 +14715,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14979,7 +14727,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14990,7 +14738,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15003,7 +14751,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15015,7 +14763,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15026,7 +14774,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15039,7 +14787,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15051,7 +14799,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15062,7 +14810,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15075,7 +14823,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15087,7 +14835,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15098,7 +14846,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15111,7 +14859,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15123,7 +14871,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15134,7 +14882,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15147,7 +14895,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15159,7 +14907,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15170,20 +14918,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) +@implementation MTRBaseClusterPowerSource (Deprecated) -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSourcesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15192,33 +14940,33 @@ - (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSourcesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSourcesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOrderWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15227,33 +14975,33 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOrderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOrderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15262,33 +15010,33 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeWiredAssessedInputVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15297,33 +15045,33 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeWiredAssessedInputVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeWiredAssessedInputVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: + [self readAttributeWiredAssessedInputFrequencyWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15332,33 +15080,33 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeWiredAssessedInputFrequencyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeWiredAssessedInputFrequencyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributeWiredCurrentTypeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -15367,1032 +15115,1239 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeWiredCurrentTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeWiredCurrentTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeWiredAssessedCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterPowerSource - -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredAssessedCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredAssessedCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredNominalVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredNominalVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredNominalVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredMaximumCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredMaximumCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredMaximumCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredPresentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredPresentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredPresentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveWiredFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveWiredFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveWiredFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatPercentRemainingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatPercentRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatPercentRemainingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatTimeRemainingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatTimeRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatTimeRemainingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatChargeLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatChargeLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatChargeLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplacementNeededWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplacementNeededWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplacementNeededWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplaceabilityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplaceabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplaceabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatPresentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatPresentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatPresentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveBatFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveBatFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveBatFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplacementDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplacementDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplacementDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatCommonDesignationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatCommonDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatCommonDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatANSIDesignationWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatANSIDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatANSIDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatIECDesignationWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatIECDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatIECDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatApprovedChemistryWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatApprovedChemistryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatApprovedChemistryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatCapacityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatQuantityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatQuantityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatQuantityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatChargeStateWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatChargeStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatChargeStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatTimeToFullChargeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatTimeToFullChargeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatTimeToFullChargeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatFunctionalWhileChargingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatFunctionalWhileChargingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatFunctionalWhileChargingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatChargingCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatChargingCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatChargingCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveBatChargeFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveBatChargeFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveBatChargeFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterGeneralCommissioning + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterArmFailSafeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterArmFailSafeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)commissioningCompleteWithCompletion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self commissioningCompleteWithParams:nil completion:completion]; +} +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterCommissioningCompleteResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setTCAcknowledgementsWithParams:(MTRGeneralCommissioningClusterSetTCAcknowledgementsParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterSetTCAcknowledgementsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::SetTCAcknowledgements::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue reportHandler:reportHandler subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16401,9 +16356,9 @@ + (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16412,11 +16367,11 @@ - (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16426,9 +16381,9 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16437,9 +16392,9 @@ + (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16448,11 +16403,47 @@ - (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16462,9 +16453,9 @@ - (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16473,9 +16464,9 @@ + (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16484,11 +16475,11 @@ - (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nu completion:completion]; } -- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16498,9 +16489,9 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16509,9 +16500,9 @@ + (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTCAcceptedVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16520,11 +16511,11 @@ - (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable va completion:completion]; } -- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTCAcceptedVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16534,9 +16525,117 @@ - (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTCAcceptedVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTCMinRequiredVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTCMinRequiredVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTCMinRequiredVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTCAcknowledgementsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTCAcknowledgementsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTCAcknowledgementsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTCAcknowledgementsRequiredWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTCAcknowledgementsRequiredWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTCAcknowledgementsRequiredWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16547,7 +16646,7 @@ + (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16560,7 +16659,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16572,7 +16671,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16583,7 +16682,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16596,7 +16695,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16608,7 +16707,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16619,7 +16718,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16632,7 +16731,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16644,7 +16743,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16655,7 +16754,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16668,7 +16767,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16680,7 +16779,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16691,7 +16790,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16704,7 +16803,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16716,7 +16815,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16727,7 +16826,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16740,7 +16839,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16752,7 +16851,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16763,125 +16862,57 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterPowerSource (Deprecated) +@implementation MTRBaseClusterGeneralCommissioning (Deprecated) -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self armFailSafeWithParams:params completion: + ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeOrderWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self setRegulatoryConfigWithParams:params completion: + ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOrderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self commissioningCompleteWithParams:params completion: + ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -+ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeOrderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeBreadcrumbWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBreadcrumbWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeWiredAssessedInputVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeBreadcrumbWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -16890,33 +16921,33 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedInputVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBreadcrumbWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBreadcrumbWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputFrequencyWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBasicCommissioningInfoWithCompletion: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -16925,30 +16956,30 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedInputFrequencyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBasicCommissioningInfoWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputFrequencyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBasicCommissioningInfoWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredCurrentTypeWithCompletion: + [self readAttributeRegulatoryConfigWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -16960,33 +16991,33 @@ - (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredCurrentTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeRegulatoryConfigWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredCurrentTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeRegulatoryConfigWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedCurrentWithCompletion: + [self readAttributeLocationCapabilityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -16995,33 +17026,33 @@ - (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLocationCapabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLocationCapabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredNominalVoltageWithCompletion: + [self readAttributeSupportsConcurrentConnectionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17030,33 +17061,33 @@ - (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredNominalVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSupportsConcurrentConnectionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredNominalVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSupportsConcurrentConnectionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredMaximumCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17065,33 +17096,33 @@ - (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredMaximumCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredMaximumCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredPresentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17100,33 +17131,33 @@ - (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredPresentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredPresentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveWiredFaultsWithCompletion: + [self readAttributeAttributeListWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17135,30 +17166,30 @@ - (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveWiredFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveWiredFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatVoltageWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -17170,33 +17201,33 @@ - (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatPercentRemainingWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17205,691 +17236,1226 @@ - (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatPercentRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatPercentRemainingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBatTimeRemainingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatTimeRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeBatTimeRemainingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterNetworkCommissioning + +- (void)scanNetworksWithCompletion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeBatChargeLevelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self scanNetworksWithParams:nil completion:completion]; } -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRNetworkCommissioningClusterScanNetworksParams + alloc] init]; } - [self subscribeAttributeBatChargeLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterScanNetworksResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeBatChargeLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams + alloc] init]; + } -- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBatReplacementNeededWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams + alloc] init]; } - [self subscribeAttributeBatReplacementNeededWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeBatReplacementNeededWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRNetworkCommissioningClusterRemoveNetworkParams + alloc] init]; + } -- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBatReplaceabilityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRNetworkCommissioningClusterConnectNetworkParams + alloc] init]; } - [self subscribeAttributeBatReplaceabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterConnectNetworkResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeBatReplaceabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRNetworkCommissioningClusterReorderNetworkParams + alloc] init]; + } -- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBatPresentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRNetworkCommissioningClusterQueryIdentityParams + alloc] init]; } - [self subscribeAttributeBatPresentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatPresentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveBatFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveBatFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveBatFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatReplacementDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatReplacementDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplacementDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatCommonDesignationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatCommonDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCommonDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatANSIDesignationWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatANSIDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatANSIDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeBatIECDesignationWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatIECDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatIECDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatApprovedChemistryWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatApprovedChemistryWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatApprovedChemistryWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCapacityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatQuantityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatQuantityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatQuantityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatChargeStateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatChargeStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatChargeStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatTimeToFullChargeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatTimeToFullChargeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatTimeToFullChargeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatFunctionalWhileChargingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatFunctionalWhileChargingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatFunctionalWhileChargingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatChargingCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatChargingCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBatChargingCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveBatChargeFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveBatChargeFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveBatChargeFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterNetworkCommissioning (Deprecated) + +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self scanNetworksWithParams:params completion: + ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addOrUpdateWiFiNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addOrUpdateThreadNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self connectNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self reorderNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxNetworksWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxNetworksWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxNetworksWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworksWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNetworksWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworksWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScanMaxTimeSecondsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScanMaxTimeSecondsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScanMaxTimeSecondsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConnectMaxTimeSecondsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeConnectMaxTimeSecondsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConnectMaxTimeSecondsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInterfaceEnabledWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInterfaceEnabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInterfaceEnabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLastNetworkingStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkIDWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLastNetworkIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConnectErrorValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLastConnectErrorValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastConnectErrorValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } @@ -18034,12 +18600,12 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterGeneralCommissioning +@implementation MTRBaseClusterDiagnosticLogs -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRGeneralCommissioningClusterArmFailSafeParams + params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; } @@ -18049,97 +18615,21 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; + using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterArmFailSafeResponseParams.class + responseClass:MTRDiagnosticLogsClusterRetrieveLogsResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)commissioningCompleteWithCompletion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self commissioningCompleteWithParams:nil completion:completion]; -} -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterCommissioningCompleteResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setTCAcknowledgementsWithParams:(MTRGeneralCommissioningClusterSetTCAcknowledgementsParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGeneralCommissioningClusterSetTCAcknowledgementsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralCommissioning::Commands::SetTCAcknowledgements::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18148,39 +18638,11 @@ - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18190,9 +18652,9 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18201,9 +18663,9 @@ + (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18212,11 +18674,11 @@ - (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCo completion:completion]; } -- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18226,9 +18688,9 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18237,9 +18699,9 @@ + (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18248,11 +18710,11 @@ - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18262,9 +18724,9 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18273,9 +18735,9 @@ + (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18284,11 +18746,11 @@ - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18298,9 +18760,9 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18309,9 +18771,9 @@ + (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18320,11 +18782,11 @@ - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18334,9 +18796,9 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18345,9 +18807,9 @@ + (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeTCAcceptedVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18356,11 +18818,11 @@ - (void)readAttributeTCAcceptedVersionWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeTCAcceptedVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18370,9 +18832,9 @@ - (void)subscribeAttributeTCAcceptedVersionWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTCAcceptedVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcceptedVersion::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18381,9 +18843,285 @@ + (void)readAttributeTCAcceptedVersionWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeTCMinRequiredVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterDiagnosticLogs (Deprecated) + +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + [self retrieveLogsRequestWithParams:params completion: + ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterGeneralDiagnostics + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)timeSnapshotWithCompletion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self timeSnapshotWithParams:nil completion:completion]; +} +- (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * _Nullable)params completion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)payloadTestRequestWithParams:(MTRGeneralDiagnosticsClusterPayloadTestRequestParams *)params completion:(void (^)(MTRGeneralDiagnosticsClusterPayloadTestResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralDiagnosticsClusterPayloadTestRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralDiagnostics::Commands::PayloadTestRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralDiagnosticsClusterPayloadTestResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18392,11 +19130,11 @@ - (void)readAttributeTCMinRequiredVersionWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeTCMinRequiredVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18406,9 +19144,9 @@ - (void)subscribeAttributeTCMinRequiredVersionWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTCMinRequiredVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCMinRequiredVersion::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18417,9 +19155,9 @@ + (void)readAttributeTCMinRequiredVersionWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeTCAcknowledgementsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18428,11 +19166,11 @@ - (void)readAttributeTCAcknowledgementsWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeTCAcknowledgementsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18442,9 +19180,9 @@ - (void)subscribeAttributeTCAcknowledgementsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTCAcknowledgementsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgements::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18453,9 +19191,9 @@ + (void)readAttributeTCAcknowledgementsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeTCAcknowledgementsRequiredWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18464,11 +19202,11 @@ - (void)readAttributeTCAcknowledgementsRequiredWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeTCAcknowledgementsRequiredWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18478,9 +19216,225 @@ - (void)subscribeAttributeTCAcknowledgementsRequiredWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTCAcknowledgementsRequiredWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::TCAcknowledgementsRequired::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18491,7 +19445,7 @@ + (void)readAttributeTCAcknowledgementsRequiredWithClusterStateCache:(MTRCluster - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18504,7 +19458,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18516,7 +19470,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18527,7 +19481,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18540,7 +19494,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18552,7 +19506,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18563,7 +19517,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18576,7 +19530,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18588,7 +19542,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18599,7 +19553,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18612,7 +19566,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18624,7 +19578,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18635,7 +19589,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18648,7 +19602,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18660,7 +19614,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18671,7 +19625,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18684,7 +19638,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -18696,7 +19650,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -18707,57 +19661,26 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterGeneralCommissioning (Deprecated) +@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self armFailSafeWithParams:params completion: - ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self setRegulatoryConfigWithParams:params completion: - ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self commissioningCompleteWithParams:params completion: - ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; + [self testEventTriggerWithParams:params completion: + completionHandler]; } -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBreadcrumbWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeNetworkInterfacesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBreadcrumbWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBreadcrumbWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18766,33 +19689,33 @@ - (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBreadcrumbWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNetworkInterfacesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBreadcrumbWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNetworkInterfacesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBasicCommissioningInfoWithCompletion: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + [self readAttributeRebootCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18801,33 +19724,33 @@ - (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBasicCommissioningInfoWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRebootCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBasicCommissioningInfoWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRebootCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRegulatoryConfigWithCompletion: + [self readAttributeUpTimeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18836,33 +19759,33 @@ - (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRegulatoryConfigWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUpTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRegulatoryConfigWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUpTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLocationCapabilityWithCompletion: + [self readAttributeTotalOperationalHoursWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18871,33 +19794,33 @@ - (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLocationCapabilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocationCapabilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeTotalOperationalHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTotalOperationalHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportsConcurrentConnectionWithCompletion: + [self readAttributeBootReasonWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18906,30 +19829,30 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSupportsConcurrentConnectionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBootReasonWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportsConcurrentConnectionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBootReasonWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: + [self readAttributeActiveHardwareFaultsWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler @@ -18941,33 +19864,33 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeActiveHardwareFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeActiveHardwareFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: + [self readAttributeActiveRadioFaultsWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18976,13 +19899,153 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeActiveRadioFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveRadioFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveNetworkFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTestEventTriggersEnabledWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTestEventTriggersEnabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTestEventTriggersEnabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { @@ -19105,184 +20168,40 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterNetworkCommissioning - -- (void)scanNetworksWithCompletion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self scanNetworksWithParams:nil completion:completion]; -} -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterScanNetworksParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterScanNetworksResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterRemoveNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterConnectNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRBaseClusterSoftwareDiagnostics - using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterConnectNetworkResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRNetworkCommissioningClusterReorderNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self resetWatermarksWithParams:nil completion:completion]; } -- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRNetworkCommissioningClusterQueryIdentityParams + params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; + using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19291,11 +20210,11 @@ - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19305,9 +20224,9 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19316,9 +20235,9 @@ + (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19327,11 +20246,11 @@ - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19341,9 +20260,9 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19352,9 +20271,9 @@ + (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19363,11 +20282,11 @@ - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19377,9 +20296,9 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19388,9 +20307,9 @@ + (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19399,11 +20318,11 @@ - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19413,9 +20332,9 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19424,9 +20343,9 @@ + (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19435,39 +20354,11 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19477,9 +20368,9 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19488,9 +20379,9 @@ + (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19499,11 +20390,11 @@ - (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19513,9 +20404,9 @@ - (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19524,9 +20415,9 @@ + (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19535,11 +20426,11 @@ - (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable va completion:completion]; } -- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19549,9 +20440,9 @@ - (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19560,9 +20451,9 @@ + (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19571,11 +20462,11 @@ - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19585,9 +20476,9 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19596,9 +20487,9 @@ + (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19607,11 +20498,11 @@ - (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nulla completion:completion]; } -- (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19621,9 +20512,9 @@ - (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19632,9 +20523,9 @@ + (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19643,11 +20534,11 @@ - (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19657,9 +20548,9 @@ - (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19668,22 +20559,391 @@ + (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) + +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self resetWatermarksWithParams:params completion: + completionHandler]; +} +- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetWatermarksWithParams:nil completionHandler:completionHandler]; } -- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [self readAttributeThreadMetricsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeThreadMetricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeThreadMetricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapFreeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentHeapFreeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapFreeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapUsedWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentHeapUsedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapUsedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapHighWatermarkWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentHeapHighWatermarkWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHeapHighWatermarkWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterThreadNetworkDiagnostics + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +{ + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19693,9 +20953,9 @@ - (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19704,9 +20964,9 @@ + (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19715,11 +20975,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19729,9 +20989,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19740,9 +21000,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19751,11 +21011,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19765,9 +21025,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19776,9 +21036,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19787,11 +21047,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19801,9 +21061,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19812,9 +21072,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19823,11 +21083,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19837,9 +21097,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19848,9 +21108,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19859,11 +21119,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19873,9 +21133,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19884,9 +21144,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19895,11 +21155,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19909,9 +21169,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19920,561 +21180,621 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterNetworkCommissioning (Deprecated) - -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self scanNetworksWithParams:params completion: - ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self addOrUpdateWiFiNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + ++ (void)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self addOrUpdateThreadNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self removeNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self connectNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + ++ (void)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self reorderNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxNetworksWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxNetworksWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxNetworksWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNetworksWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNetworksWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNetworksWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeScanMaxTimeSecondsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeScanMaxTimeSecondsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeScanMaxTimeSecondsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeConnectMaxTimeSecondsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeConnectMaxTimeSecondsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeConnectMaxTimeSecondsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInterfaceEnabledWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeInterfaceEnabledWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeInterfaceEnabledWithValue:value params:params completion:completionHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInterfaceEnabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeInterfaceEnabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastNetworkingStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastNetworkingStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLastNetworkingStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastNetworkIDWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastNetworkIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLastNetworkIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastConnectErrorValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastConnectErrorValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLastConnectErrorValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterDiagnosticLogs - -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams - alloc] init]; - } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDiagnosticLogsClusterRetrieveLogsResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20483,11 +21803,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20497,9 +21817,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20508,9 +21828,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20519,11 +21839,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20533,9 +21853,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20544,9 +21864,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20555,11 +21875,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20569,9 +21889,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20580,9 +21900,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20591,11 +21911,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20605,9 +21925,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20616,9 +21936,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20627,11 +21947,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20641,9 +21961,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20652,9 +21972,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20663,11 +21983,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20677,9 +21997,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20688,285 +22008,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDiagnosticLogs (Deprecated) - -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self retrieveLogsRequestWithParams:params completion: - ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler +- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterGeneralDiagnostics - -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)timeSnapshotWithCompletion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self timeSnapshotWithParams:nil completion:completion]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * _Nullable)params completion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)payloadTestRequestWithParams:(MTRGeneralDiagnosticsClusterPayloadTestRequestParams *)params completion:(void (^)(MTRGeneralDiagnosticsClusterPayloadTestResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRGeneralDiagnosticsClusterPayloadTestRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralDiagnostics::Commands::PayloadTestRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralDiagnosticsClusterPayloadTestResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20975,11 +22091,11 @@ - (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20989,9 +22105,9 @@ - (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21000,9 +22116,9 @@ + (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21011,11 +22127,11 @@ - (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21025,9 +22141,9 @@ - (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21036,9 +22152,9 @@ + (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21047,11 +22163,11 @@ - (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21061,9 +22177,9 @@ - (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21072,9 +22188,9 @@ + (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21083,11 +22199,11 @@ - (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21097,9 +22213,9 @@ - (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21108,9 +22224,9 @@ + (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21119,11 +22235,11 @@ - (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21133,9 +22249,9 @@ - (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21144,9 +22260,9 @@ + (void)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21155,11 +22271,11 @@ - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21169,9 +22285,9 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21180,9 +22296,9 @@ + (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21191,11 +22307,11 @@ - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21205,9 +22321,9 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21216,9 +22332,9 @@ + (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21227,11 +22343,11 @@ - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21241,9 +22357,9 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21252,9 +22368,9 @@ + (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21263,11 +22379,11 @@ - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21277,9 +22393,9 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21288,9 +22404,9 @@ + (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21299,11 +22415,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21313,9 +22429,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21324,9 +22440,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21335,11 +22451,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21349,9 +22465,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21360,9 +22476,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21371,11 +22487,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21385,9 +22501,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21396,9 +22512,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21407,11 +22523,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21421,9 +22537,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21432,9 +22548,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21443,11 +22559,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21457,9 +22573,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21468,9 +22584,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21479,11 +22595,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -21493,9 +22609,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -21504,549 +22620,441 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) - -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self testEventTriggerWithParams:params completion: - completionHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeNetworkInterfacesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNetworkInterfacesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNetworkInterfacesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRebootCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRebootCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRebootCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeUpTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUpTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUpTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTotalOperationalHoursWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTotalOperationalHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTotalOperationalHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBootReasonWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBootReasonWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBootReasonWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveHardwareFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveHardwareFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveHardwareFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveRadioFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveRadioFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveRadioFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveNetworkFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveNetworkFaultsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveNetworkFaultsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTestEventTriggersEnabledWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTestEventTriggersEnabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTestEventTriggersEnabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -@end - -@implementation MTRBaseClusterSoftwareDiagnostics - -- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion +- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self resetWatermarksWithParams:nil completion:completion]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22055,11 +23063,11 @@ - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22069,9 +23077,9 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22080,9 +23088,9 @@ + (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22091,11 +23099,11 @@ - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22105,9 +23113,9 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22116,9 +23124,9 @@ + (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22127,11 +23135,11 @@ - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22141,9 +23149,9 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22152,9 +23160,9 @@ + (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22163,11 +23171,11 @@ - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22177,9 +23185,9 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22190,7 +23198,7 @@ + (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterSt - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22203,7 +23211,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22215,7 +23223,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22226,7 +23234,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22239,7 +23247,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22251,7 +23259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22262,7 +23270,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22275,7 +23283,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22287,7 +23295,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22298,7 +23306,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22311,7 +23319,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22323,7 +23331,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22334,7 +23342,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22347,7 +23355,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22359,7 +23367,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22370,7 +23378,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22383,7 +23391,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22395,7 +23403,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22406,30 +23414,30 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) +@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self resetWatermarksWithParams:params completion: - completionHandler]; + [self resetCountsWithParams:params completion: + completionHandler]; } -- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self resetWatermarksWithParams:nil completionHandler:completionHandler]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeThreadMetricsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeChannelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22438,33 +23446,33 @@ - (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeThreadMetricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeChannelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeThreadMetricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeChannelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapFreeWithCompletion: + [self readAttributeRoutingRoleWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22473,33 +23481,33 @@ - (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentHeapFreeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRoutingRoleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapFreeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRoutingRoleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapUsedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeNetworkNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22508,33 +23516,33 @@ - (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentHeapUsedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNetworkNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapUsedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNetworkNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapHighWatermarkWithCompletion: + [self readAttributePanIdWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22543,33 +23551,33 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _N subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentHeapHighWatermarkWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePanIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentHeapHighWatermarkWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePanIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeExtendedPanIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22578,33 +23586,33 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeExtendedPanIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeExtendedPanIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMeshLocalPrefixWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22613,33 +23621,68 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMeshLocalPrefixWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMeshLocalPrefixWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: + [self readAttributeOverrunCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeighborTableWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22648,33 +23691,33 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeNeighborTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeNeighborTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRouteTableWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22683,33 +23726,33 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeRouteTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeRouteTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributePartitionIdWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -22718,1864 +23761,2094 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self subscribeAttributePartitionIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributePartitionIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterThreadNetworkDiagnostics - -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self resetCountsWithParams:nil completion:completion]; + [self readAttributeWeightingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + [self subscribeAttributeWeightingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWeightingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeDataVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDataVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeDataVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeStableDataVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStableDataVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeStableDataVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLeaderRouterIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLeaderRouterIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLeaderRouterIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeDetachedRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDetachedRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeDetachedRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeChildRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeChildRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeChildRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeRouterRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRouterRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRouterRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLeaderRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLeaderRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLeaderRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttachAttemptCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttachAttemptCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttachAttemptCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePartitionIdChangeCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePartitionIdChangeCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributePartitionIdChangeCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeBetterPartitionAttachAttemptCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBetterPartitionAttachAttemptCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeParentChangeCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeParentChangeCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeParentChangeCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxTotalCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxTotalCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxTotalCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxUnicastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxUnicastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxUnicastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxBroadcastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBroadcastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxAckRequestedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxAckRequestedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxAckRequestedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxAckedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxAckedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxAckedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxNoAckRequestedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxNoAckRequestedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxNoAckRequestedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxDataCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDataCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDataCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxDataPollCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDataPollCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDataPollCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxBeaconCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBeaconCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBeaconCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTxBeaconRequestCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBeaconRequestCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBeaconRequestCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxOtherCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxRetryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxRetryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxRetryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDirectMaxRetryExpiryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxIndirectMaxRetryExpiryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxErrCcaCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxErrCcaCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxErrCcaCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxErrAbortCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxErrAbortCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxErrAbortCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxErrBusyChannelCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxErrBusyChannelCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxErrBusyChannelCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxTotalCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxTotalCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxTotalCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxUnicastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxUnicastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxUnicastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxBroadcastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxBroadcastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxDataCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxDataCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxDataCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxDataPollCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxDataPollCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxDataPollCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxBeaconCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxBeaconCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxBeaconCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxBeaconRequestCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxBeaconRequestCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxBeaconRequestCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxOtherCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxAddressFilteredCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxAddressFilteredCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxAddressFilteredCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxDestAddrFilteredCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxDestAddrFilteredCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxDestAddrFilteredCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxDuplicatedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxDuplicatedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxDuplicatedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrNoFrameCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrNoFrameCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrNoFrameCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrUnknownNeighborCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrUnknownNeighborCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrUnknownNeighborCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrInvalidSrcAddrCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrInvalidSrcAddrCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrSecCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrSecCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrSecCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrFcsCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrFcsCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrFcsCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRxErrOtherCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRxErrOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRxErrOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveTimestampWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributePendingTimestampWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePendingTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePendingTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeDelayWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeSecurityPolicyWithCompletion: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSecurityPolicyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeSecurityPolicyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeChannelPage0MaskWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeChannelPage0MaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelPage0MaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeOperationalDatasetComponentsWithCompletion: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOperationalDatasetComponentsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationalDatasetComponentsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveNetworkFaultsListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveNetworkFaultsListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveNetworkFaultsListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterWiFiNetworkDiagnostics + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +{ + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24584,11 +25857,11 @@ - (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24598,9 +25871,9 @@ - (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24609,9 +25882,9 @@ + (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24620,11 +25893,11 @@ - (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24634,9 +25907,9 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24645,9 +25918,9 @@ + (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24656,11 +25929,11 @@ - (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24670,9 +25943,9 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24681,9 +25954,9 @@ + (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24692,11 +25965,11 @@ - (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24706,9 +25979,9 @@ - (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24717,9 +25990,9 @@ + (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24728,11 +26001,11 @@ - (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24742,9 +26015,9 @@ - (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24753,9 +26026,9 @@ + (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24764,11 +26037,11 @@ - (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24778,9 +26051,9 @@ - (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24789,9 +26062,9 @@ + (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24800,11 +26073,11 @@ - (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24814,9 +26087,9 @@ - (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24825,9 +26098,9 @@ + (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24836,11 +26109,11 @@ - (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24850,9 +26123,9 @@ - (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24861,9 +26134,9 @@ + (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24872,11 +26145,11 @@ - (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24886,9 +26159,9 @@ - (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24897,9 +26170,9 @@ + (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24908,11 +26181,11 @@ - (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiag completion:completion]; } -- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24922,9 +26195,9 @@ - (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24933,9 +26206,9 @@ + (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24944,11 +26217,11 @@ - (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable completion:completion]; } -- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24958,9 +26231,9 @@ - (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24969,9 +26242,9 @@ + (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24980,11 +26253,11 @@ - (void)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThr completion:completion]; } -- (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24994,9 +26267,9 @@ - (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25005,9 +26278,9 @@ + (void)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25016,11 +26289,11 @@ - (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _ completion:completion]; } -- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25030,9 +26303,9 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25043,7 +26316,7 @@ + (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterSta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25056,7 +26329,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25068,7 +26341,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25079,7 +26352,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25092,7 +26365,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25104,7 +26377,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25115,7 +26388,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25128,7 +26401,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25140,7 +26413,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25151,7 +26424,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25164,7 +26437,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25176,7 +26449,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25187,7 +26460,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25200,7 +26473,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25212,7 +26485,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25223,7 +26496,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25236,7 +26509,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25248,7 +26521,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25259,9 +26532,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) +@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { [self resetCountsWithParams:params completion: completionHandler]; @@ -25271,18 +26544,18 @@ - (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler [self resetCountsWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBSSIDWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25291,33 +26564,33 @@ - (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChannelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBSSIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBSSIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRoutingRoleWithCompletion: + [self readAttributeSecurityTypeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25326,33 +26599,33 @@ - (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRoutingRoleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSecurityTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRoutingRoleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSecurityTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNetworkNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeWiFiVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25361,65 +26634,30 @@ - (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNetworkNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeWiFiVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNetworkNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeWiFiVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePanIdWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePanIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePanIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeExtendedPanIdWithCompletion: + [self readAttributeChannelNumberWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -25431,33 +26669,33 @@ - (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeExtendedPanIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeChannelNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeExtendedPanIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeChannelNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeshLocalPrefixWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { + [self readAttributeRSSIWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25466,33 +26704,33 @@ - (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeshLocalPrefixWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRSSIWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeshLocalPrefixWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRSSIWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverrunCountWithCompletion: + [self readAttributeBeaconLostCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25501,33 +26739,33 @@ - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeBeaconLostCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBeaconLostCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNeighborTableWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeBeaconRxCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25536,68 +26774,33 @@ - (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNeighborTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeBeaconRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNeighborTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeBeaconRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRouteTableWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRouteTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRouteTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdWithCompletion: + [self readAttributePacketMulticastRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25606,33 +26809,33 @@ - (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartitionIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketMulticastRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketMulticastRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWeightingWithCompletion: + [self readAttributePacketMulticastTxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25641,33 +26844,33 @@ - (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWeightingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketMulticastTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWeightingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketMulticastTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDataVersionWithCompletion: + [self readAttributePacketUnicastRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25676,33 +26879,33 @@ - (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDataVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketUnicastRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDataVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketUnicastRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStableDataVersionWithCompletion: + [self readAttributePacketUnicastTxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25711,30 +26914,30 @@ - (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStableDataVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStableDataVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributePacketUnicastTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketUnicastTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRouterIdWithCompletion: + [self readAttributeCurrentMaxRateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -25746,33 +26949,33 @@ - (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLeaderRouterIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeCurrentMaxRateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRouterIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeCurrentMaxRateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDetachedRoleCountWithCompletion: + [self readAttributeOverrunCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25781,33 +26984,33 @@ - (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDetachedRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDetachedRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChildRoleCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25816,33 +27019,33 @@ - (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChildRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChildRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouterRoleCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25851,33 +27054,33 @@ - (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRouterRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouterRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRoleCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25886,33 +27089,33 @@ - (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLeaderRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttachAttemptCountWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25921,33 +27124,33 @@ - (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttachAttemptCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttachAttemptCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdChangeCountWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -25956,243 +27159,627 @@ - (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartitionIdChangeCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdChangeCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeBetterPartitionAttachAttemptCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterEthernetNetworkDiagnostics + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams + alloc] init]; } - [self subscribeAttributeBetterPartitionAttachAttemptCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeParentChangeCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeParentChangeCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeParentChangeCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxTotalCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxTotalCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxTotalCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxUnicastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxUnicastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxUnicastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxBroadcastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxBroadcastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxAckRequestedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxAckRequestedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxAckRequestedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxAckedCountWithCompletion: + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) + +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params completion: + completionHandler]; +} +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:nil completionHandler:completionHandler]; +} + +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePHYRateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26201,33 +27788,33 @@ - (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxAckedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePHYRateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxAckedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePHYRateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxNoAckRequestedCountWithCompletion: + [self readAttributeFullDuplexWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26236,33 +27823,33 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxNoAckRequestedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFullDuplexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxNoAckRequestedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFullDuplexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataCountWithCompletion: + [self readAttributePacketRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26271,33 +27858,33 @@ - (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxDataCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataPollCountWithCompletion: + [self readAttributePacketTxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26306,68 +27893,33 @@ - (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxDataPollCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxDataPollCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxBeaconCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxBeaconCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributePacketTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributePacketTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconRequestCountWithCompletion: + [self readAttributeTxErrCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26376,33 +27928,33 @@ - (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxBeaconRequestCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTxErrCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconRequestCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTxErrCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxOtherCountWithCompletion: + [self readAttributeCollisionCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26411,30 +27963,30 @@ - (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCollisionCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCollisionCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxRetryCountWithCompletion: + [self readAttributeOverrunCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -26446,100 +27998,30 @@ - (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxRetryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxRetryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxDirectMaxRetryExpiryCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxIndirectMaxRetryExpiryCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrCcaCountWithCompletion: + [self readAttributeCarrierDetectWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -26551,33 +28033,33 @@ - (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxErrCcaCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeCarrierDetectWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrCcaCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeCarrierDetectWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrAbortCountWithCompletion: + [self readAttributeTimeSinceResetWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26586,33 +28068,33 @@ - (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxErrAbortCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTimeSinceResetWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrAbortCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTimeSinceResetWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrBusyChannelCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26621,33 +28103,33 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxErrBusyChannelCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxErrBusyChannelCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxTotalCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26656,33 +28138,33 @@ - (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxTotalCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxTotalCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxUnicastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26691,68 +28173,33 @@ - (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxUnicastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxUnicastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxBroadcastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxBroadcastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxDataCountWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -26761,30 +28208,30 @@ - (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxDataCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxDataCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxDataPollCountWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -26796,880 +28243,845 @@ - (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxDataPollCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxDataPollCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeRxBeaconCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterTimeSynchronization + +- (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetUTCTimeParams + alloc] init]; } - [self subscribeAttributeRxBeaconCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxBeaconCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxBeaconRequestCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetUTCTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedTimeSourceParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams + alloc] init]; } - [self subscribeAttributeRxBeaconRequestCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxBeaconRequestCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxOtherCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *)params completion:(void (^)(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetTimeZoneParams + alloc] init]; } - [self subscribeAttributeRxOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetTimeZone::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRTimeSynchronizationClusterSetTimeZoneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeRxOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams + alloc] init]; + } -- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxAddressFilteredCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetDSTOffset::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams + alloc] init]; } - [self subscribeAttributeRxAddressFilteredCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetDefaultNTP::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxAddressFilteredCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxDestAddrFilteredCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDestAddrFilteredCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDestAddrFilteredCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxDuplicatedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDuplicatedCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDuplicatedCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrNoFrameCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrNoFrameCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrNoFrameCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrUnknownNeighborCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrUnknownNeighborCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrUnknownNeighborCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrInvalidSrcAddrCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrInvalidSrcAddrCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrSecCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrSecCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrSecCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrFcsCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrFcsCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrFcsCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxErrOtherCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxErrOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxErrOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveTimestampWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePendingTimestampWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeNTPServerAvailableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePendingTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePendingTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeDelayWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSecurityPolicyWithCompletion: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSecurityPolicyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSecurityPolicyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeChannelPage0MaskWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeChannelPage0MaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeChannelPage0MaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOperationalDatasetComponentsWithCompletion: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperationalDatasetComponentsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOperationalDatasetComponentsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveNetworkFaultsListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveNetworkFaultsListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveNetworkFaultsListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } @end -@implementation MTRBaseClusterWiFiNetworkDiagnostics +@implementation MTRBaseClusterBridgedDeviceBasicInformation -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion -{ - [self resetCountsWithParams:nil completion:completion]; -} -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams + params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; } @@ -27679,7 +29091,7 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::Type; + using RequestType = BridgedDeviceBasicInformation::Commands::KeepActive::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -27691,9 +29103,9 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams completion:responseHandler]; } -- (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27702,11 +29114,11 @@ - (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSE completion:completion]; } -- (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27716,9 +29128,9 @@ - (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27727,9 +29139,9 @@ + (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27738,11 +29150,11 @@ - (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27752,9 +29164,9 @@ - (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27763,9 +29175,9 @@ + (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27774,11 +29186,11 @@ - (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27788,9 +29200,9 @@ - (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27799,9 +29211,9 @@ + (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27810,11 +29222,11 @@ - (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27824,9 +29236,9 @@ - (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27835,9 +29247,9 @@ + (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27846,11 +29258,39 @@ - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27860,9 +29300,9 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27871,9 +29311,9 @@ + (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27882,11 +29322,11 @@ - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27896,9 +29336,9 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27907,9 +29347,9 @@ + (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27918,11 +29358,11 @@ - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27932,9 +29372,9 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27943,9 +29383,9 @@ + (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27954,11 +29394,11 @@ - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27968,9 +29408,9 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -27979,9 +29419,9 @@ + (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -27990,11 +29430,11 @@ - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28004,9 +29444,9 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28015,9 +29455,9 @@ + (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28026,11 +29466,11 @@ - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28040,9 +29480,9 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28051,9 +29491,9 @@ + (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28062,11 +29502,11 @@ - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28076,9 +29516,9 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28087,9 +29527,9 @@ + (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28098,11 +29538,11 @@ - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28112,9 +29552,9 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28123,9 +29563,9 @@ + (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28134,11 +29574,11 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28148,9 +29588,9 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28159,9 +29599,9 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28170,11 +29610,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28184,9 +29624,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28195,9 +29635,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28206,11 +29646,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28220,9 +29660,153 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28233,7 +29817,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28246,7 +29830,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28258,7 +29842,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28269,7 +29853,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28282,7 +29866,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28294,7 +29878,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28305,7 +29889,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28318,7 +29902,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28330,7 +29914,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28341,7 +29925,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28354,7 +29938,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28366,7 +29950,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28377,30 +29961,23 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) +@implementation MTRBaseClusterBridgedDeviceBasic +@end -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:params completion: - completionHandler]; -} -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} +@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) -- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBSSIDWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28409,33 +29986,33 @@ - (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBSSIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBSSIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityTypeWithCompletion: + [self readAttributeVendorIDWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28444,33 +30021,33 @@ - (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSecurityTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiFiVersionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeProductNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28479,68 +30056,41 @@ - (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiFiVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiFiVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelNumberWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeNodeLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeChannelNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeChannelNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeRSSIWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28549,30 +30099,30 @@ - (void)subscribeAttributeRssiWithMinInterval:(NSNumber * _Nonnull)minInterval m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRSSIWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRSSIWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBeaconLostCountWithCompletion: + [self readAttributeHardwareVersionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -28584,33 +30134,33 @@ - (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBeaconLostCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeHardwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBeaconLostCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBeaconRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeHardwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28619,33 +30169,33 @@ - (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBeaconRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBeaconRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketMulticastRxCountWithCompletion: + [self readAttributeSoftwareVersionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28654,33 +30204,33 @@ - (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePacketMulticastRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSoftwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketMulticastRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketMulticastTxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSoftwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28689,33 +30239,33 @@ - (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePacketMulticastTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketMulticastTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeManufacturingDateWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28724,33 +30274,68 @@ - (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePacketUnicastRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePartNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastTxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeProductURLWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28759,33 +30344,33 @@ - (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePacketUnicastTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentMaxRateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeProductLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28794,33 +30379,33 @@ - (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentMaxRateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentMaxRateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverrunCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSerialNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -28829,21 +30414,91 @@ - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } +- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReachableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeGeneratedCommandListWithCompletion: @@ -29028,40 +30683,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterEthernetNetworkDiagnostics - -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion -{ - [self resetCountsWithParams:nil completion:completion]; -} -- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterSwitch -- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29070,11 +30696,11 @@ - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29084,9 +30710,9 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29095,9 +30721,9 @@ + (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29106,11 +30732,11 @@ - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29120,9 +30746,9 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29131,9 +30757,9 @@ + (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29142,11 +30768,11 @@ - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29156,9 +30782,9 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29167,9 +30793,9 @@ + (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29178,11 +30804,11 @@ - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29192,9 +30818,9 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29203,9 +30829,9 @@ + (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29214,11 +30840,11 @@ - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29228,9 +30854,9 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29239,9 +30865,9 @@ + (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29250,11 +30876,11 @@ - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29264,9 +30890,9 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29275,9 +30901,9 @@ + (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29286,11 +30912,11 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29300,9 +30926,9 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29311,9 +30937,9 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29322,11 +30948,11 @@ - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29336,9 +30962,9 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29347,9 +30973,9 @@ + (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29358,11 +30984,11 @@ - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29372,9 +30998,9 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29383,490 +31009,89 @@ + (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} +@end -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +@implementation MTRBaseClusterSwitch (Deprecated) + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeNumberOfPositionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfPositionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeNumberOfPositionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCurrentPositionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeCurrentPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) - -- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:params completion: - completionHandler]; -} -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePHYRateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePHYRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePHYRateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePHYRateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFullDuplexWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFullDuplexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFullDuplexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFullDuplexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePacketRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketRxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketTxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePacketTxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketTxCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxErrCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTxErrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxErrCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxErrCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCollisionCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCollisionCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCollisionCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOverrunCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOverrunCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCarrierDetectWithCompletion: + [self readAttributeMultiPressMaxWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -29878,56 +31103,21 @@ - (void)subscribeAttributeCarrierDetectWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCarrierDetectWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeMultiPressMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCarrierDetectWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeMultiPressMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTimeSinceResetWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTimeSinceResetWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTimeSinceResetWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeGeneratedCommandListWithCompletion: @@ -30112,12 +31302,12 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterTimeSynchronization +@implementation MTRBaseClusterAdministratorCommissioning -- (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)params completion:(MTRStatusCompletion)completion +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetUTCTimeParams + params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; } @@ -30126,8 +31316,11 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = TimeSynchronization::Commands::SetUTCTime::Type; + using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -30138,10 +31331,10 @@ - (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)pa queue:self.callbackQueue completion:responseHandler]; } -- (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedTimeSourceParams *)params completion:(MTRStatusCompletion)completion +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams + params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; } @@ -30150,8 +31343,11 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; + using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -30162,34 +31358,14 @@ - (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedT queue:self.callbackQueue completion:responseHandler]; } -- (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *)params completion:(void (^)(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetTimeZoneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = TimeSynchronization::Commands::SetTimeZone::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTimeSynchronizationClusterSetTimeZoneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self revokeCommissioningWithParams:nil completion:completion]; } -- (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams *)params completion:(MTRStatusCompletion)completion +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams + params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; } @@ -30198,32 +31374,11 @@ - (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = TimeSynchronization::Commands::SetDSTOffset::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams - alloc] init]; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = TimeSynchronization::Commands::SetDefaultNTP::Type; + using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -30235,9 +31390,9 @@ - (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParam completion:responseHandler]; } -- (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30246,11 +31401,11 @@ - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30260,9 +31415,9 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30271,9 +31426,9 @@ + (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30282,11 +31437,11 @@ - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30296,9 +31451,9 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30307,9 +31462,9 @@ + (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30318,11 +31473,11 @@ - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30332,9 +31487,9 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30343,9 +31498,9 @@ + (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30354,11 +31509,11 @@ - (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchroniz completion:completion]; } -- (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30368,9 +31523,9 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30379,9 +31534,9 @@ + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30390,11 +31545,11 @@ - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30404,9 +31559,9 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30415,9 +31570,9 @@ + (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30426,11 +31581,11 @@ - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30440,9 +31595,9 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30451,9 +31606,9 @@ + (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30462,11 +31617,11 @@ - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30476,9 +31631,9 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30487,9 +31642,9 @@ + (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30498,11 +31653,11 @@ - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30512,9 +31667,9 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30523,9 +31678,9 @@ + (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30534,11 +31689,11 @@ - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30548,9 +31703,9 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30559,374 +31714,493 @@ + (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} +@end -- (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} +@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) -+ (void)readAttributeNTPServerAvailableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self openCommissioningWindowWithParams:params completion: + completionHandler]; } - -- (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self openBasicCommissioningWindowWithParams:params completion: + completionHandler]; } - -- (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self revokeCommissioningWithParams:params completion: + completionHandler]; } - -+ (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWindowStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWindowStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWindowStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAdminFabricIndexWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAdminFabricIndexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAdminFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAdminVendorIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAdminVendorIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAdminVendorIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterOperationalCredentials + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTROperationalCredentialsClusterAttestationRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterCertificateChainRequestParams + alloc] init]; + } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + if (params == nil) { + params = [[MTROperationalCredentialsClusterCSRRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::CSRRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCSRResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterAddNOCParams + alloc] init]; + } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::AddNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTROperationalCredentialsClusterUpdateNOCParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -@implementation MTRBaseClusterBridgedDeviceBasicInformation + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveParams *)params completion:(MTRStatusCompletion)completion + using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams + params = [[MTROperationalCredentialsClusterRemoveFabricParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; } @@ -30936,7 +32210,7 @@ - (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BridgedDeviceBasicInformation::Commands::KeepActive::Type; + using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -30948,22 +32222,22 @@ - (void)keepActiveWithParams:(MTRBridgedDeviceBasicInformationClusterKeepActiveP completion:responseHandler]; } -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30973,9 +32247,9 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30984,22 +32258,22 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31009,9 +32283,9 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31020,9 +32294,9 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31031,11 +32305,11 @@ - (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable va completion:completion]; } -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31045,9 +32319,9 @@ - (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31056,9 +32330,9 @@ + (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31067,11 +32341,11 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31081,9 +32355,9 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductID::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31092,9 +32366,9 @@ + (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31103,39 +32377,11 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu completion:completion]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31145,9 +32391,9 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31156,9 +32402,9 @@ + (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31167,11 +32413,11 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31181,9 +32427,9 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31192,9 +32438,9 @@ + (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31203,11 +32449,11 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N completion:completion]; } -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31217,9 +32463,9 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31228,9 +32474,9 @@ + (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31239,11 +32485,11 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31253,9 +32499,9 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31264,9 +32510,9 @@ + (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31275,11 +32521,11 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N completion:completion]; } -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31289,9 +32535,9 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31300,9 +32546,9 @@ + (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31311,11 +32557,11 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla completion:completion]; } -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31325,9 +32571,9 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31336,9 +32582,9 @@ + (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31347,11 +32593,11 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31361,9 +32607,9 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31372,9 +32618,9 @@ + (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31383,11 +32629,11 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31397,9 +32643,9 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31408,421 +32654,294 @@ + (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterOperationalCredentials (Deprecated) + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self attestationRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self certificateChainRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self CSRRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self addNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self updateNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self updateFabricLabelWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self removeFabricWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self addTrustedRootCertificateWithParams:params completion: + completionHandler]; } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeNOCsWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNOCsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeNOCsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFabricsWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeSupportedFabricsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeSupportedFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeCommissionedFabricsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCommissionedFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCommissionedFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTrustedRootCertificatesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTrustedRootCertificatesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTrustedRootCertificatesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeCurrentFabricIndexWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentFabricIndexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCurrentFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterBridgedDeviceBasic -@end - -@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -31831,33 +32950,33 @@ - (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -31866,33 +32985,33 @@ - (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -31901,41 +33020,33 @@ - (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNodeLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -31944,30 +33055,30 @@ - (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -31979,573 +33090,236 @@ - (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeHardwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeHardwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterGroupKeyManagement + +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRGroupKeyManagementClusterKeySetWriteParams + alloc] init]; } - [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRGroupKeyManagementClusterKeySetReadParams + alloc] init]; } - [self subscribeAttributeSoftwareVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRGroupKeyManagementClusterKeySetRemoveParams + alloc] init]; } - [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeManufacturingDateWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetReadAllIndicesWithCompletion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self keySetReadAllIndicesWithParams:nil completion:completion]; } -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePartNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductURLWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSerialNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeReachableWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReachableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUniqueIDWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRGroupKeyManagementClusterGroupKeyMapStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *)value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterSwitch - -- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32555,9 +33329,9 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32566,9 +33340,9 @@ + (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32577,11 +33351,11 @@ - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32591,9 +33365,9 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32602,9 +33376,9 @@ + (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32613,11 +33387,11 @@ - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32627,9 +33401,9 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32640,7 +33414,7 @@ + (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32653,7 +33427,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32665,7 +33439,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32676,7 +33450,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32689,7 +33463,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32701,7 +33475,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32712,7 +33486,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32725,7 +33499,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32737,7 +33511,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32748,7 +33522,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32761,7 +33535,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32773,7 +33547,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32784,7 +33558,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32797,7 +33571,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32809,7 +33583,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32820,7 +33594,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32833,7 +33607,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32845,7 +33619,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32856,20 +33630,55 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterSwitch (Deprecated) +@implementation MTRBaseClusterGroupKeyManagement (Deprecated) -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeNumberOfPositionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self keySetWriteWithParams:params completion: + completionHandler]; } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetRemoveWithParams:params completion: + completionHandler]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadAllIndicesWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupKeyMapWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -32878,33 +33687,68 @@ - (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNumberOfPositionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGroupKeyMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPositionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGroupKeyMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentPositionWithCompletion: + [self readAttributeGroupTableWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGroupTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupsPerFabricWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -32913,33 +33757,33 @@ - (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeMaxGroupsPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupsPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithCompletion: + [self readAttributeMaxGroupKeysPerFabricWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -32948,19 +33792,19 @@ - (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMultiPressMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxGroupKeysPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -33147,169 +33991,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterAdministratorCommissioning - -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion -{ - [self revokeCommissioningWithParams:nil completion:completion]; -} -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterFixedLabel -- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33318,11 +34004,11 @@ - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33332,9 +34018,9 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33345,7 +34031,7 @@ + (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33358,7 +34044,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33370,7 +34056,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33381,7 +34067,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33394,7 +34080,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33406,7 +34092,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33417,7 +34103,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33430,7 +34116,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33442,7 +34128,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33453,7 +34139,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33466,7 +34152,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33478,7 +34164,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33489,7 +34175,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33502,7 +34188,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33514,7 +34200,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33525,7 +34211,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33538,7 +34224,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33550,7 +34236,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33561,110 +34247,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) - -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self openCommissioningWindowWithParams:params completion: - completionHandler]; -} -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self openBasicCommissioningWindowWithParams:params completion: - completionHandler]; -} -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self revokeCommissioningWithParams:params completion: - completionHandler]; -} -- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindowStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeWindowStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindowStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAdminFabricIndexWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAdminFabricIndexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAdminFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterFixedLabel (Deprecated) -- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLabelListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -33673,19 +34269,19 @@ - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAdminVendorIdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLabelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -33872,312 +34468,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOperationalCredentials +@implementation MTRBaseClusterUserLabel -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterAttestationRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::AttestationRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterCertificateChainRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::CertificateChainRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterCSRRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::CSRRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCSRResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterAddNOCParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::AddNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateNOCParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterRemoveFabricParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34186,83 +34481,61 @@ - (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -+ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + ListFreer listFreer; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRUserLabelClusterLabelStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRUserLabelClusterLabelStruct *)value[i_0]; + listHolder_0->mList[i_0].label = AsCharSpan(element_0.label); + listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } -- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34272,9 +34545,9 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34285,7 +34558,7 @@ + (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34298,7 +34571,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34310,7 +34583,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34321,7 +34594,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34334,7 +34607,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34346,7 +34619,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34357,7 +34630,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34370,7 +34643,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34382,7 +34655,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34393,7 +34666,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34406,7 +34679,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34418,7 +34691,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34429,7 +34702,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34442,7 +34715,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34454,7 +34727,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34465,7 +34738,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34478,7 +34751,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34490,7 +34763,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34501,278 +34774,49 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOperationalCredentials (Deprecated) +@implementation MTRBaseClusterUserLabel (Deprecated) -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self attestationRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeLabelListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self certificateChainRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; } -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self CSRRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; } -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self addNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLabelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self updateNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self updateFabricLabelWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self removeFabricWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self addTrustedRootCertificateWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNOCsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCommissionedFabricsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTrustedRootCertificatesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTrustedRootCertificatesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTrustedRootCertificatesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentFabricIndexWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentFabricIndexWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -34959,176 +35003,24 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterGroupKeyManagement - -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetWriteParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetRemoveParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)keySetReadAllIndicesWithCompletion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self keySetReadAllIndicesWithParams:nil completion:completion]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterBooleanState -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRGroupKeyManagementClusterGroupKeyMapStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *)value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35138,9 +35030,9 @@ - (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35149,22 +35041,22 @@ + (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35174,9 +35066,9 @@ - (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35185,9 +35077,9 @@ + (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35196,11 +35088,11 @@ - (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35210,9 +35102,9 @@ - (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35221,9 +35113,9 @@ + (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35232,11 +35124,11 @@ - (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35246,9 +35138,9 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35257,9 +35149,9 @@ + (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35268,11 +35160,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35282,9 +35174,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35293,9 +35185,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35304,11 +35196,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35318,9 +35210,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35329,9 +35221,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35340,11 +35232,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35354,117 +35246,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35475,90 +35259,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterGroupKeyManagement (Deprecated) - -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetWriteWithParams:params completion: - completionHandler]; -} -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self keySetReadWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetRemoveWithParams:params completion: - completionHandler]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self keySetReadAllIndicesWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGroupKeyMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterBooleanState (Deprecated) -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGroupTableWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeStateValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -35567,91 +35281,21 @@ - (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGroupTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeStateValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGroupTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeStateValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxGroupsPerFabricWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxGroupsPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxGroupsPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxGroupKeysPerFabricWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxGroupKeysPerFabricWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeGeneratedCommandListWithCompletion: @@ -35836,11 +35480,84 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterFixedLabel +@implementation MTRBaseClusterICDManagement -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + if (params == nil) { + params = [[MTRICDManagementClusterRegisterClientParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::RegisterClient::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRICDManagementClusterRegisterClientResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRICDManagementClusterUnregisterClientParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::UnregisterClient::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRICDManagementClusterStayActiveRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::StayActiveRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRICDManagementClusterStayActiveResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35849,11 +35566,11 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35863,9 +35580,9 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35874,9 +35591,9 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35885,11 +35602,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35899,9 +35616,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35910,9 +35627,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35921,11 +35638,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35935,9 +35652,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35946,22 +35663,22 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35971,9 +35688,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35982,9 +35699,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35993,11 +35710,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36007,9 +35724,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36018,9 +35735,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36029,11 +35746,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36043,9 +35760,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36054,9 +35771,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36065,11 +35782,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36079,9 +35796,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36090,234 +35807,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterFixedLabel (Deprecated) +- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLabelListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLabelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterUserLabel - -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36326,61 +35890,11 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRUserLabelClusterLabelStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUserLabelClusterLabelStruct *)value[i_0]; - listHolder_0->mList[i_0].label = AsCharSpan(element_0.label); - listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaximumCheckInBackOffWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36390,9 +35904,9 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36403,7 +35917,7 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36416,7 +35930,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36428,7 +35942,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36439,7 +35953,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36452,7 +35966,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36464,7 +35978,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36475,7 +35989,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36488,7 +36002,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36500,7 +36014,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36511,7 +36025,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36524,7 +36038,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36536,7 +36050,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36547,7 +36061,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36560,7 +36074,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36572,7 +36086,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36583,7 +36097,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36596,7 +36110,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36608,7 +36122,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36619,240 +36133,184 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterUserLabel (Deprecated) +@implementation MTRBaseClusterTimer -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeLabelListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRTimerClusterSetTimerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::SetTimer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)resetTimerWithCompletion:(MTRStatusCompletion)completion { - [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; + [self resetTimerWithParams:nil completion:completion]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; + if (params == nil) { + params = [[MTRTimerClusterResetTimerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::ResetTimer::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimerClusterAddTimeParams + alloc] init]; } - [self subscribeAttributeLabelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::AddTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRTimerClusterReduceTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Timer::Commands::ReduceTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterBooleanState - -- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36861,11 +36319,11 @@ - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36875,9 +36333,9 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36888,7 +36346,7 @@ + (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36901,7 +36359,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36913,7 +36371,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36924,7 +36382,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36937,7 +36395,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36949,7 +36407,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36960,7 +36418,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36973,7 +36431,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36985,7 +36443,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36996,7 +36454,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37009,7 +36467,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37021,7 +36479,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37032,7 +36490,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37045,7 +36503,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37057,7 +36515,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37068,7 +36526,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37081,7 +36539,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37093,7 +36551,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37104,233 +36562,44 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBooleanState (Deprecated) - -- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStateValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStateValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStateValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStateValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterOvenCavityOperationalState -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self pauseWithParams:nil completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterPauseParams + alloc] init]; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using RequestType = OvenCavityOperationalState::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self stopWithParams:nil completion:completion]; } - -@end - -@implementation MTRBaseClusterICDManagement - -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterRegisterClientParams + params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; } @@ -37340,45 +36609,53 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::RegisterClient::Type; + using RequestType = OvenCavityOperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterRegisterClientResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion +- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self startWithParams:nil completion:completion]; +} +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterUnregisterClientParams + params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::UnregisterClient::Type; + using RequestType = OvenCavityOperationalState::Commands::Start::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams *)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resumeWithParams:nil completion:completion]; +} +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterStayActiveRequestParams + params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; } @@ -37388,21 +36665,21 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::StayActiveRequest::Type; + using RequestType = OvenCavityOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterStayActiveResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37411,11 +36688,11 @@ - (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37425,9 +36702,9 @@ - (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37436,9 +36713,9 @@ + (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37447,11 +36724,11 @@ - (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37461,153 +36738,9 @@ - (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37616,9 +36749,9 @@ + (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37627,11 +36760,11 @@ - (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37641,9 +36774,9 @@ - (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37652,9 +36785,9 @@ + (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37663,11 +36796,11 @@ - (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NS completion:completion]; } -- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37677,9 +36810,9 @@ - (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscri subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37688,9 +36821,9 @@ + (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRC completion:completion]; } -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37699,11 +36832,11 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37713,9 +36846,9 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37724,9 +36857,9 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37735,11 +36868,11 @@ - (void)readAttributeMaximumCheckInBackOffWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeMaximumCheckInBackOffWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37749,9 +36882,9 @@ - (void)subscribeAttributeMaximumCheckInBackOffWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::MaximumCheckInBackOff::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37762,7 +36895,7 @@ + (void)readAttributeMaximumCheckInBackOffWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37775,7 +36908,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37787,7 +36920,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37798,7 +36931,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37811,7 +36944,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37823,7 +36956,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37834,7 +36967,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37847,7 +36980,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37859,7 +36992,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37870,7 +37003,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37883,7 +37016,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37895,7 +37028,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37906,7 +37039,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37919,7 +37052,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37931,7 +37064,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37942,7 +37075,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37955,7 +37088,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37967,7 +37100,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37978,112 +37111,72 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTimer +@implementation MTRBaseClusterOvenMode -- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRTimerClusterSetTimerParams + params = [[MTROvenModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Timer::Commands::SetTimer::Type; + using RequestType = OvenMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resetTimerWithCompletion:(MTRStatusCompletion)completion -{ - [self resetTimerWithParams:nil completion:completion]; -} -- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimerClusterResetTimerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Timer::Commands::ResetTimer::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRTimerClusterAddTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Timer::Commands::AddTime::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimerClusterReduceTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = Timer::Commands::ReduceTime::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38092,11 +37185,11 @@ - (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38106,9 +37199,9 @@ - (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38117,9 +37210,9 @@ + (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38128,11 +37221,44 @@ - (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38142,9 +37268,9 @@ - (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38153,9 +37279,9 @@ + (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38164,11 +37290,44 @@ - (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38178,9 +37337,9 @@ - (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38191,7 +37350,7 @@ + (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38204,7 +37363,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38216,7 +37375,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38227,7 +37386,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38240,7 +37399,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38252,7 +37411,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38263,7 +37422,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38276,7 +37435,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38288,7 +37447,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38299,7 +37458,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38312,7 +37471,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38324,7 +37483,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38335,7 +37494,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38348,7 +37507,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38360,7 +37519,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38371,7 +37530,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38384,7 +37543,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38396,7 +37555,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38407,124 +37566,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOvenCavityOperationalState +@implementation MTRBaseClusterLaundryDryerControls -- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self pauseWithParams:nil completion:completion]; -} -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil completion:completion]; -} -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil completion:completion]; -} -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterStartParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Start::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil completion:completion]; -} -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterResumeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38533,11 +37579,11 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38547,9 +37593,9 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38558,9 +37604,9 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38569,47 +37615,44 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38619,9 +37662,9 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38630,9 +37673,9 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38641,11 +37684,11 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38655,9 +37698,9 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38666,9 +37709,9 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38677,11 +37720,11 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38691,9 +37734,9 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38702,9 +37745,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38713,11 +37756,11 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOpera completion:completion]; } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38727,9 +37770,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38738,9 +37781,9 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38749,11 +37792,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38763,9 +37806,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38774,9 +37817,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38785,11 +37828,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38799,9 +37842,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38810,9 +37853,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38821,11 +37864,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38835,9 +37878,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38846,45 +37889,38 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} +@end -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} +@implementation MTRBaseClusterModeSelect -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRModeSelectClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ModeSelect::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38893,11 +37929,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38907,9 +37943,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38918,9 +37954,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38929,11 +37965,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38943,9 +37979,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38954,38 +37990,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterOvenMode - -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38998,7 +38005,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39010,7 +38017,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39021,7 +38028,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39034,7 +38041,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39046,7 +38053,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39057,7 +38064,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39085,7 +38092,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39103,7 +38110,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39115,7 +38122,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39126,7 +38133,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39154,7 +38161,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39172,7 +38179,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39184,7 +38191,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39195,7 +38202,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39208,7 +38215,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39220,7 +38227,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39231,7 +38238,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39244,7 +38251,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39256,7 +38263,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39267,7 +38274,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39280,7 +38287,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39292,7 +38299,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39303,7 +38310,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39316,7 +38323,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39328,7 +38335,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39339,7 +38346,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39352,7 +38359,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39364,7 +38371,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39375,7 +38382,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39388,7 +38395,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39400,7 +38407,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39411,152 +38418,454 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLaundryDryerControls +@implementation MTRBaseClusterModeSelect (Deprecated) -- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self changeToModeWithParams:params completion: + completionHandler]; } -- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeStandardNamespaceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStandardNamespaceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStandardNamespaceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self readAttributeSupportedModesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedModesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedModesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - ListFreer listFreer; - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } +- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartUpModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOnModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterLaundryWasherMode + +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRLaundryWasherModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39565,11 +38874,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39579,9 +38888,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39590,9 +38899,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39601,11 +38910,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39615,9 +38924,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39626,9 +38935,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39637,11 +38946,44 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39651,9 +38993,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39662,9 +39004,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39673,11 +39015,44 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39687,9 +39062,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39698,9 +39073,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39709,11 +39084,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39723,9 +39098,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39734,38 +39109,117 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterModeSelect +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRModeSelectClusterChangeToModeParams - alloc] init]; - } + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ModeSelect::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39774,11 +39228,11 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va completion:completion]; } -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39788,9 +39242,9 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39799,9 +39253,9 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39810,11 +39264,11 @@ - (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39824,9 +39278,9 @@ - (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39835,9 +39289,38 @@ + (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } +@end + +@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode + +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39850,7 +39333,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39862,7 +39345,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39873,7 +39356,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39886,7 +39369,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39898,7 +39381,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39909,7 +39392,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39937,7 +39420,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39955,7 +39438,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39967,7 +39450,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39978,7 +39461,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40006,7 +39489,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40024,7 +39507,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40036,7 +39519,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40047,7 +39530,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40060,7 +39543,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40072,7 +39555,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40083,7 +39566,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40096,7 +39579,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40108,7 +39591,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40119,7 +39602,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40132,7 +39615,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40144,7 +39627,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40155,7 +39638,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40168,7 +39651,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40180,7 +39663,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40191,7 +39674,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40204,7 +39687,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40216,7 +39699,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40227,7 +39710,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40240,7 +39723,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40252,7 +39735,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40263,454 +39746,252 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterModeSelect (Deprecated) +@implementation MTRBaseClusterLaundryWasherControls -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self changeToModeWithParams:params completion: - completionHandler]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self readAttributeStandardNamespaceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStandardNamespaceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeStandardNamespaceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSupportedModesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedModesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedModesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeCurrentModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartUpModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeStartUpModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStartUpModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartUpModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -- (void)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOnModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOnModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + ListFreer listFreer; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterLaundryWasherMode - -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRLaundryWasherModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40719,11 +40000,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40733,9 +40014,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40744,9 +40025,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40755,11 +40036,11 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40769,9 +40050,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40780,9 +40061,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40791,44 +40072,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40838,9 +40086,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40849,9 +40097,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40860,44 +40108,112 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@end + +@implementation MTRBaseClusterRVCRunMode + +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + if (params == nil) { + params = [[MTRRVCRunModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = RvcRunMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40907,9 +40223,45 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40920,7 +40272,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40933,7 +40285,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40945,7 +40297,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40956,7 +40308,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40969,7 +40321,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40981,7 +40333,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40992,7 +40344,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41005,7 +40357,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41017,7 +40369,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41028,7 +40380,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41041,7 +40393,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41053,7 +40405,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41064,7 +40416,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41077,7 +40429,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41089,7 +40441,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41100,7 +40452,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41113,7 +40465,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41125,7 +40477,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41136,12 +40488,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode +@implementation MTRBaseClusterRVCCleanMode -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; } @@ -41151,21 +40503,21 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41178,7 +40530,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41190,7 +40542,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41201,7 +40553,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41214,7 +40566,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41226,7 +40578,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41235,9 +40587,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41246,44 +40598,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41293,9 +40612,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41304,9 +40623,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41315,44 +40634,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41362,9 +40648,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41373,9 +40659,9 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41384,11 +40670,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41398,9 +40684,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41409,9 +40695,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41420,11 +40706,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41434,9 +40720,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41445,9 +40731,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41456,11 +40742,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41470,9 +40756,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41481,9 +40767,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41492,11 +40778,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41506,9 +40792,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41517,9 +40803,42 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterTemperatureControl + +- (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + [self setTemperatureWithParams:nil completion:completion]; +} +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRTemperatureControlClusterSetTemperatureParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TemperatureControl::Commands::SetTemperature::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41528,11 +40847,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41542,9 +40861,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41553,9 +40872,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41564,11 +40883,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41578,9 +40897,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41589,13 +40908,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterLaundryWasherControls - -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41604,11 +40919,11 @@ - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41618,9 +40933,9 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41629,9 +40944,9 @@ + (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41640,44 +40955,11 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41687,9 +40969,9 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41698,9 +40980,9 @@ + (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41709,39 +40991,11 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41751,9 +41005,9 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41762,9 +41016,9 @@ + (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41773,11 +41027,11 @@ - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41787,9 +41041,9 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41800,7 +41054,7 @@ + (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41813,7 +41067,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41825,7 +41079,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41836,7 +41090,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41849,7 +41103,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41861,7 +41115,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41872,7 +41126,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41885,7 +41139,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41897,7 +41151,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41908,7 +41162,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41921,7 +41175,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41933,7 +41187,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41944,7 +41198,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41957,7 +41211,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41969,7 +41223,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41980,7 +41234,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41993,7 +41247,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42005,7 +41259,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42016,36 +41270,47 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCRunMode +@implementation MTRBaseClusterRefrigeratorAlarm -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRRVCRunModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = RvcRunMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42054,11 +41319,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42068,9 +41333,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42079,9 +41344,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42090,11 +41355,11 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42104,9 +41369,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42117,7 +41382,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42130,7 +41395,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42142,7 +41407,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42153,7 +41418,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42166,7 +41431,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42178,7 +41443,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42189,7 +41454,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42202,7 +41467,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42214,7 +41479,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42225,7 +41490,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42238,7 +41503,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42250,7 +41515,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42261,7 +41526,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42274,7 +41539,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42286,7 +41551,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42297,7 +41562,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42310,7 +41575,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42322,7 +41587,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42333,12 +41598,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCCleanMode +@implementation MTRBaseClusterDishwasherMode -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRVCCleanModeClusterChangeToModeParams + params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; } @@ -42348,21 +41613,21 @@ - (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcCleanMode::Commands::ChangeToMode::Type; + using RequestType = DishwasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42375,7 +41640,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42387,7 +41652,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42398,7 +41663,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42411,7 +41676,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42423,7 +41688,145 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42434,7 +41837,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42447,7 +41850,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42459,7 +41862,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42470,7 +41873,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42483,7 +41886,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42495,7 +41898,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42506,7 +41909,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42519,7 +41922,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42531,7 +41934,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42542,7 +41945,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42555,7 +41958,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42567,7 +41970,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42578,7 +41981,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42591,7 +41994,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42603,7 +42006,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42614,7 +42017,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42627,7 +42030,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42639,7 +42042,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42650,40 +42053,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTemperatureControl - -- (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion -{ - [self setTemperatureWithParams:nil completion:completion]; -} -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTemperatureControlClusterSetTemperatureParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = TemperatureControl::Commands::SetTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterAirQuality -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42692,11 +42066,11 @@ - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42706,9 +42080,9 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42717,9 +42091,9 @@ + (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42728,11 +42102,11 @@ - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42742,9 +42116,9 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42753,9 +42127,9 @@ + (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42764,11 +42138,11 @@ - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42778,9 +42152,9 @@ - (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42789,9 +42163,9 @@ + (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42800,11 +42174,11 @@ - (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42814,9 +42188,9 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42825,9 +42199,9 @@ + (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42836,11 +42210,11 @@ - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42850,9 +42224,9 @@ - (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42861,9 +42235,9 @@ + (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42872,11 +42246,11 @@ - (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray completion:completion]; } -- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42886,9 +42260,9 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42897,9 +42271,9 @@ + (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42908,11 +42282,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42922,9 +42296,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42933,9 +42307,42 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterSmokeCOAlarm + +- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + [self selfTestRequestWithParams:nil completion:completion]; +} +- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42944,11 +42351,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42958,9 +42365,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42969,9 +42376,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42980,11 +42387,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42994,9 +42401,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43005,9 +42412,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43016,11 +42423,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43030,9 +42437,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43041,9 +42448,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43052,11 +42459,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43066,9 +42473,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43077,9 +42484,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43088,11 +42495,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43102,9 +42509,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43113,13 +42520,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterRefrigeratorAlarm - -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43128,11 +42531,11 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43142,9 +42545,9 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43153,9 +42556,9 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43164,11 +42567,11 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43178,9 +42581,9 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43189,9 +42592,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43200,11 +42603,11 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43214,9 +42617,9 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43225,9 +42628,9 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43236,11 +42639,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43250,9 +42653,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43261,9 +42664,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43272,11 +42675,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43286,9 +42689,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43297,9 +42700,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43308,11 +42711,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43322,9 +42725,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43333,9 +42736,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43344,11 +42747,39 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + [self writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43358,9 +42789,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43369,9 +42800,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43380,11 +42811,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43394,9 +42825,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43405,9 +42836,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43416,11 +42847,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43430,9 +42861,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43441,38 +42872,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDishwasherMode - -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDishwasherModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43481,11 +42883,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43495,9 +42897,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43506,9 +42908,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43517,11 +42919,11 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43531,9 +42933,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43542,9 +42944,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43553,44 +42955,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43600,9 +42969,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43611,9 +42980,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43622,44 +42991,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43669,9 +43005,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43680,9 +43016,9 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43691,11 +43027,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43705,9 +43041,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43716,81 +43052,62 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterDishwasherAlarm + +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRDishwasherAlarmClusterResetParams + alloc] init]; + } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + using RequestType = DishwasherAlarm::Commands::Reset::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + alloc] init]; + } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43799,11 +43116,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43813,9 +43130,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43824,9 +43141,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43835,11 +43152,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43849,9 +43166,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43860,9 +43177,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43871,11 +43188,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43885,9 +43202,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43896,13 +43213,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterAirQuality - -- (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43911,11 +43224,11 @@ - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43925,9 +43238,9 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43938,7 +43251,7 @@ + (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43951,7 +43264,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43963,7 +43276,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43974,7 +43287,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43987,7 +43300,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43999,7 +43312,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44010,7 +43323,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44023,7 +43336,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44035,7 +43348,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44046,7 +43359,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44059,7 +43372,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44071,7 +43384,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44082,7 +43395,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44095,7 +43408,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44107,7 +43420,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44118,7 +43431,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44131,7 +43444,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44143,7 +43456,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44154,40 +43467,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterSmokeCOAlarm - -- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self selfTestRequestWithParams:nil completion:completion]; -} -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterMicrowaveOvenMode -- (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44196,11 +43480,11 @@ - (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44210,9 +43494,9 @@ - (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44221,9 +43505,9 @@ + (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44232,11 +43516,11 @@ - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44246,9 +43530,9 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44257,9 +43541,9 @@ + (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44268,11 +43552,11 @@ - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44282,9 +43566,9 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44293,9 +43577,9 @@ + (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44304,11 +43588,11 @@ - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44318,9 +43602,9 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44329,9 +43613,9 @@ + (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44340,11 +43624,11 @@ - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44354,9 +43638,9 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44365,9 +43649,9 @@ + (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44376,11 +43660,11 @@ - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44390,9 +43674,9 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44401,9 +43685,9 @@ + (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44412,11 +43696,11 @@ - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44426,9 +43710,9 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44437,9 +43721,9 @@ + (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44448,11 +43732,11 @@ - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44462,9 +43746,9 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44473,9 +43757,66 @@ + (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterMicrowaveOvenControl + +- (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + [self setCookingParametersWithParams:nil completion:completion]; +} +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44484,11 +43825,11 @@ - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44498,9 +43839,9 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44509,9 +43850,9 @@ + (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44520,11 +43861,11 @@ - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44534,9 +43875,9 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44545,9 +43886,9 @@ + (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44556,11 +43897,11 @@ - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44570,9 +43911,9 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44581,9 +43922,9 @@ + (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44592,39 +43933,11 @@ - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44634,9 +43947,9 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44645,9 +43958,9 @@ + (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44656,11 +43969,11 @@ - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44670,9 +43983,9 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44681,9 +43994,9 @@ + (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44692,11 +44005,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44706,9 +44019,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44717,9 +44030,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44728,11 +44041,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44742,9 +44055,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWattsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44753,9 +44066,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44764,11 +44077,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedWattIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44778,9 +44091,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44789,9 +44102,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44800,11 +44113,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44814,9 +44127,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44825,9 +44138,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44836,11 +44149,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44850,9 +44163,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44861,9 +44174,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44872,11 +44185,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44886,9 +44199,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44897,62 +44210,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDishwasherAlarm - -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDishwasherAlarmClusterResetParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherAlarm::Commands::Reset::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44961,11 +44221,11 @@ - (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44975,9 +44235,9 @@ - (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44986,9 +44246,9 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44997,11 +44257,11 @@ - (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45011,9 +44271,9 @@ - (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45022,9 +44282,9 @@ + (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45033,11 +44293,11 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45047,9 +44307,9 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45058,9 +44318,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45069,11 +44329,11 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45083,9 +44343,9 @@ - (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45094,81 +44354,126 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterOperationalState + +- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self pauseWithParams:nil completion:completion]; } +- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalStateClusterPauseParams + alloc] init]; + } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self stopWithParams:nil completion:completion]; } +- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalStateClusterStopParams + alloc] init]; + } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self startWithParams:nil completion:completion]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTROperationalStateClusterStartParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Start::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self resumeWithParams:nil completion:completion]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTROperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45177,11 +44482,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45191,9 +44496,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45202,9 +44507,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45213,11 +44518,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45227,9 +44532,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45238,9 +44543,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45249,11 +44554,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45263,9 +44568,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45274,9 +44579,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45285,11 +44590,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45299,9 +44604,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45310,13 +44615,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterMicrowaveOvenMode - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45325,11 +44626,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45339,9 +44640,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45350,9 +44651,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45361,11 +44662,11 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45375,9 +44676,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45388,7 +44689,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45401,7 +44702,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45413,7 +44714,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45424,7 +44725,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45437,7 +44738,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45449,7 +44750,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45460,7 +44761,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45473,7 +44774,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45485,7 +44786,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45496,7 +44797,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45509,7 +44810,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45521,7 +44822,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45532,7 +44833,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45545,7 +44846,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45557,7 +44858,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45568,7 +44869,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45581,7 +44882,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45593,7 +44894,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45604,172 +44905,96 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterMicrowaveOvenControl +@implementation MTRBaseClusterRVCOperationalState -- (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion +- (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self setCookingParametersWithParams:nil completion:completion]; + [self pauseWithParams:nil completion:completion]; } -- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams + params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; + using RequestType = RvcOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion +- (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self resumeWithParams:nil completion:completion]; +} +- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams + params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; + using RequestType = RvcOperationalState::Commands::Resume::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self goHomeWithParams:nil completion:completion]; } - -- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRRVCOperationalStateClusterGoHomeParams + alloc] init]; + } -- (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -+ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + using RequestType = RvcOperationalState::Commands::GoHome::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePowerSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + completion:responseHandler]; } -- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45778,11 +45003,11 @@ - (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45792,9 +45017,9 @@ - (void)subscribeAttributeMinPowerWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45803,9 +45028,9 @@ + (void)readAttributeMinPowerWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45814,11 +45039,11 @@ - (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45828,9 +45053,9 @@ - (void)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45839,9 +45064,9 @@ + (void)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45850,11 +45075,11 @@ - (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45864,9 +45089,9 @@ - (void)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45875,9 +45100,9 @@ + (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45886,11 +45111,11 @@ - (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45900,9 +45125,9 @@ - (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWattsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45911,9 +45136,9 @@ + (void)readAttributeSupportedWattsWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45922,11 +45147,11 @@ - (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeSelectedWattIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45936,9 +45161,9 @@ - (void)subscribeAttributeSelectedWattIndexWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45947,9 +45172,9 @@ + (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45958,11 +45183,11 @@ - (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45972,9 +45197,9 @@ - (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45985,7 +45210,7 @@ + (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45998,7 +45223,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46010,7 +45235,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46021,7 +45246,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46034,7 +45259,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46046,7 +45271,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46057,7 +45282,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46070,7 +45295,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46082,7 +45307,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::EventList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46093,7 +45318,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46106,7 +45331,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46118,7 +45343,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46129,7 +45354,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46142,7 +45367,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46154,7 +45379,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46165,7 +45390,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46178,7 +45403,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46190,7 +45415,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MicrowaveOvenControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46201,16 +45426,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOperationalState +@implementation MTRBaseClusterScenesManagement -- (void)pauseWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self pauseWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterAddSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::AddScene::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterAddSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterPauseParams + params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; } @@ -46220,25 +45465,45 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Pause::Type; + using RequestType = ScenesManagement::Commands::ViewScene::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self stopWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterRemoveSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::RemoveScene::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterRemoveSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterStopParams + params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; } @@ -46248,53 +45513,93 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Stop::Type; + using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterRemoveAllScenesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self startWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterStoreSceneParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::StoreScene::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterStoreSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROperationalStateClusterStartParams + params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Start::Type; + using RequestType = ScenesManagement::Commands::RecallScene::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithCompletion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self resumeWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRScenesManagementClusterGetSceneMembershipParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterGetSceneMembershipResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTROperationalStateClusterResumeParams + params = [[MTRScenesManagementClusterCopySceneParams alloc] init]; } @@ -46304,21 +45609,21 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OperationalState::Commands::Resume::Type; + using RequestType = ScenesManagement::Commands::CopyScene::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterCopySceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46327,11 +45632,11 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46341,9 +45646,9 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46352,9 +45657,9 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46363,11 +45668,11 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46377,9 +45682,9 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46388,22 +45693,22 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46413,9 +45718,9 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46424,9 +45729,9 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46435,11 +45740,11 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46449,9 +45754,9 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46460,9 +45765,9 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46471,11 +45776,11 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46485,9 +45790,9 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46496,9 +45801,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46507,11 +45812,11 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROperationalStat completion:completion]; } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46521,117 +45826,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::OperationalError::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46642,7 +45839,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46655,7 +45852,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46667,7 +45864,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46678,7 +45875,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46691,7 +45888,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46703,7 +45900,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46714,7 +45911,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46727,7 +45924,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46739,7 +45936,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46750,96 +45947,40 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCOperationalState - -- (void)pauseWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil completion:completion]; -} -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcOperationalState::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resumeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil completion:completion]; -} -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCOperationalStateClusterResumeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRBaseClusterHEPAFilterMonitoring - using RequestType = RvcOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)goHomeWithCompletion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion { - [self goHomeWithParams:nil completion:completion]; + [self resetConditionWithParams:nil completion:completion]; } -- (void)goHomeWithParams:(MTRRVCOperationalStateClusterGoHomeParams * _Nullable)params completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRRVCOperationalStateClusterGoHomeParams + params = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RvcOperationalState::Commands::GoHome::Type; + using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46848,11 +45989,11 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46862,9 +46003,9 @@ - (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46873,9 +46014,9 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46884,11 +46025,11 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46898,9 +46039,9 @@ - (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46909,9 +46050,9 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46920,11 +46061,11 @@ - (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46934,9 +46075,9 @@ - (void)subscribeAttributeCountdownTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46945,9 +46086,9 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46956,11 +46097,11 @@ - (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46970,9 +46111,9 @@ - (void)subscribeAttributeOperationalStateListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46981,9 +46122,9 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46992,11 +46133,44 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + [self writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47006,9 +46180,9 @@ - (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47017,9 +46191,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47028,11 +46202,11 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTRRVCOperationalS completion:completion]; } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47042,9 +46216,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47055,7 +46229,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47068,7 +46242,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47080,7 +46254,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47091,7 +46265,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47104,7 +46278,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47116,7 +46290,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47127,7 +46301,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47140,7 +46314,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47152,7 +46326,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47163,7 +46337,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47176,7 +46350,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47188,7 +46362,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47199,7 +46373,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47212,7 +46386,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47224,7 +46398,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47235,7 +46409,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47248,7 +46422,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47260,7 +46434,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47271,204 +46445,148 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterScenesManagement +@implementation MTRBaseClusterActivatedCarbonFilterMonitoring -- (void)addSceneWithParams:(MTRScenesManagementClusterAddSceneParams *)params completion:(void (^)(MTRScenesManagementClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRScenesManagementClusterAddSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ScenesManagement::Commands::AddScene::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self resetConditionWithParams:nil completion:completion]; } -- (void)viewSceneWithParams:(MTRScenesManagementClusterViewSceneParams *)params completion:(void (^)(MTRScenesManagementClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesManagementClusterViewSceneParams + params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ScenesManagement::Commands::ViewScene::Type; + using RequestType = ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterViewSceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)removeSceneWithParams:(MTRScenesManagementClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRScenesManagementClusterRemoveSceneParams - alloc] init]; - } + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ScenesManagement::Commands::RemoveScene::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterRemoveSceneResponseParams.class +- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)removeAllScenesWithParams:(MTRScenesManagementClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesManagementClusterRemoveAllScenesParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ScenesManagement::Commands::RemoveAllScenes::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterRemoveAllScenesResponseParams.class +- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesManagementClusterStoreSceneParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ScenesManagement::Commands::StoreScene::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterStoreSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRScenesManagementClusterRecallSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ScenesManagement::Commands::RecallScene::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)getSceneMembershipWithParams:(MTRScenesManagementClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRScenesManagementClusterGetSceneMembershipParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ScenesManagement::Commands::GetSceneMembership::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterGetSceneMembershipResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)copySceneWithParams:(MTRScenesManagementClusterCopySceneParams *)params completion:(void (^)(MTRScenesManagementClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRScenesManagementClusterCopySceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ScenesManagement::Commands::CopyScene::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesManagementClusterCopySceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47477,11 +46595,11 @@ - (void)readAttributeLastConfiguredByWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47491,9 +46609,9 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::LastConfiguredBy::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47502,9 +46620,9 @@ + (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47513,11 +46631,44 @@ - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; + [self writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47527,9 +46678,9 @@ - (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::SceneTableSize::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47538,22 +46689,22 @@ + (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47563,9 +46714,9 @@ - (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::FabricSceneInfo::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47576,7 +46727,7 @@ + (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47589,7 +46740,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47601,7 +46752,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47612,7 +46763,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47625,7 +46776,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47637,7 +46788,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47648,7 +46799,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47661,7 +46812,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47673,7 +46824,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::EventList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47684,7 +46835,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47697,7 +46848,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47709,7 +46860,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47720,7 +46871,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47733,7 +46884,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47745,7 +46896,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47756,7 +46907,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47769,7 +46920,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47781,7 +46932,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ScenesManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47792,16 +46943,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterHEPAFilterMonitoring +@implementation MTRBaseClusterBooleanStateConfiguration -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion +- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion { - [self resetConditionWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRHEPAFilterMonitoringClusterResetConditionParams + params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; } @@ -47811,7 +46982,7 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = HepaFilterMonitoring::Commands::ResetCondition::Type; + using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -47823,9 +46994,9 @@ - (void)resetConditionWithParams:(MTRHEPAFilterMonitoringClusterResetConditionPa completion:responseHandler]; } -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47834,11 +47005,39 @@ - (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; + [self writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47848,9 +47047,9 @@ - (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::Condition::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47859,9 +47058,9 @@ + (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47870,11 +47069,11 @@ - (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47884,9 +47083,9 @@ - (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::DegradationDirection::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47895,9 +47094,9 @@ + (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47906,11 +47105,11 @@ - (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47920,9 +47119,9 @@ - (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ChangeIndication::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47931,9 +47130,9 @@ + (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47942,11 +47141,11 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47956,9 +47155,9 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -47967,9 +47166,9 @@ + (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -47978,44 +47177,83 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - ListFreer listFreer; - using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } +- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); ++ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48025,9 +47263,9 @@ - (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48036,9 +47274,9 @@ + (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48047,11 +47285,11 @@ - (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _N completion:completion]; } -- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48061,9 +47299,9 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48074,7 +47312,7 @@ + (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48087,7 +47325,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48099,7 +47337,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48110,7 +47348,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48123,7 +47361,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48135,7 +47373,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48146,7 +47384,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48159,7 +47397,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48171,7 +47409,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48182,7 +47420,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48195,7 +47433,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48207,7 +47445,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48218,7 +47456,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48231,7 +47469,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48243,7 +47481,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48254,7 +47492,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48267,7 +47505,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48279,7 +47517,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = HepaFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48290,16 +47528,16 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterActivatedCarbonFilterMonitoring +@implementation MTRBaseClusterValveConfigurationAndControl -- (void)resetConditionWithCompletion:(MTRStatusCompletion)completion +- (void)openWithCompletion:(MTRStatusCompletion)completion { - [self resetConditionWithParams:nil completion:completion]; + [self openWithParams:nil completion:completion]; } -- (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterResetConditionParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams + params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; } @@ -48309,7 +47547,7 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type; + using RequestType = ValveConfigurationAndControl::Commands::Open::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -48320,118 +47558,38 @@ - (void)resetConditionWithParams:(MTRActivatedCarbonFilterMonitoringClusterReset queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeConditionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)closeWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeConditionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeConditionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::Condition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self closeWithParams:nil completion:completion]; } - -- (void)readAttributeDegradationDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRValveConfigurationAndControlClusterCloseParams + alloc] init]; + } -- (void)subscribeAttributeDegradationDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -+ (void)readAttributeDegradationDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeChangeIndicationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + using RequestType = ValveConfigurationAndControl::Commands::Close::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeChangeIndicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeChangeIndicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + completion:responseHandler]; } -- (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48440,11 +47598,11 @@ - (void)readAttributeInPlaceIndicatorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48454,9 +47612,9 @@ - (void)subscribeAttributeInPlaceIndicatorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48465,9 +47623,9 @@ + (void)readAttributeInPlaceIndicatorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48476,11 +47634,11 @@ - (void)readAttributeLastChangedTimeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -48495,7 +47653,7 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value param } ListFreer listFreer; - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -48509,47 +47667,11 @@ - (void)writeAttributeLastChangedTimeWithValue:(NSNumber * _Nullable)value param std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLastChangedTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLastChangedTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeReplacementProductListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48559,9 +47681,9 @@ - (void)subscribeAttributeReplacementProductListWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48570,9 +47692,9 @@ + (void)readAttributeReplacementProductListWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48581,11 +47703,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48595,9 +47717,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48606,9 +47728,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48617,11 +47739,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48631,9 +47753,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48642,9 +47764,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48653,11 +47775,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48667,9 +47789,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::EventList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48678,9 +47800,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48689,11 +47811,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48703,9 +47825,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::AttributeList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48714,9 +47836,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48725,11 +47847,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48739,9 +47861,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48750,9 +47872,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48761,11 +47883,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48775,9 +47897,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48786,62 +47908,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterBooleanStateConfiguration - -- (void)suppressAlarmWithParams:(MTRBooleanStateConfigurationClusterSuppressAlarmParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BooleanStateConfiguration::Commands::SuppressAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableDisableAlarmWithParams:(MTRBooleanStateConfigurationClusterEnableDisableAlarmParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BooleanStateConfiguration::Commands::EnableDisableAlarm::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48850,11 +47919,11 @@ - (void)readAttributeCurrentSensitivityLevelWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -48869,7 +47938,7 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)valu } ListFreer listFreer; - using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; @@ -48878,11 +47947,11 @@ - (void)writeAttributeCurrentSensitivityLevelWithValue:(NSNumber * _Nonnull)valu std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48892,9 +47961,9 @@ - (void)subscribeAttributeCurrentSensitivityLevelWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48903,9 +47972,9 @@ + (void)readAttributeCurrentSensitivityLevelWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48914,11 +47983,11 @@ - (void)readAttributeSupportedSensitivityLevelsWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48928,9 +47997,9 @@ - (void)subscribeAttributeSupportedSensitivityLevelsWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48939,9 +48008,9 @@ + (void)readAttributeSupportedSensitivityLevelsWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48950,11 +48019,11 @@ - (void)readAttributeDefaultSensitivityLevelWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLevelStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48964,9 +48033,9 @@ - (void)subscribeAttributeDefaultSensitivityLevelWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -48975,9 +48044,9 @@ + (void)readAttributeDefaultSensitivityLevelWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -48986,11 +48055,11 @@ - (void)readAttributeAlarmsActiveWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49000,9 +48069,9 @@ - (void)subscribeAttributeAlarmsActiveWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsActive::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49011,9 +48080,9 @@ + (void)readAttributeAlarmsActiveWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49022,11 +48091,11 @@ - (void)readAttributeAlarmsSuppressedWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49036,9 +48105,9 @@ - (void)subscribeAttributeAlarmsSuppressedWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSuppressed::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49047,9 +48116,9 @@ + (void)readAttributeAlarmsSuppressedWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49058,11 +48127,11 @@ - (void)readAttributeAlarmsEnabledWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49072,9 +48141,9 @@ - (void)subscribeAttributeAlarmsEnabledWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsEnabled::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49083,9 +48152,9 @@ + (void)readAttributeAlarmsEnabledWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49094,11 +48163,11 @@ - (void)readAttributeAlarmsSupportedWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49108,9 +48177,9 @@ - (void)subscribeAttributeAlarmsSupportedWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AlarmsSupported::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49119,9 +48188,9 @@ + (void)readAttributeAlarmsSupportedWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49130,11 +48199,11 @@ - (void)readAttributeSensorFaultWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49144,9 +48213,9 @@ - (void)subscribeAttributeSensorFaultWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::SensorFault::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49155,9 +48224,9 @@ + (void)readAttributeSensorFaultWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49166,11 +48235,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49180,9 +48249,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49191,9 +48260,13 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterElectricalPowerMeasurement + +- (void)readAttributePowerModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49202,11 +48275,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49216,9 +48289,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49227,9 +48300,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfMeasurementTypesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49238,11 +48311,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfMeasurementTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49252,9 +48325,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfMeasurementTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49263,9 +48336,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAccuracyWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49274,11 +48347,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49288,9 +48361,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49299,9 +48372,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRangesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49310,11 +48383,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRangesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49324,9 +48397,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRangesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49335,9 +48408,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49346,11 +48419,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49360,9 +48433,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanStateConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49371,70 +48444,45 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterValveConfigurationAndControl - -- (void)openWithCompletion:(MTRStatusCompletion)completion -{ - [self openWithParams:nil completion:completion]; -} -- (void)openWithParams:(MTRValveConfigurationAndControlClusterOpenParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)readAttributeActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRValveConfigurationAndControlClusterOpenParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ValveConfigurationAndControl::Commands::Open::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)closeWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self closeWithParams:nil completion:completion]; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)closeWithParams:(MTRValveConfigurationAndControlClusterCloseParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRValveConfigurationAndControlClusterCloseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ValveConfigurationAndControl::Commands::Close::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49443,11 +48491,11 @@ - (void)readAttributeOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49457,9 +48505,9 @@ - (void)subscribeAttributeOpenDurationWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::OpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49468,9 +48516,9 @@ + (void)readAttributeOpenDurationWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApparentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49479,44 +48527,47 @@ - (void)readAttributeDefaultOpenDurationWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeApparentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeDefaultOpenDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } ++ (void)readAttributeApparentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49526,9 +48577,9 @@ - (void)subscribeAttributeDefaultOpenDurationWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49537,9 +48588,9 @@ + (void)readAttributeDefaultOpenDurationWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49548,11 +48599,11 @@ - (void)readAttributeAutoCloseTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49562,9 +48613,9 @@ - (void)subscribeAttributeAutoCloseTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AutoCloseTime::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49573,9 +48624,9 @@ + (void)readAttributeAutoCloseTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49584,11 +48635,11 @@ - (void)readAttributeRemainingDurationWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49598,9 +48649,9 @@ - (void)subscribeAttributeRemainingDurationWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::RemainingDuration::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49609,9 +48660,9 @@ + (void)readAttributeRemainingDurationWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRMSVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49620,11 +48671,11 @@ - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRMSVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49634,9 +48685,9 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRMSVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49645,9 +48696,9 @@ + (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRMSCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49656,11 +48707,11 @@ - (void)readAttributeTargetStateWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRMSCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49670,9 +48721,9 @@ - (void)subscribeAttributeTargetStateWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRMSCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetState::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49681,9 +48732,9 @@ + (void)readAttributeTargetStateWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRMSPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49692,11 +48743,11 @@ - (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRMSPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49706,9 +48757,9 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRMSPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49717,9 +48768,9 @@ + (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49728,11 +48779,11 @@ - (void)readAttributeTargetLevelWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49742,9 +48793,9 @@ - (void)subscribeAttributeTargetLevelWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::TargetLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49753,9 +48804,9 @@ + (void)readAttributeTargetLevelWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHarmonicCurrentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49764,39 +48815,47 @@ - (void)readAttributeDefaultOpenLevelWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeHarmonicCurrentsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeDefaultOpenLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; ++ (void)readAttributeHarmonicCurrentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeHarmonicPhasesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHarmonicPhasesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49806,9 +48865,9 @@ - (void)subscribeAttributeDefaultOpenLevelWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHarmonicPhasesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::DefaultOpenLevel::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49817,9 +48876,9 @@ + (void)readAttributeDefaultOpenLevelWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49828,11 +48887,11 @@ - (void)readAttributeValveFaultWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49842,9 +48901,9 @@ - (void)subscribeAttributeValveFaultWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::ValveFault::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49853,9 +48912,9 @@ + (void)readAttributeValveFaultWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeLevelStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49864,11 +48923,11 @@ - (void)readAttributeLevelStepWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeLevelStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49878,9 +48937,9 @@ - (void)subscribeAttributeLevelStepWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::LevelStep::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49891,7 +48950,7 @@ + (void)readAttributeLevelStepWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49904,7 +48963,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49916,7 +48975,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49927,7 +48986,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49940,7 +48999,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49952,7 +49011,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49963,7 +49022,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49976,7 +49035,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -49988,7 +49047,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::EventList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -49999,7 +49058,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50012,7 +49071,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50024,7 +49083,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50035,7 +49094,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50048,7 +49107,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50060,7 +49119,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50071,7 +49130,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50084,7 +49143,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50096,7 +49155,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ValveConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50107,11 +49166,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterElectricalPowerMeasurement +@implementation MTRBaseClusterElectricalEnergyMeasurement -- (void)readAttributePowerModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50120,11 +49179,11 @@ - (void)readAttributePowerModeWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributePowerModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50134,9 +49193,9 @@ - (void)subscribeAttributePowerModeWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerMode::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50145,9 +49204,9 @@ + (void)readAttributePowerModeWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeNumberOfMeasurementTypesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50156,11 +49215,11 @@ - (void)readAttributeNumberOfMeasurementTypesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeNumberOfMeasurementTypesWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50170,9 +49229,9 @@ - (void)subscribeAttributeNumberOfMeasurementTypesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfMeasurementTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50181,9 +49240,9 @@ + (void)readAttributeNumberOfMeasurementTypesWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeAccuracyWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50192,11 +49251,11 @@ - (void)readAttributeAccuracyWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50206,9 +49265,9 @@ - (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Accuracy::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50217,9 +49276,9 @@ + (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeRangesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50228,11 +49287,11 @@ - (void)readAttributeRangesWithCompletion:(void (^)(NSArray * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeRangesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50242,9 +49301,9 @@ - (void)subscribeAttributeRangesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRangesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Ranges::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50253,9 +49312,9 @@ + (void)readAttributeRangesWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50264,11 +49323,11 @@ - (void)readAttributeVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50278,9 +49337,9 @@ - (void)subscribeAttributeVoltageWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Voltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50289,9 +49348,9 @@ + (void)readAttributeVoltageWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCumulativeEnergyResetWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50300,11 +49359,11 @@ - (void)readAttributeActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCumulativeEnergyResetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50314,9 +49373,9 @@ - (void)subscribeAttributeActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCumulativeEnergyResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50325,9 +49384,9 @@ + (void)readAttributeActiveCurrentWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50336,11 +49395,11 @@ - (void)readAttributeReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50350,9 +49409,9 @@ - (void)subscribeAttributeReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactiveCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50361,9 +49420,9 @@ + (void)readAttributeReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeApparentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50372,11 +49431,11 @@ - (void)readAttributeApparentCurrentWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeApparentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50386,9 +49445,9 @@ - (void)subscribeAttributeApparentCurrentWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentCurrent::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50397,9 +49456,9 @@ + (void)readAttributeApparentCurrentWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50408,11 +49467,11 @@ - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50422,9 +49481,9 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50433,9 +49492,9 @@ + (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50444,11 +49503,11 @@ - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50458,9 +49517,9 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50469,9 +49528,9 @@ + (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50480,11 +49539,11 @@ - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50494,9 +49553,9 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50505,9 +49564,9 @@ + (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRMSVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50516,11 +49575,11 @@ - (void)readAttributeRMSVoltageWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeRMSVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50530,9 +49589,9 @@ - (void)subscribeAttributeRMSVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRMSVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSVoltage::TypeInfo; + using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50541,45 +49600,66 @@ + (void)readAttributeRMSVoltageWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeRMSCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterWaterHeaterManagement + +- (void)boostWithParams:(MTRWaterHeaterManagementClusterBoostParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTRWaterHeaterManagementClusterBoostParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WaterHeaterManagement::Commands::Boost::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeRMSCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)cancelBoostWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self cancelBoostWithParams:nil completion:completion]; } - -+ (void)readAttributeRMSCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)cancelBoostWithParams:(MTRWaterHeaterManagementClusterCancelBoostParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRWaterHeaterManagementClusterCancelBoostParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WaterHeaterManagement::Commands::CancelBoost::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeRMSPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHeaterTypesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50588,11 +49668,11 @@ - (void)readAttributeRMSPowerWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeRMSPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHeaterTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50602,9 +49682,9 @@ - (void)subscribeAttributeRMSPowerWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRMSPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHeaterTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::RMSPower::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50613,9 +49693,9 @@ + (void)readAttributeRMSPowerWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHeatDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50624,11 +49704,11 @@ - (void)readAttributeFrequencyWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHeatDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50638,9 +49718,9 @@ - (void)subscribeAttributeFrequencyWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHeatDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::Frequency::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50649,9 +49729,9 @@ + (void)readAttributeFrequencyWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeHarmonicCurrentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTankVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50660,11 +49740,11 @@ - (void)readAttributeHarmonicCurrentsWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeHarmonicCurrentsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTankVolumeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50674,9 +49754,9 @@ - (void)subscribeAttributeHarmonicCurrentsWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHarmonicCurrentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTankVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicCurrents::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50685,9 +49765,9 @@ + (void)readAttributeHarmonicCurrentsWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeHarmonicPhasesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEstimatedHeatRequiredWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50696,11 +49776,11 @@ - (void)readAttributeHarmonicPhasesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeHarmonicPhasesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEstimatedHeatRequiredWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50710,9 +49790,9 @@ - (void)subscribeAttributeHarmonicPhasesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHarmonicPhasesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEstimatedHeatRequiredWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::HarmonicPhases::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50721,9 +49801,9 @@ + (void)readAttributeHarmonicPhasesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTankPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50732,11 +49812,11 @@ - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTankPercentageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50746,9 +49826,9 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTankPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50757,9 +49837,9 @@ + (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBoostStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50768,11 +49848,11 @@ - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBoostStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50782,9 +49862,9 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBoostStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50795,7 +49875,7 @@ + (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50808,7 +49888,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50820,7 +49900,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50831,7 +49911,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50844,7 +49924,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50856,7 +49936,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50867,7 +49947,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50880,7 +49960,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50892,7 +49972,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50903,7 +49983,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50916,7 +49996,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50928,7 +50008,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50939,7 +50019,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50952,7 +50032,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50964,7 +50044,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -50975,7 +50055,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -50988,7 +50068,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51000,7 +50080,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalPowerMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51011,11 +50091,136 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterElectricalEnergyMeasurement +@implementation MTRBaseClusterDemandResponseLoadControl -- (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion +- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearLoadControlEventsRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self clearLoadControlEventsRequestWithParams:nil completion:completion]; +} +- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51024,11 +50229,11 @@ - (void)readAttributeAccuracyWithCompletion:(void (^)(MTRElectricalEnergyMeasure completion:completion]; } -- (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51038,9 +50243,9 @@ - (void)subscribeAttributeAccuracyWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::Accuracy::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51049,9 +50254,9 @@ + (void)readAttributeAccuracyWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51060,11 +50265,11 @@ - (void)readAttributeCumulativeEnergyImportedWithCompletion:(void (^)(MTRElectri completion:completion]; } -- (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51074,9 +50279,9 @@ - (void)subscribeAttributeCumulativeEnergyImportedWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51085,9 +50290,9 @@ + (void)readAttributeCumulativeEnergyImportedWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51096,11 +50301,83 @@ - (void)readAttributeCumulativeEnergyExportedWithCompletion:(void (^)(MTRElectri completion:completion]; } -- (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51110,9 +50387,9 @@ - (void)subscribeAttributeCumulativeEnergyExportedWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51121,9 +50398,9 @@ + (void)readAttributeCumulativeEnergyExportedWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51132,11 +50409,11 @@ - (void)readAttributePeriodicEnergyImportedWithCompletion:(void (^)(MTRElectrica completion:completion]; } -- (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51146,9 +50423,9 @@ - (void)subscribeAttributePeriodicEnergyImportedWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51157,9 +50434,9 @@ + (void)readAttributePeriodicEnergyImportedWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51168,11 +50445,39 @@ - (void)readAttributePeriodicEnergyExportedWithCompletion:(void (^)(MTRElectrica completion:completion]; } -- (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; + [self writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51182,9 +50487,9 @@ - (void)subscribeAttributePeriodicEnergyExportedWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51193,9 +50498,9 @@ + (void)readAttributePeriodicEnergyExportedWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeCumulativeEnergyResetWithCompletion:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51204,11 +50509,39 @@ - (void)readAttributeCumulativeEnergyResetWithCompletion:(void (^)(MTRElectrical completion:completion]; } -- (void)subscribeAttributeCumulativeEnergyResetWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51218,9 +50551,9 @@ - (void)subscribeAttributeCumulativeEnergyResetWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCumulativeEnergyResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultRandomDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51231,7 +50564,7 @@ + (void)readAttributeCumulativeEnergyResetWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51244,7 +50577,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51256,7 +50589,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51267,7 +50600,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51280,7 +50613,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51292,7 +50625,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51303,7 +50636,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51316,7 +50649,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51328,7 +50661,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51339,7 +50672,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51352,7 +50685,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51364,7 +50697,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51375,7 +50708,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51388,7 +50721,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51400,7 +50733,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51411,7 +50744,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51424,7 +50757,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51436,7 +50769,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalEnergyMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51447,12 +50780,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterWaterHeaterManagement +@implementation MTRBaseClusterMessages -- (void)boostWithParams:(MTRWaterHeaterManagementClusterBoostParams *)params completion:(MTRStatusCompletion)completion +- (void)presentMessagesRequestWithParams:(MTRMessagesClusterPresentMessagesRequestParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWaterHeaterManagementClusterBoostParams + params = [[MTRMessagesClusterPresentMessagesRequestParams alloc] init]; } @@ -51462,7 +50795,7 @@ - (void)boostWithParams:(MTRWaterHeaterManagementClusterBoostParams *)params com auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WaterHeaterManagement::Commands::Boost::Type; + using RequestType = Messages::Commands::PresentMessagesRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -51473,14 +50806,10 @@ - (void)boostWithParams:(MTRWaterHeaterManagementClusterBoostParams *)params com queue:self.callbackQueue completion:responseHandler]; } -- (void)cancelBoostWithCompletion:(MTRStatusCompletion)completion -{ - [self cancelBoostWithParams:nil completion:completion]; -} -- (void)cancelBoostWithParams:(MTRWaterHeaterManagementClusterCancelBoostParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)cancelMessagesRequestWithParams:(MTRMessagesClusterCancelMessagesRequestParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWaterHeaterManagementClusterCancelBoostParams + params = [[MTRMessagesClusterCancelMessagesRequestParams alloc] init]; } @@ -51490,7 +50819,7 @@ - (void)cancelBoostWithParams:(MTRWaterHeaterManagementClusterCancelBoostParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = WaterHeaterManagement::Commands::CancelBoost::Type; + using RequestType = Messages::Commands::CancelMessagesRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -51502,153 +50831,9 @@ - (void)cancelBoostWithParams:(MTRWaterHeaterManagementClusterCancelBoostParams completion:responseHandler]; } -- (void)readAttributeHeaterTypesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeHeaterTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeHeaterTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeaterTypes::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeHeatDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeHeatDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeHeatDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::HeatDemand::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTankVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeTankVolumeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTankVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::TankVolume::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEstimatedHeatRequiredWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEstimatedHeatRequiredWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEstimatedHeatRequiredWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterManagement::Attributes::EstimatedHeatRequired::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTankPercentageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMessagesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; + using TypeInfo = Messages::Attributes::Messages::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51657,11 +50842,11 @@ - (void)readAttributeTankPercentageWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTankPercentageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMessagesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; + using TypeInfo = Messages::Attributes::Messages::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51671,9 +50856,9 @@ - (void)subscribeAttributeTankPercentageWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTankPercentageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMessagesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::TankPercentage::TypeInfo; + using TypeInfo = Messages::Attributes::Messages::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51682,9 +50867,9 @@ + (void)readAttributeTankPercentageWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeBoostStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveMessageIDsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; + using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51693,11 +50878,11 @@ - (void)readAttributeBoostStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeBoostStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveMessageIDsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; + using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51707,9 +50892,9 @@ - (void)subscribeAttributeBoostStateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBoostStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveMessageIDsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::BoostState::TypeInfo; + using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51720,7 +50905,7 @@ + (void)readAttributeBoostStateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51733,7 +50918,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51745,7 +50930,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51756,7 +50941,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51769,7 +50954,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51781,7 +50966,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51792,7 +50977,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = Messages::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51805,7 +50990,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = Messages::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51817,7 +51002,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = Messages::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51828,7 +51013,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51841,7 +51026,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51853,7 +51038,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51864,7 +51049,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51877,7 +51062,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51889,7 +51074,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51900,7 +51085,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51913,7 +51098,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -51925,7 +51110,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -51936,12 +51121,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDemandResponseLoadControl +@implementation MTRBaseClusterDeviceEnergyManagement -- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams + params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; } @@ -51951,7 +51136,7 @@ - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadContro auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type; + using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -51962,10 +51147,14 @@ - (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadContro queue:self.callbackQueue completion:responseHandler]; } -- (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)cancelPowerAdjustRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self cancelPowerAdjustRequestWithParams:nil completion:completion]; +} +- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams + params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; } @@ -51975,7 +51164,7 @@ - (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadCont auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type; + using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -51986,10 +51175,10 @@ - (void)unregisterLoadControlProgramRequestWithParams:(MTRDemandResponseLoadCont queue:self.callbackQueue completion:responseHandler]; } -- (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams + params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; } @@ -51999,7 +51188,7 @@ - (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlCluste auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type; + using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -52010,10 +51199,10 @@ - (void)addLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlCluste queue:self.callbackQueue completion:responseHandler]; } -- (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams + params = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; } @@ -52023,7 +51212,7 @@ - (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type; + using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -52034,14 +51223,14 @@ - (void)removeLoadControlEventRequestWithParams:(MTRDemandResponseLoadControlClu queue:self.callbackQueue completion:responseHandler]; } -- (void)clearLoadControlEventsRequestWithCompletion:(MTRStatusCompletion)completion +- (void)resumeRequestWithCompletion:(MTRStatusCompletion)completion { - [self clearLoadControlEventsRequestWithParams:nil completion:completion]; + [self resumeRequestWithParams:nil completion:completion]; } -- (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams + params = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; } @@ -52051,7 +51240,7 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type; + using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -52062,35 +51251,111 @@ - (void)clearLoadControlEventsRequestWithParams:(MTRDemandResponseLoadControlClu queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeLoadControlProgramsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams + alloc] init]; + } -- (void)subscribeAttributeLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)cancelRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self cancelRequestWithParams:nil completion:completion]; +} +- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDeviceEnergyManagementClusterCancelRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) params:params queue:self.callbackQueue reportHandler:reportHandler subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::LoadControlPrograms::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52099,9 +51364,9 @@ + (void)readAttributeLoadControlProgramsWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52110,11 +51375,11 @@ - (void)readAttributeNumberOfLoadControlProgramsWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52124,9 +51389,9 @@ - (void)subscribeAttributeNumberOfLoadControlProgramsWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52135,9 +51400,9 @@ + (void)readAttributeNumberOfLoadControlProgramsWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52146,11 +51411,11 @@ - (void)readAttributeEventsWithCompletion:(void (^)(NSArray * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52160,9 +51425,9 @@ - (void)subscribeAttributeEventsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::Events::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52171,9 +51436,9 @@ + (void)readAttributeEventsWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52182,11 +51447,11 @@ - (void)readAttributeActiveEventsWithCompletion:(void (^)(NSArray * _Nullable va completion:completion]; } -- (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52196,9 +51461,9 @@ - (void)subscribeAttributeActiveEventsWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::ActiveEvents::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52207,9 +51472,9 @@ + (void)readAttributeActiveEventsWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52218,11 +51483,11 @@ - (void)readAttributeNumberOfEventsPerProgramWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52232,9 +51497,9 @@ - (void)subscribeAttributeNumberOfEventsPerProgramWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52243,9 +51508,9 @@ + (void)readAttributeNumberOfEventsPerProgramWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52254,11 +51519,11 @@ - (void)readAttributeNumberOfTransitionsWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52268,9 +51533,9 @@ - (void)subscribeAttributeNumberOfTransitionsWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::NumberOfTransitions::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52279,9 +51544,9 @@ + (void)readAttributeNumberOfTransitionsWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52290,39 +51555,11 @@ - (void)readAttributeDefaultRandomStartWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDefaultRandomStartWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52332,9 +51569,9 @@ - (void)subscribeAttributeDefaultRandomStartWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomStart::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52343,9 +51580,9 @@ + (void)readAttributeDefaultRandomStartWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52354,39 +51591,11 @@ - (void)readAttributeDefaultRandomDurationWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeDefaultRandomDurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52396,9 +51605,9 @@ - (void)subscribeAttributeDefaultRandomDurationWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultRandomDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::DefaultRandomDuration::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52409,7 +51618,7 @@ + (void)readAttributeDefaultRandomDurationWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52422,7 +51631,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52434,7 +51643,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52445,7 +51654,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52458,7 +51667,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52470,7 +51679,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52481,7 +51690,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52494,7 +51703,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52506,7 +51715,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52517,7 +51726,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52530,7 +51739,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52542,7 +51751,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52553,7 +51762,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52566,7 +51775,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52578,7 +51787,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52589,7 +51798,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52602,7 +51811,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52614,7 +51823,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DemandResponseLoadControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52625,12 +51834,16 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterMessages +@implementation MTRBaseClusterEnergyEVSE -- (void)presentMessagesRequestWithParams:(MTRMessagesClusterPresentMessagesRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)disableWithCompletion:(MTRStatusCompletion)completion +{ + [self disableWithParams:nil completion:completion]; +} +- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMessagesClusterPresentMessagesRequestParams + params = [[MTREnergyEVSEClusterDisableParams alloc] init]; } @@ -52639,8 +51852,11 @@ - (void)presentMessagesRequestWithParams:(MTRMessagesClusterPresentMessagesReque }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = Messages::Commands::PresentMessagesRequest::Type; + using RequestType = EnergyEvse::Commands::Disable::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -52651,10 +51867,10 @@ - (void)presentMessagesRequestWithParams:(MTRMessagesClusterPresentMessagesReque queue:self.callbackQueue completion:responseHandler]; } -- (void)cancelMessagesRequestWithParams:(MTRMessagesClusterCancelMessagesRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRMessagesClusterCancelMessagesRequestParams + params = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; } @@ -52663,8 +51879,11 @@ - (void)cancelMessagesRequestWithParams:(MTRMessagesClusterCancelMessagesRequest }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = Messages::Commands::CancelMessagesRequest::Type; + using RequestType = EnergyEvse::Commands::EnableCharging::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -52675,10 +51894,157 @@ - (void)cancelMessagesRequestWithParams:(MTRMessagesClusterCancelMessagesRequest queue:self.callbackQueue completion:responseHandler]; } +- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterEnableDischargingParams + alloc] init]; + } -- (void)readAttributeMessagesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::EnableDischarging::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startDiagnosticsWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = Messages::Attributes::Messages::TypeInfo; + [self startDiagnosticsWithParams:nil completion:completion]; +} +- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterStartDiagnosticsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterSetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::SetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getTargetsWithParams:nil completion:completion]; +} +- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterGetTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::GetTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTREnergyEVSEClusterGetTargetsResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearTargetsWithCompletion:(MTRStatusCompletion)completion +{ + [self clearTargetsWithParams:nil completion:completion]; +} +- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTREnergyEVSEClusterClearTargetsParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = EnergyEvse::Commands::ClearTargets::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52687,11 +52053,11 @@ - (void)readAttributeMessagesWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeMessagesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::Messages::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52701,9 +52067,9 @@ - (void)subscribeAttributeMessagesWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMessagesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::Messages::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52712,9 +52078,9 @@ + (void)readAttributeMessagesWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeActiveMessageIDsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52723,11 +52089,11 @@ - (void)readAttributeActiveMessageIDsWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeActiveMessageIDsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52737,9 +52103,9 @@ - (void)subscribeAttributeActiveMessageIDsWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveMessageIDsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::ActiveMessageIDs::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52748,9 +52114,9 @@ + (void)readAttributeActiveMessageIDsWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52759,11 +52125,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52773,9 +52139,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52784,9 +52150,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52795,11 +52161,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52809,9 +52175,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52820,9 +52186,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52831,11 +52197,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52845,9 +52211,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52856,9 +52222,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52867,11 +52233,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52881,9 +52247,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52892,9 +52258,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52903,11 +52269,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52917,9 +52283,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52928,9 +52294,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52939,11 +52305,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -52953,9 +52319,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Messages::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -52964,218 +52330,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDeviceEnergyManagement - -- (void)powerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterPowerAdjustRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::PowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)cancelPowerAdjustRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self cancelPowerAdjustRequestWithParams:nil completion:completion]; -} -- (void)cancelPowerAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startTimeAdjustRequestWithParams:(MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)pauseRequestWithParams:(MTRDeviceEnergyManagementClusterPauseRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterPauseRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::PauseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resumeRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self resumeRequestWithParams:nil completion:completion]; -} -- (void)resumeRequestWithParams:(MTRDeviceEnergyManagementClusterResumeRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterResumeRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::ResumeRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)modifyForecastRequestWithParams:(MTRDeviceEnergyManagementClusterModifyForecastRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::ModifyForecastRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)requestConstraintBasedForecastWithParams:(MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)cancelRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self cancelRequestWithParams:nil completion:completion]; -} -- (void)cancelRequestWithParams:(MTRDeviceEnergyManagementClusterCancelRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementClusterCancelRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagement::Commands::CancelRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53184,11 +52341,11 @@ - (void)readAttributeESATypeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53198,9 +52355,9 @@ - (void)subscribeAttributeESATypeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAType::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53209,9 +52366,9 @@ + (void)readAttributeESATypeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53220,11 +52377,39 @@ - (void)readAttributeESACanGenerateWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + [self writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.longLongValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53234,9 +52419,9 @@ - (void)subscribeAttributeESACanGenerateWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESACanGenerate::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53245,9 +52430,9 @@ + (void)readAttributeESACanGenerateWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53256,11 +52441,39 @@ - (void)readAttributeESAStateWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + [self writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRandomizationDelayWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53270,9 +52483,9 @@ - (void)subscribeAttributeESAStateWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ESAState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53281,9 +52494,9 @@ + (void)readAttributeESAStateWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53292,11 +52505,11 @@ - (void)readAttributeAbsMinPowerWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53306,9 +52519,9 @@ - (void)subscribeAttributeAbsMinPowerWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMinPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53317,9 +52530,9 @@ + (void)readAttributeAbsMinPowerWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53328,11 +52541,11 @@ - (void)readAttributeAbsMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNextChargeTargetTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53342,9 +52555,9 @@ - (void)subscribeAttributeAbsMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNextChargeTargetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AbsMaxPower::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53353,9 +52566,9 @@ + (void)readAttributeAbsMaxPowerWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNextChargeRequiredEnergyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53364,11 +52577,11 @@ - (void)readAttributePowerAdjustmentCapabilityWithCompletion:(void (^)(MTRDevice completion:completion]; } -- (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNextChargeRequiredEnergyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53378,9 +52591,9 @@ - (void)subscribeAttributePowerAdjustmentCapabilityWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNextChargeRequiredEnergyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53389,9 +52602,9 @@ + (void)readAttributePowerAdjustmentCapabilityWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNextChargeTargetSoCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53400,11 +52613,11 @@ - (void)readAttributeForecastWithCompletion:(void (^)(MTRDeviceEnergyManagementC completion:completion]; } -- (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53414,9 +52627,9 @@ - (void)subscribeAttributeForecastWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::Forecast::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53425,9 +52638,9 @@ + (void)readAttributeForecastWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53436,11 +52649,44 @@ - (void)readAttributeOptOutStateWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + [self writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53450,9 +52696,9 @@ - (void)subscribeAttributeOptOutStateWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::OptOutState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53461,9 +52707,9 @@ + (void)readAttributeOptOutStateWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53472,11 +52718,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53486,9 +52732,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53497,9 +52743,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53508,11 +52754,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53522,9 +52768,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53533,9 +52779,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53544,47 +52790,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53594,9 +52804,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53605,9 +52815,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53616,11 +52826,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53630,9 +52840,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53641,9 +52851,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53652,11 +52862,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53666,9 +52876,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53677,219 +52887,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterEnergyEVSE - -- (void)disableWithCompletion:(MTRStatusCompletion)completion -{ - [self disableWithParams:nil completion:completion]; -} -- (void)disableWithParams:(MTREnergyEVSEClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterDisableParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableChargingWithParams:(MTREnergyEVSEClusterEnableChargingParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterEnableChargingParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::EnableCharging::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableDischargingWithParams:(MTREnergyEVSEClusterEnableDischargingParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterEnableDischargingParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::EnableDischarging::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startDiagnosticsWithCompletion:(MTRStatusCompletion)completion -{ - [self startDiagnosticsWithParams:nil completion:completion]; -} -- (void)startDiagnosticsWithParams:(MTREnergyEVSEClusterStartDiagnosticsParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterStartDiagnosticsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::StartDiagnostics::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterSetTargetsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::SetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getTargetsWithParams:nil completion:completion]; -} -- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterGetTargetsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::GetTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTREnergyEVSEClusterGetTargetsResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearTargetsWithCompletion:(MTRStatusCompletion)completion -{ - [self clearTargetsWithParams:nil completion:completion]; -} -- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTREnergyEVSEClusterClearTargetsParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = EnergyEvse::Commands::ClearTargets::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53898,11 +52898,11 @@ - (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53912,9 +52912,9 @@ - (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::State::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53923,9 +52923,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53934,11 +52934,11 @@ - (void)readAttributeSupplyStateWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53948,9 +52948,9 @@ - (void)subscribeAttributeSupplyStateWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SupplyState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53959,9 +52959,9 @@ + (void)readAttributeSupplyStateWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53970,11 +52970,11 @@ - (void)readAttributeFaultStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -53984,9 +52984,9 @@ - (void)subscribeAttributeFaultStateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::FaultState::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -53995,9 +52995,9 @@ + (void)readAttributeFaultStateWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54006,11 +53006,11 @@ - (void)readAttributeChargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54020,9 +53020,9 @@ - (void)subscribeAttributeChargingEnabledUntilWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ChargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54031,9 +53031,9 @@ + (void)readAttributeChargingEnabledUntilWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54042,11 +53042,11 @@ - (void)readAttributeDischargingEnabledUntilWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54056,9 +53056,9 @@ - (void)subscribeAttributeDischargingEnabledUntilWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::DischargingEnabledUntil::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54067,9 +53067,9 @@ + (void)readAttributeDischargingEnabledUntilWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54078,11 +53078,11 @@ - (void)readAttributeCircuitCapacityWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54092,9 +53092,9 @@ - (void)subscribeAttributeCircuitCapacityWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::CircuitCapacity::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54103,9 +53103,9 @@ + (void)readAttributeCircuitCapacityWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54114,11 +53114,11 @@ - (void)readAttributeMinimumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54128,9 +53128,9 @@ - (void)subscribeAttributeMinimumChargeCurrentWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MinimumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54139,9 +53139,9 @@ + (void)readAttributeMinimumChargeCurrentWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54150,11 +53150,11 @@ - (void)readAttributeMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54164,9 +53164,9 @@ - (void)subscribeAttributeMaximumChargeCurrentWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54175,9 +53175,13 @@ + (void)readAttributeMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterEnergyPreference + +- (void)readAttributeEnergyBalancesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54186,11 +53190,11 @@ - (void)readAttributeMaximumDischargeCurrentWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnergyBalancesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54200,9 +53204,9 @@ - (void)subscribeAttributeMaximumDischargeCurrentWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnergyBalancesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::MaximumDischargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54211,9 +53215,9 @@ + (void)readAttributeMaximumDischargeCurrentWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentEnergyBalanceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54222,11 +53226,11 @@ - (void)readAttributeUserMaximumChargeCurrentWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -54241,20 +53245,20 @@ - (void)writeAttributeUserMaximumChargeCurrentWithValue:(NSNumber * _Nonnull)val } ListFreer listFreer; - using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.longLongValue; + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentEnergyBalanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54264,9 +53268,9 @@ - (void)subscribeAttributeUserMaximumChargeCurrentWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentEnergyBalanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::UserMaximumChargeCurrent::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54275,9 +53279,9 @@ + (void)readAttributeUserMaximumChargeCurrentWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnergyPrioritiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54286,51 +53290,23 @@ - (void)readAttributeRandomizationDelayWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeEnergyPrioritiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeRandomizationDelayWindowWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeEnergyPrioritiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRandomizationDelayWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::RandomizationDelayWindow::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54339,9 +53315,9 @@ + (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLowPowerModeSensitivitiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54350,11 +53326,11 @@ - (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLowPowerModeSensitivitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54364,9 +53340,9 @@ - (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLowPowerModeSensitivitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54375,9 +53351,9 @@ + (void)readAttributeNextChargeStartTimeWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentLowPowerModeSensitivityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54386,83 +53362,39 @@ - (void)readAttributeNextChargeTargetTimeWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeNextChargeTargetTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNextChargeTargetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeNextChargeRequiredEnergyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeNextChargeRequiredEnergyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -+ (void)readAttributeNextChargeRequiredEnergyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NextChargeRequiredEnergy::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + ListFreer listFreer; + using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; -- (void)readAttributeNextChargeTargetSoCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentLowPowerModeSensitivityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54472,9 +53404,9 @@ - (void)subscribeAttributeNextChargeTargetSoCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLowPowerModeSensitivityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::NextChargeTargetSoC::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54483,9 +53415,9 @@ + (void)readAttributeNextChargeTargetSoCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54494,44 +53426,11 @@ - (void)readAttributeApproximateEVEfficiencyWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeApproximateEVEfficiencyWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54541,9 +53440,9 @@ - (void)subscribeAttributeApproximateEVEfficiencyWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ApproximateEVEfficiency::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54552,9 +53451,9 @@ + (void)readAttributeApproximateEVEfficiencyWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54563,11 +53462,11 @@ - (void)readAttributeStateOfChargeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54577,9 +53476,9 @@ - (void)subscribeAttributeStateOfChargeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::StateOfCharge::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54588,9 +53487,9 @@ + (void)readAttributeStateOfChargeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54599,11 +53498,11 @@ - (void)readAttributeBatteryCapacityWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54613,9 +53512,9 @@ - (void)subscribeAttributeBatteryCapacityWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::BatteryCapacity::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54624,9 +53523,9 @@ + (void)readAttributeBatteryCapacityWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54635,11 +53534,11 @@ - (void)readAttributeVehicleIDWithCompletion:(void (^)(NSString * _Nullable valu completion:completion]; } -- (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54649,9 +53548,9 @@ - (void)subscribeAttributeVehicleIDWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::VehicleID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54660,9 +53559,9 @@ + (void)readAttributeVehicleIDWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54671,11 +53570,11 @@ - (void)readAttributeSessionIDWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54685,9 +53584,9 @@ - (void)subscribeAttributeSessionIDWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionID::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54696,9 +53595,9 @@ + (void)readAttributeSessionIDWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54707,11 +53606,11 @@ - (void)readAttributeSessionDurationWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54721,9 +53620,9 @@ - (void)subscribeAttributeSessionDurationWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionDuration::TypeInfo; + using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54732,9 +53631,13 @@ + (void)readAttributeSessionDurationWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterPowerTopology + +- (void)readAttributeAvailableEndpointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54743,11 +53646,11 @@ - (void)readAttributeSessionEnergyChargedWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAvailableEndpointsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54757,9 +53660,9 @@ - (void)subscribeAttributeSessionEnergyChargedWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAvailableEndpointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyCharged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54768,9 +53671,9 @@ + (void)readAttributeSessionEnergyChargedWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveEndpointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54779,11 +53682,11 @@ - (void)readAttributeSessionEnergyDischargedWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveEndpointsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54793,9 +53696,9 @@ - (void)subscribeAttributeSessionEnergyDischargedWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveEndpointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::SessionEnergyDischarged::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54806,7 +53709,7 @@ + (void)readAttributeSessionEnergyDischargedWithClusterStateCache:(MTRClusterSta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54819,7 +53722,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54831,7 +53734,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54842,7 +53745,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54855,7 +53758,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54867,7 +53770,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54878,7 +53781,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54891,7 +53794,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54903,7 +53806,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::EventList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54914,7 +53817,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54927,7 +53830,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54939,7 +53842,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54950,7 +53853,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54963,7 +53866,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54975,7 +53878,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -54986,7 +53889,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -54999,7 +53902,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55011,7 +53914,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvse::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55022,11 +53925,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterEnergyPreference +@implementation MTRBaseClusterEnergyEVSEMode -- (void)readAttributeEnergyBalancesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)params completion:(void (^)(MTREnergyEVSEModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; + if (params == nil) { + params = [[MTREnergyEVSEModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = EnergyEvseMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTREnergyEVSEModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55035,11 +53963,11 @@ - (void)readAttributeEnergyBalancesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeEnergyBalancesWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55049,9 +53977,9 @@ - (void)subscribeAttributeEnergyBalancesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnergyBalancesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EnergyBalances::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55060,9 +53988,9 @@ + (void)readAttributeEnergyBalancesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentEnergyBalanceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55071,11 +53999,47 @@ - (void)readAttributeCurrentEnergyBalanceWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -55090,20 +54054,25 @@ - (void)writeAttributeCurrentEnergyBalanceWithValue:(NSNumber * _Nonnull)value p } ListFreer listFreer; - using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCurrentEnergyBalanceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55113,9 +54082,9 @@ - (void)subscribeAttributeCurrentEnergyBalanceWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentEnergyBalanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::CurrentEnergyBalance::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55124,9 +54093,9 @@ + (void)readAttributeCurrentEnergyBalanceWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeEnergyPrioritiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55135,11 +54104,44 @@ - (void)readAttributeEnergyPrioritiesWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeEnergyPrioritiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55149,9 +54151,9 @@ - (void)subscribeAttributeEnergyPrioritiesWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnergyPrioritiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EnergyPriorities::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55160,9 +54162,9 @@ + (void)readAttributeEnergyPrioritiesWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLowPowerModeSensitivitiesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55171,11 +54173,11 @@ - (void)readAttributeLowPowerModeSensitivitiesWithCompletion:(void (^)(NSArray * completion:completion]; } -- (void)subscribeAttributeLowPowerModeSensitivitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55185,9 +54187,9 @@ - (void)subscribeAttributeLowPowerModeSensitivitiesWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLowPowerModeSensitivitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::LowPowerModeSensitivities::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55196,9 +54198,9 @@ + (void)readAttributeLowPowerModeSensitivitiesWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeCurrentLowPowerModeSensitivityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55207,39 +54209,11 @@ - (void)readAttributeCurrentLowPowerModeSensitivityWithCompletion:(void (^)(NSNu completion:completion]; } -- (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeCurrentLowPowerModeSensitivityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeCurrentLowPowerModeSensitivityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55249,9 +54223,9 @@ - (void)subscribeAttributeCurrentLowPowerModeSensitivityWithParams:(MTRSubscribe subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentLowPowerModeSensitivityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55260,9 +54234,9 @@ + (void)readAttributeCurrentLowPowerModeSensitivityWithClusterStateCache:(MTRClu completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55271,11 +54245,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55285,9 +54259,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55296,9 +54270,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55307,11 +54281,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55321,9 +54295,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55332,9 +54306,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55343,11 +54317,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55357,9 +54331,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::EventList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55368,9 +54342,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55379,11 +54353,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55393,9 +54367,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::AttributeList::TypeInfo; + using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55404,9 +54378,38 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterWaterHeaterMode + +- (void)changeToModeWithParams:(MTRWaterHeaterModeClusterChangeToModeParams *)params completion:(void (^)(MTRWaterHeaterModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; + if (params == nil) { + params = [[MTRWaterHeaterModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WaterHeaterMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRWaterHeaterModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55415,11 +54418,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55429,9 +54432,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55440,9 +54443,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55451,11 +54454,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55465,9 +54468,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyPreference::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55476,13 +54479,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterPowerTopology - -- (void)readAttributeAvailableEndpointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55491,11 +54490,44 @@ - (void)readAttributeAvailableEndpointsWithCompletion:(void (^)(NSArray * _Nulla completion:completion]; } -- (void)subscribeAttributeAvailableEndpointsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55505,9 +54537,9 @@ - (void)subscribeAttributeAvailableEndpointsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAvailableEndpointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AvailableEndpoints::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55516,9 +54548,9 @@ + (void)readAttributeAvailableEndpointsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeActiveEndpointsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55527,11 +54559,44 @@ - (void)readAttributeActiveEndpointsWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeActiveEndpointsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55541,9 +54606,9 @@ - (void)subscribeAttributeActiveEndpointsWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveEndpointsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::ActiveEndpoints::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55554,7 +54619,7 @@ + (void)readAttributeActiveEndpointsWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55567,7 +54632,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55579,7 +54644,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55590,7 +54655,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55603,7 +54668,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55615,7 +54680,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55626,7 +54691,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55639,7 +54704,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55651,7 +54716,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::EventList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55662,7 +54727,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55675,7 +54740,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55687,7 +54752,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::AttributeList::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55698,7 +54763,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55711,7 +54776,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55723,7 +54788,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::FeatureMap::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55734,7 +54799,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55747,7 +54812,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55759,7 +54824,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerTopology::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55770,12 +54835,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterEnergyEVSEMode +@implementation MTRBaseClusterDeviceEnergyManagementMode -- (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)params completion:(void (^)(MTREnergyEVSEModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToModeParams *)params completion:(void (^)(MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTREnergyEVSEModeClusterChangeToModeParams + params = [[MTRDeviceEnergyManagementModeClusterChangeToModeParams alloc] init]; } @@ -55785,21 +54850,21 @@ - (void)changeToModeWithParams:(MTREnergyEVSEModeClusterChangeToModeParams *)par auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = EnergyEvseMode::Commands::ChangeToMode::Type; + using RequestType = DeviceEnergyManagementMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTREnergyEVSEModeClusterChangeToModeResponseParams.class + responseClass:MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55812,7 +54877,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55824,7 +54889,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55835,7 +54900,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55848,7 +54913,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55860,7 +54925,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55871,7 +54936,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55899,7 +54964,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -55917,7 +54982,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55929,7 +54994,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -55940,7 +55005,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55968,7 +55033,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -55986,7 +55051,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -55998,7 +55063,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56009,7 +55074,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56022,7 +55087,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56034,7 +55099,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56045,7 +55110,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56058,7 +55123,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56070,7 +55135,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56081,7 +55146,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56094,7 +55159,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56106,7 +55171,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::EventList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56117,7 +55182,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56130,7 +55195,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56142,7 +55207,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56153,7 +55218,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56166,7 +55231,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56178,7 +55243,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56189,7 +55254,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56202,7 +55267,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56214,7 +55279,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EnergyEvseMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56225,354 +55290,562 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterWaterHeaterMode +@implementation MTRBaseClusterDoorLock -- (void)changeToModeWithParams:(MTRWaterHeaterModeClusterChangeToModeParams *)params completion:(void (^)(MTRWaterHeaterModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)lockDoorWithCompletion:(MTRStatusCompletion)completion +{ + [self lockDoorWithParams:nil completion:completion]; +} +- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWaterHeaterModeClusterChangeToModeParams + params = [[MTRDoorLockClusterLockDoorParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } - using RequestType = WaterHeaterMode::Commands::ChangeToMode::Type; + using RequestType = DoorLock::Commands::LockDoor::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRWaterHeaterModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)unlockDoorWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self unlockDoorWithParams:nil completion:completion]; } - -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterUnlockDoorParams + alloc] init]; + } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::SupportedModes::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnlockDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterUnlockWithTimeoutParams + alloc] init]; + } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::CurrentMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + if (params == nil) { + params = [[MTRDoorLockClusterSetWeekDayScheduleParams + alloc] init]; + } - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; - ListFreer listFreer; - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterGetWeekDayScheduleParams + alloc] init]; + } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::StartUpMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + if (params == nil) { + params = [[MTRDoorLockClusterClearWeekDayScheduleParams + alloc] init]; + } - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; - ListFreer listFreer; - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterSetYearDayScheduleParams + alloc] init]; + } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::OnMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterGetYearDayScheduleParams + alloc] init]; + } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterClearYearDayScheduleParams + alloc] init]; + } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRDoorLockClusterSetHolidayScheduleParams + alloc] init]; + } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WaterHeaterMode::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; + if (params == nil) { + params = [[MTRDoorLockClusterGetHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearHolidayScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetUser::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetUserResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearUserParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearUser::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterSetCredentialResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterGetCredentialStatusParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = DoorLock::Commands::GetCredentialStatus::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearCredentialParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearCredential::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unboltDoorWithCompletion:(MTRStatusCompletion)completion +{ + [self unboltDoorWithParams:nil completion:completion]; +} +- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterUnboltDoorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::UnboltDoor::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterSetAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearAliroReaderConfigWithCompletion:(MTRStatusCompletion)completion +{ + [self clearAliroReaderConfigWithParams:nil completion:completion]; +} +- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRDoorLockClusterClearAliroReaderConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56581,11 +55854,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56595,9 +55868,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56606,9 +55879,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56617,11 +55890,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56631,9 +55904,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56642,9 +55915,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56653,11 +55926,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56667,9 +55940,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WaterHeaterMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56678,38 +55951,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDeviceEnergyManagementMode - -- (void)changeToModeWithParams:(MTRDeviceEnergyManagementModeClusterChangeToModeParams *)params completion:(void (^)(MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDeviceEnergyManagementModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DeviceEnergyManagementMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56718,11 +55962,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56732,9 +55976,9 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56743,9 +55987,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56754,11 +55998,39 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; + [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56768,9 +56040,9 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56779,9 +56051,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56790,11 +56062,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -56809,25 +56081,20 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.unsignedIntValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56837,9 +56104,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56848,9 +56115,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56859,11 +56126,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -56878,25 +56145,20 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.unsignedShortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56906,9 +56168,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::OnMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56917,9 +56179,9 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56928,11 +56190,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56942,9 +56204,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56953,9 +56215,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56964,11 +56226,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -56978,9 +56240,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -56989,9 +56251,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57000,11 +56262,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57014,9 +56276,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::EventList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57025,9 +56287,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57036,11 +56298,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57050,9 +56312,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57061,9 +56323,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57072,11 +56334,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57086,9 +56348,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57097,9 +56359,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57108,11 +56370,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57122,9 +56384,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DeviceEnergyManagementMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57133,577 +56395,330 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end +- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterDoorLock +- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)lockDoorWithCompletion:(MTRStatusCompletion)completion ++ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self lockDoorWithParams:nil completion:completion]; + using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)lockDoorWithParams:(MTRDoorLockClusterLockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion + +- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRDoorLockClusterLockDoorParams - alloc] init]; - } + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::LockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)unlockDoorWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self unlockDoorWithParams:nil completion:completion]; + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)unlockDoorWithParams:(MTRDoorLockClusterUnlockDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterUnlockDoorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::UnlockDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)unlockWithTimeoutWithParams:(MTRDoorLockClusterUnlockWithTimeoutParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterUnlockWithTimeoutParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::UnlockWithTimeout::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setWeekDayScheduleWithParams:(MTRDoorLockClusterSetWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetWeekDayScheduleParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::SetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)getWeekDayScheduleWithParams:(MTRDoorLockClusterGetWeekDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetWeekDayScheduleParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::GetWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetWeekDayScheduleResponseParams.class +- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)clearWeekDayScheduleWithParams:(MTRDoorLockClusterClearWeekDayScheduleParams *)params completion:(MTRStatusCompletion)completion + +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRDoorLockClusterClearWeekDayScheduleParams - alloc] init]; - } + [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); - using RequestType = DoorLock::Commands::ClearWeekDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)setYearDayScheduleWithParams:(MTRDoorLockClusterSetYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetYearDayScheduleParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = DoorLock::Commands::SetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)getYearDayScheduleWithParams:(MTRDoorLockClusterGetYearDayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRDoorLockClusterGetYearDayScheduleParams - alloc] init]; - } + [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; - using RequestType = DoorLock::Commands::GetYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetYearDayScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearYearDayScheduleWithParams:(MTRDoorLockClusterClearYearDayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearYearDayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::ClearYearDaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setHolidayScheduleWithParams:(MTRDoorLockClusterSetHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::SetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getHolidayScheduleWithParams:(MTRDoorLockClusterGetHolidayScheduleParams *)params completion:(void (^)(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetHolidayScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearHolidayScheduleWithParams:(MTRDoorLockClusterClearHolidayScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearHolidayScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::ClearHolidaySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setUserWithParams:(MTRDoorLockClusterSetUserParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::SetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getUserWithParams:(MTRDoorLockClusterGetUserParams *)params completion:(void (^)(MTRDoorLockClusterGetUserResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetUser::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetUserResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearUserWithParams:(MTRDoorLockClusterClearUserParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearUserParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::ClearUser::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setCredentialWithParams:(MTRDoorLockClusterSetCredentialParams *)params completion:(void (^)(MTRDoorLockClusterSetCredentialResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetCredentialParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::SetCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterSetCredentialResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getCredentialStatusWithParams:(MTRDoorLockClusterGetCredentialStatusParams *)params completion:(void (^)(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterGetCredentialStatusParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DoorLock::Commands::GetCredentialStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDoorLockClusterGetCredentialStatusResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearCredentialWithParams:(MTRDoorLockClusterClearCredentialParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearCredentialParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::ClearCredential::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unboltDoorWithCompletion:(MTRStatusCompletion)completion -{ - [self unboltDoorWithParams:nil completion:completion]; -} -- (void)unboltDoorWithParams:(MTRDoorLockClusterUnboltDoorParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterUnboltDoorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::UnboltDoor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setAliroReaderConfigWithParams:(MTRDoorLockClusterSetAliroReaderConfigParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterSetAliroReaderConfigParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::SetAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearAliroReaderConfigWithCompletion:(MTRStatusCompletion)completion -{ - [self clearAliroReaderConfigWithParams:nil completion:completion]; -} -- (void)clearAliroReaderConfigWithParams:(MTRDoorLockClusterClearAliroReaderConfigParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRDoorLockClusterClearAliroReaderConfigParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - using RequestType = DoorLock::Commands::ClearAliroReaderConfig::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeLockStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57713,9 +56728,9 @@ - (void)subscribeAttributeLockStateWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockState::TypeInfo; + using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57724,9 +56739,9 @@ + (void)readAttributeLockStateWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57735,83 +56750,39 @@ - (void)readAttributeLockTypeWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeLockTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLockTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::LockType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeActuatorEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeActuatorEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -+ (void)readAttributeActuatorEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::ActuatorEnabled::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; -- (void)readAttributeDoorStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57821,9 +56792,9 @@ - (void)subscribeAttributeDoorStateWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorState::TypeInfo; + using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57832,9 +56803,9 @@ + (void)readAttributeDoorStateWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57843,11 +56814,11 @@ - (void)readAttributeDoorOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -57862,20 +56833,20 @@ - (void)writeAttributeDoorOpenEventsWithValue:(NSNumber * _Nonnull)value params: } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57885,9 +56856,9 @@ - (void)subscribeAttributeDoorOpenEventsWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorOpenEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57896,9 +56867,9 @@ + (void)readAttributeDoorOpenEventsWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57907,11 +56878,11 @@ - (void)readAttributeDoorClosedEventsWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -57926,20 +56897,20 @@ - (void)writeAttributeDoorClosedEventsWithValue:(NSNumber * _Nonnull)value param } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57949,9 +56920,9 @@ - (void)subscribeAttributeDoorClosedEventsWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DoorClosedEvents::TypeInfo; + using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -57960,9 +56931,9 @@ + (void)readAttributeDoorClosedEventsWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -57971,39 +56942,11 @@ - (void)readAttributeOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58013,9 +56956,9 @@ - (void)subscribeAttributeOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OpenPeriod::TypeInfo; + using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58024,9 +56967,9 @@ + (void)readAttributeOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58035,11 +56978,11 @@ - (void)readAttributeNumberOfTotalUsersSupportedWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58049,9 +56992,9 @@ - (void)subscribeAttributeNumberOfTotalUsersSupportedWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfTotalUsersSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58060,9 +57003,9 @@ + (void)readAttributeNumberOfTotalUsersSupportedWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58071,83 +57014,39 @@ - (void)readAttributeNumberOfPINUsersSupportedWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeNumberOfPINUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfPINUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::NumberOfPINUsersSupported::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeNumberOfRFIDUsersSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeNumberOfRFIDUsersSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -+ (void)readAttributeNumberOfRFIDUsersSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfRFIDUsersSupported::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; -- (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58157,9 +57056,9 @@ - (void)subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58168,9 +57067,9 @@ + (void)readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithClusterStateCac completion:completion]; } -- (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58179,47 +57078,39 @@ - (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:(voi completion:completion]; } -- (void)subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeNumberOfYearDaySchedulesSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58229,9 +57120,9 @@ - (void)subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:(MTRSubscr subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfHolidaySchedulesSupported::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58240,9 +57131,9 @@ + (void)readAttributeNumberOfHolidaySchedulesSupportedWithClusterStateCache:(MTR completion:completion]; } -- (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58251,47 +57142,39 @@ - (void)readAttributeMaxPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMaxPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::MaxPINCodeLength::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeMinPINCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58301,9 +57184,9 @@ - (void)subscribeAttributeMinPINCodeLengthWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinPINCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58312,9 +57195,9 @@ + (void)readAttributeMinPINCodeLengthWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58323,47 +57206,39 @@ - (void)readAttributeMaxRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMaxRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeMaxRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::MaxRFIDCodeLength::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeMinRFIDCodeLengthWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.boolValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58373,9 +57248,9 @@ - (void)subscribeAttributeMinRFIDCodeLengthWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::MinRFIDCodeLength::TypeInfo; + using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58384,9 +57259,9 @@ + (void)readAttributeMinRFIDCodeLengthWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58395,47 +57270,39 @@ - (void)readAttributeCredentialRulesSupportWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeCredentialRulesSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeCredentialRulesSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = DoorLock::Attributes::CredentialRulesSupport::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58445,9 +57312,9 @@ - (void)subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:(MTRSubs subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::TypeInfo; + using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58456,9 +57323,9 @@ + (void)readAttributeNumberOfCredentialsSupportedPerUserWithClusterStateCache:(M completion:completion]; } -- (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58467,11 +57334,11 @@ - (void)readAttributeLanguageWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLanguageWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -58486,20 +57353,20 @@ - (void)writeAttributeLanguageWithValue:(NSString * _Nonnull)value params:(MTRWr } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58509,9 +57376,9 @@ - (void)subscribeAttributeLanguageWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::Language::TypeInfo; + using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58520,9 +57387,9 @@ + (void)readAttributeLanguageWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58531,11 +57398,11 @@ - (void)readAttributeLEDSettingsWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -58550,7 +57417,7 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MT } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; TypeInfo::Type cppValue; cppValue = value.unsignedCharValue; @@ -58559,11 +57426,11 @@ - (void)writeAttributeLEDSettingsWithValue:(NSNumber * _Nonnull)value params:(MT std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58573,9 +57440,9 @@ - (void)subscribeAttributeLEDSettingsWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LEDSettings::TypeInfo; + using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58584,9 +57451,9 @@ + (void)readAttributeLEDSettingsWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58595,11 +57462,11 @@ - (void)readAttributeAutoRelockTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -58614,20 +57481,20 @@ - (void)writeAttributeAutoRelockTimeWithValue:(NSNumber * _Nonnull)value params: } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = value.boolValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58637,9 +57504,9 @@ - (void)subscribeAttributeAutoRelockTimeWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::AutoRelockTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58648,9 +57515,9 @@ + (void)readAttributeAutoRelockTimeWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58659,11 +57526,11 @@ - (void)readAttributeSoundVolumeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -58678,20 +57545,20 @@ - (void)writeAttributeSoundVolumeWithValue:(NSNumber * _Nonnull)value params:(MT } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.boolValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58701,9 +57568,9 @@ - (void)subscribeAttributeSoundVolumeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SoundVolume::TypeInfo; + using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58712,9 +57579,9 @@ + (void)readAttributeSoundVolumeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58723,11 +57590,11 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -58742,20 +57609,20 @@ - (void)writeAttributeOperatingModeWithValue:(NSNumber * _Nonnull)value params:( } ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = value.unsignedShortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58765,9 +57632,9 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::OperatingMode::TypeInfo; + using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58776,9 +57643,9 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroReaderVerificationKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58787,11 +57654,11 @@ - (void)readAttributeSupportedOperatingModesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroReaderVerificationKeyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58801,9 +57668,9 @@ - (void)subscribeAttributeSupportedOperatingModesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroReaderVerificationKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SupportedOperatingModes::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58812,9 +57679,9 @@ + (void)readAttributeSupportedOperatingModesWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroReaderGroupIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58823,11 +57690,11 @@ - (void)readAttributeDefaultConfigurationRegisterWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroReaderGroupIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58837,9 +57704,9 @@ - (void)subscribeAttributeDefaultConfigurationRegisterWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroReaderGroupIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58848,9 +57715,9 @@ + (void)readAttributeDefaultConfigurationRegisterWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroReaderGroupSubIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58859,39 +57726,11 @@ - (void)readAttributeEnableLocalProgrammingWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableLocalProgrammingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroReaderGroupSubIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58901,9 +57740,9 @@ - (void)subscribeAttributeEnableLocalProgrammingWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroReaderGroupSubIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableLocalProgramming::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58912,9 +57751,9 @@ + (void)readAttributeEnableLocalProgrammingWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58923,39 +57762,11 @@ - (void)readAttributeEnableOneTouchLockingWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableOneTouchLockingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58965,9 +57776,9 @@ - (void)subscribeAttributeEnableOneTouchLockingWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableOneTouchLocking::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -58976,9 +57787,9 @@ + (void)readAttributeEnableOneTouchLockingWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroGroupResolvingKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -58987,39 +57798,11 @@ - (void)readAttributeEnableInsideStatusLEDWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnableInsideStatusLEDWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroGroupResolvingKeyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59029,9 +57812,9 @@ - (void)subscribeAttributeEnableInsideStatusLEDWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroGroupResolvingKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnableInsideStatusLED::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59040,9 +57823,9 @@ + (void)readAttributeEnableInsideStatusLEDWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59051,39 +57834,11 @@ - (void)readAttributeEnablePrivacyModeButtonWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEnablePrivacyModeButtonWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59093,9 +57848,9 @@ - (void)subscribeAttributeEnablePrivacyModeButtonWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::EnablePrivacyModeButton::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59104,9 +57859,9 @@ + (void)readAttributeEnablePrivacyModeButtonWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAliroBLEAdvertisingVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59115,39 +57870,11 @@ - (void)readAttributeLocalProgrammingFeaturesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLocalProgrammingFeaturesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAliroBLEAdvertisingVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59157,9 +57884,9 @@ - (void)subscribeAttributeLocalProgrammingFeaturesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAliroBLEAdvertisingVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo; + using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59168,9 +57895,9 @@ + (void)readAttributeLocalProgrammingFeaturesWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59179,39 +57906,11 @@ - (void)readAttributeWrongCodeEntryLimitWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWrongCodeEntryLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59221,9 +57920,9 @@ - (void)subscribeAttributeWrongCodeEntryLimitWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::WrongCodeEntryLimit::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59232,9 +57931,9 @@ + (void)readAttributeWrongCodeEntryLimitWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59243,39 +57942,11 @@ - (void)readAttributeUserCodeTemporaryDisableTimeWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeUserCodeTemporaryDisableTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59285,9 +57956,9 @@ - (void)subscribeAttributeUserCodeTemporaryDisableTimeWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfAliroEndpointKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::UserCodeTemporaryDisableTime::TypeInfo; + using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59296,9 +57967,9 @@ + (void)readAttributeUserCodeTemporaryDisableTimeWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59307,39 +57978,11 @@ - (void)readAttributeSendPINOverTheAirWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSendPINOverTheAirWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59349,9 +57992,9 @@ - (void)subscribeAttributeSendPINOverTheAirWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::SendPINOverTheAir::TypeInfo; + using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59360,9 +58003,9 @@ + (void)readAttributeSendPINOverTheAirWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59371,39 +58014,11 @@ - (void)readAttributeRequirePINforRemoteOperationWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRequirePINforRemoteOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59413,9 +58028,9 @@ - (void)subscribeAttributeRequirePINforRemoteOperationWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::RequirePINforRemoteOperation::TypeInfo; + using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -59424,9 +58039,9 @@ + (void)readAttributeRequirePINforRemoteOperationWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -59435,481 +58050,21 @@ - (void)readAttributeExpiringUserTimeoutWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeExpiringUserTimeoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeExpiringUserTimeoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeExpiringUserTimeoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::ExpiringUserTimeout::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroReaderVerificationKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroReaderVerificationKeyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroReaderVerificationKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderVerificationKey::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroReaderGroupIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroReaderGroupIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroReaderGroupIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupIdentifier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroReaderGroupSubIdentifierWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroReaderGroupSubIdentifierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroReaderGroupSubIdentifierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroReaderGroupSubIdentifier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroGroupResolvingKeyWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroGroupResolvingKeyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroGroupResolvingKeyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroGroupResolvingKey::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroSupportedBLEUWBProtocolVersionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAliroBLEAdvertisingVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAliroBLEAdvertisingVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAliroBLEAdvertisingVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AliroBLEAdvertisingVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfAliroEndpointKeysSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; [clusterStateCacheContainer @@ -62629,13763 +60784,76 @@ + (void)readAttributeInstalledClosedLimitTiltWithClusterStateCache:(MTRClusterSt clusterID:TypeInfo::GetClusterId() attributeID:TypeInfo::GetAttributeId() queue:queue - completion:completion]; -} - -- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterWindowCovering (Deprecated) - -- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self upOrOpenWithParams:params completion: - completionHandler]; -} -- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self upOrOpenWithParams:nil completionHandler:completionHandler]; -} -- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self downOrCloseWithParams:params completion: - completionHandler]; -} -- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self downOrCloseWithParams:nil completionHandler:completionHandler]; -} -- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMotionWithParams:params completion: - completionHandler]; -} -- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMotionWithParams:nil completionHandler:completionHandler]; -} -- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToLiftValueWithParams:params completion: - completionHandler]; -} -- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToLiftPercentageWithParams:params completion: - completionHandler]; -} -- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToTiltValueWithParams:params completion: - completionHandler]; -} -- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self goToTiltPercentageWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitLiftWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalClosedLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitTiltWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalClosedLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsLiftWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfActuationsLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsTiltWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfActuationsTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfActuationsTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConfigStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeConfigStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConfigStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercentageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftPercentageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercentageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercentageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltPercentageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercentageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationalStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperationalStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationalStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionLiftPercent100thsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionTiltPercent100thsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTargetPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEndProductTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEndProductTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEndProductTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercent100thsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercent100thsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitLiftWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledOpenLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitLiftWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledClosedLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitTiltWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledOpenLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledOpenLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitTiltWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstalledClosedLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeInstalledClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSafetyStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSafetyStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterBarrierControl - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion -{ - [self barrierControlStopWithParams:nil completion:completion]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlStop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterBarrierControl (Deprecated) - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlGoToPercentWithParams:params completion: - completionHandler]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:params completion: - completionHandler]; -} -- (void)barrierControlStopWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributeBarrierMovingStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierMovingStateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierMovingStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierMovingStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierMovingStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierMovingStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierSafetyStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierSafetyStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCapabilitiesWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCapabilitiesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenEventsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierOpenEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCloseEventsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCloseEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCloseEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCloseEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCommandOpenEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandOpenEventsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCommandOpenEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCommandOpenEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCommandOpenEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandOpenEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierCommandCloseEventsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandCloseEventsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierCommandCloseEventsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierCommandCloseEventsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierCommandCloseEventsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierCommandCloseEventsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierOpenPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenPeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenPeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierOpenPeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierOpenPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierOpenPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierOpenPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierOpenPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierClosePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierClosePeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierClosePeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBarrierClosePeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeBarrierClosePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierClosePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierClosePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierClosePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBarrierPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierPositionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBarrierPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBarrierPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBarrierPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBarrierPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterServiceArea - -- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRServiceAreaClusterSelectAreasParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ServiceArea::Commands::SelectAreas::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRServiceAreaClusterSkipAreaParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ServiceArea::Commands::SkipArea::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSupportedAreasWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSupportedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSupportedMapsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSupportedMapsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSupportedMapsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSelectedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSelectedAreasWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSelectedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCurrentAreaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentAreaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCurrentAreaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEstimatedEndTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEstimatedEndTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEstimatedEndTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeProgressWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterPumpConfigurationAndControl - -- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterPumpConfigurationAndControl (Deprecated) - -- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPressureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxSpeedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxFlowWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstPressureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstPressureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCompPressureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinCompPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCompPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCompPressureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxCompPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCompPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstSpeedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstSpeedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstFlowWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstFlowWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstTempWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinConstTempWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinConstTempWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstTempWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxConstTempWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxConstTempWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePumpStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePumpStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePumpStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePumpStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveOperationModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEffectiveOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveControlModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEffectiveControlModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEffectiveControlModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCapacityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeRunningHoursWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeRunningHoursWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeRunningHoursWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLifetimeRunningHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeRunningHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeEnergyConsumedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLifetimeEnergyConsumedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLifetimeEnergyConsumedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeControlModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterThermostat - -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterSetpointRaiseLowerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::SetpointRaiseLower::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterSetWeeklyScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::SetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRThermostatClusterGetWeeklyScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThermostatClusterGetWeeklyScheduleResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion -{ - [self clearWeeklyScheduleWithParams:nil completion:completion]; -} -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterClearWeeklyScheduleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::ClearWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterSetActiveScheduleRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::SetActiveScheduleRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterSetActivePresetRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::SetActivePresetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)atomicRequestWithParams:(MTRThermostatClusterAtomicRequestParams *)params completion:(void (^)(MTRThermostatClusterAtomicResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRThermostatClusterAtomicRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::AtomicRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThermostatClusterAtomicResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.charValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePresetTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePresetTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePresetTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeScheduleTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeScheduleTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeScheduleTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfPresetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfPresetsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfPresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfSchedulesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfScheduleTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfScheduleTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfScheduleTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeNumberOfScheduleTransitionPerDayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNumberOfScheduleTransitionPerDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeActivePresetHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeActivePresetHandleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActivePresetHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeActiveScheduleHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeActiveScheduleHandleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActiveScheduleHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePresetsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributePresetsWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterPresetStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterPresetStruct *)value[i_0]; - if (element_0.presetHandle == nil) { - listHolder_0->mList[i_0].presetHandle.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].presetHandle.SetNonNull(); - nonNullValue_2 = AsByteSpan(element_0.presetHandle); - } - listHolder_0->mList[i_0].presetScenario = static_castmList[i_0].presetScenario)>>(element_0.presetScenario.unsignedCharValue); - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - if (element_0.name == nil) { - definedValue_2.SetNull(); - } else { - auto & nonNullValue_3 = definedValue_2.SetNonNull(); - nonNullValue_3 = AsCharSpan(element_0.name); - } - } - if (element_0.coolingSetpoint != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].coolingSetpoint.Emplace(); - definedValue_2 = element_0.coolingSetpoint.shortValue; - } - if (element_0.heatingSetpoint != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].heatingSetpoint.Emplace(); - definedValue_2 = element_0.heatingSetpoint.shortValue; - } - if (element_0.builtIn == nil) { - listHolder_0->mList[i_0].builtIn.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); - nonNullValue_2 = element_0.builtIn.boolValue; - } - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributePresetsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSchedulesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSchedulesWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterScheduleStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterScheduleStruct *)value[i_0]; - if (element_0.scheduleHandle == nil) { - listHolder_0->mList[i_0].scheduleHandle.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].scheduleHandle.SetNonNull(); - nonNullValue_2 = AsByteSpan(element_0.scheduleHandle); - } - listHolder_0->mList[i_0].systemMode = static_castmList[i_0].systemMode)>>(element_0.systemMode.unsignedCharValue); - if (element_0.name != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); - definedValue_2 = AsCharSpan(element_0.name); - } - if (element_0.presetHandle != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].presetHandle.Emplace(); - definedValue_2 = AsByteSpan(element_0.presetHandle); - } - { - using ListType_2 = std::remove_reference_tmList[i_0].transitions)>; - using ListMemberType_2 = ListMemberTypeGetter::Type; - if (element_0.transitions.count != 0) { - auto * listHolder_2 = new ListHolder(element_0.transitions.count); - if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_2); - for (size_t i_2 = 0; i_2 < element_0.transitions.count; ++i_2) { - if ( ! [element_0.transitions[i_2] isKindOfClass: [MTRThermostatClusterScheduleTransitionStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_2 = (MTRThermostatClusterScheduleTransitionStruct *)element_0.transitions[i_2]; - listHolder_2->mList[i_2].dayOfWeek = static_castmList[i_2].dayOfWeek)>>(element_2.dayOfWeek.unsignedCharValue); - listHolder_2->mList[i_2].transitionTime = element_2.transitionTime.unsignedShortValue; - if (element_2.presetHandle != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].presetHandle.Emplace(); - definedValue_4 = AsByteSpan(element_2.presetHandle); - } - if (element_2.systemMode != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].systemMode.Emplace(); - definedValue_4 = static_cast>(element_2.systemMode.unsignedCharValue); - } - if (element_2.coolingSetpoint != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].coolingSetpoint.Emplace(); - definedValue_4 = element_2.coolingSetpoint.shortValue; - } - if (element_2.heatingSetpoint != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].heatingSetpoint.Emplace(); - definedValue_4 = element_2.heatingSetpoint.shortValue; - } - } - listHolder_0->mList[i_0].transitions = ListType_2(listHolder_2->mList, element_0.transitions.count); - } else { - listHolder_0->mList[i_0].transitions = ListType_2(); - } - } - if (element_0.builtIn == nil) { - listHolder_0->mList[i_0].builtIn.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); - nonNullValue_2 = element_0.builtIn.boolValue; - } - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSetpointHoldExpiryTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSetpointHoldExpiryTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterThermostat (Deprecated) - -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setpointRaiseLowerWithParams:params completion: - completionHandler]; -} -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self setWeeklyScheduleWithParams:params completion: - completionHandler]; -} -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getWeeklyScheduleWithParams:params completion: - ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearWeeklyScheduleWithParams:params completion: - completionHandler]; -} -- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalTemperatureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLocalTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOutdoorTemperatureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOutdoorTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOutdoorTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancyWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupancyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMinHeatSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMaxHeatSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMinCoolSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMaxCoolSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePICoolingDemandWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePICoolingDemandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePICoolingDemandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIHeatingDemandWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePIHeatingDemandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIHeatingDemandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHVACSystemTypeConfigurationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalTemperatureCalibrationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalTemperatureCalibrationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLocalTemperatureCalibrationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLocalTemperatureCalibrationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedCoolingSetpointWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedCoolingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedHeatingSetpointWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedHeatingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedCoolingSetpointWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedHeatingSetpointWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinHeatSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxHeatSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCoolSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCoolSetpointLimitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinSetpointDeadBandWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinSetpointDeadBandWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinSetpointDeadBandWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinSetpointDeadBandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinSetpointDeadBandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRemoteSensingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRemoteSensingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRemoteSensingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRemoteSensingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRemoteSensingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlSequenceOfOperationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlSequenceOfOperationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeControlSequenceOfOperationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeControlSequenceOfOperationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeControlSequenceOfOperationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSystemModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSystemModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSystemModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSystemModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSystemModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSystemModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatRunningModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThermostatRunningModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatRunningModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartOfWeekWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStartOfWeekWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartOfWeekWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfWeeklyTransitionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfDailyTransitionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfDailyTransitionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfDailyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureSetpointHoldWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureSetpointHoldWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureSetpointHoldWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureSetpointHoldWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureSetpointHoldDurationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatProgrammingOperationModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThermostatProgrammingOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatProgrammingOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatRunningStateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThermostatRunningStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeThermostatRunningStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeSourceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeSourceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeSourceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeAmountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeAmountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeAmountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeSourceTimestampWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSetpointChangeSourceTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSetpointChangeSourceTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedSetbackWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOccupiedSetbackWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupiedSetbackMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedSetbackWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUnoccupiedSetbackWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUnoccupiedSetbackMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUnoccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEmergencyHeatDeltaWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEmergencyHeatDeltaWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeEmergencyHeatDeltaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeEmergencyHeatDeltaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACTypeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCapacityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACRefrigerantTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACRefrigerantTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACRefrigerantTypeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACRefrigerantTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACRefrigerantTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCompressorTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCompressorTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCompressorTypeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACCompressorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCompressorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACErrorCodeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACErrorCodeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACErrorCodeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACErrorCodeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACErrorCodeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACLouverPositionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACLouverPositionWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACLouverPositionWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACLouverPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACLouverPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCoilTemperatureWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACCoilTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCoilTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCapacityformatWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityformatWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeACCapacityformatWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeACCapacityformatWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeACCapacityformatWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterFanControl - -- (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRFanControlClusterStepParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = FanControl::Commands::Step::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAirflowDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterFanControl (Deprecated) - -- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFanModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeSequenceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeSequenceWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeFanModeSequenceWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFanModeSequenceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFanModeSequenceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePercentSettingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePercentSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePercentSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePercentSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePercentSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePercentCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePercentCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePercentCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSpeedMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedSettingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSpeedSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSpeedSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSpeedCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSpeedCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRockSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSupportWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRockSupportWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSupportWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeRockSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSettingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeRockSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRockSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRockSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeWindSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindSupportWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeWindSupportWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindSupportWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeWindSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindSettingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWindSettingWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWindSettingWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeWindSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeWindSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration - -- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) - -- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureDisplayModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureDisplayModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureDisplayModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTemperatureDisplayModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTemperatureDisplayModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeKeypadLockoutWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeKeypadLockoutWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeKeypadLockoutWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeKeypadLockoutWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeKeypadLockoutWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScheduleProgrammingVisibilityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeScheduleProgrammingVisibilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScheduleProgrammingVisibilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterColorControl - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveToHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterStepHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::StepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveToSaturationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveToSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveSaturationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterStepSaturationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::StepSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveToHueAndSaturationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveToColorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveToColor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveColorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveColor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterStepColorParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::StepColor::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterMoveToColorTemperatureParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::MoveToColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterEnhancedMoveToHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::EnhancedMoveToHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterEnhancedMoveHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::EnhancedMoveHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterEnhancedStepHueParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::EnhancedStepHue::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterColorLoopSetParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ColorControl::Commands::ColorLoopSet::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterStopMoveStepParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + completion:completion]; +} - using RequestType = ColorControl::Commands::StopMoveStep::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completion:(MTRStatusCompletion)completion + +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRColorControlClusterMoveColorTemperatureParams - alloc] init]; - } + [self writeAttributeModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); - using RequestType = ColorControl::Commands::MoveColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRColorControlClusterStepColorTemperatureParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ColorControl::Commands::StepColorTemperature::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WindowCovering::Attributes::Mode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76394,11 +60862,11 @@ - (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76408,9 +60876,9 @@ - (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; + using TypeInfo = WindowCovering::Attributes::SafetyStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76419,9 +60887,9 @@ + (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76430,11 +60898,11 @@ - (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76444,9 +60912,9 @@ - (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76455,9 +60923,9 @@ + (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76466,11 +60934,11 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76480,9 +60948,9 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76491,9 +60959,9 @@ + (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76502,11 +60970,11 @@ - (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76516,9 +60984,9 @@ - (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76527,9 +60995,9 @@ + (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76538,11 +61006,11 @@ - (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76552,9 +61020,9 @@ - (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; + using TypeInfo = WindowCovering::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76563,9 +61031,9 @@ + (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76574,11 +61042,11 @@ - (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76588,9 +61056,9 @@ - (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; + using TypeInfo = WindowCovering::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76599,9 +61067,9 @@ + (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76610,11 +61078,11 @@ - (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullab completion:completion]; } -- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -76624,9 +61092,9 @@ - (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; + using TypeInfo = WindowCovering::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -76635,793 +61103,1074 @@ + (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterWindowCovering (Deprecated) + +- (void)upOrOpenWithParams:(MTRWindowCoveringClusterUpOrOpenParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self upOrOpenWithParams:params completion: + completionHandler]; +} +- (void)upOrOpenWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self upOrOpenWithParams:nil completionHandler:completionHandler]; +} +- (void)downOrCloseWithParams:(MTRWindowCoveringClusterDownOrCloseParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self downOrCloseWithParams:params completion: + completionHandler]; +} +- (void)downOrCloseWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self downOrCloseWithParams:nil completionHandler:completionHandler]; +} +- (void)stopMotionWithParams:(MTRWindowCoveringClusterStopMotionParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMotionWithParams:params completion: + completionHandler]; +} +- (void)stopMotionWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMotionWithParams:nil completionHandler:completionHandler]; +} +- (void)goToLiftValueWithParams:(MTRWindowCoveringClusterGoToLiftValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToLiftValueWithParams:params completion: + completionHandler]; +} +- (void)goToLiftPercentageWithParams:(MTRWindowCoveringClusterGoToLiftPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToLiftPercentageWithParams:params completion: + completionHandler]; +} +- (void)goToTiltValueWithParams:(MTRWindowCoveringClusterGoToTiltValueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltValueWithParams:params completion: + completionHandler]; +} +- (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self goToTiltPercentageWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePhysicalClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalClosedLimitLiftWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePhysicalClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalClosedLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePhysicalClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalClosedLimitTiltWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePhysicalClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalClosedLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentPositionLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentPositionLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentPositionTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentPositionTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNumberOfActuationsLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfActuationsLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfActuationsLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNumberOfActuationsLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNumberOfActuationsTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsTiltWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfActuationsTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfActuationsTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNumberOfActuationsTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfActuationsTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeConfigStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeConfigStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeConfigStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeConfigStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeConfigStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeConfigStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionLiftPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeCurrentPositionLiftPercentageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPositionLiftPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionLiftPercentageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeCurrentPositionLiftPercentageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionTiltPercentageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeCurrentPositionTiltPercentageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeCurrentPositionTiltPercentageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionTiltPercentageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeCurrentPositionTiltPercentageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeCurrentPositionTiltPercentageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeOperationalStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeOperationalStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOperationalStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Options::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOperationalStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeOperationalStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTargetPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTargetPositionLiftPercent100thsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTargetPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTargetPositionLiftPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTargetPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTargetPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTargetPositionTiltPercent100thsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTargetPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTargetPositionTiltPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTargetPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeEndProductTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeEndProductTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeEndProductTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEndProductTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndProductTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeEndProductTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentPositionLiftPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCurrentPositionLiftPercent100thsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentPositionLiftPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionLiftPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionLiftPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeCurrentPositionLiftPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeCurrentPositionTiltPercent100thsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCurrentPositionTiltPercent100thsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCurrentPositionTiltPercent100thsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionTiltPercent100thsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; ++ (void)readAttributeCurrentPositionTiltPercent100thsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionTiltPercent100thsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInstalledOpenLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeInstalledOpenLimitLiftWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeInstalledOpenLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstalledOpenLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeInstalledOpenLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInstalledClosedLimitLiftWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeInstalledClosedLimitLiftWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeInstalledClosedLimitLiftWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstalledClosedLimitLiftWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitLiftWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeInstalledClosedLimitLiftWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInstalledOpenLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeInstalledOpenLimitTiltWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeInstalledOpenLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstalledOpenLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledOpenLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeInstalledOpenLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeInstalledClosedLimitTiltWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeInstalledClosedLimitTiltWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeInstalledClosedLimitTiltWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInstalledClosedLimitTiltWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInstalledClosedLimitTiltWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeInstalledClosedLimitTiltWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeModeWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeModeWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSafetyStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeSafetyStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSafetyStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSafetyStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSafetyStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeSafetyStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterServiceArea + +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTRServiceAreaClusterSelectAreasParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ServiceArea::Commands::SelectAreas::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRServiceAreaClusterSkipAreaParams + alloc] init]; + } -+ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ServiceArea::Commands::SkipArea::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77430,11 +62179,11 @@ - (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedAreasWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77444,9 +62193,9 @@ - (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77455,9 +62204,9 @@ + (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedMapsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77466,39 +62215,11 @@ - (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedMapsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77508,9 +62229,9 @@ - (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedMapsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedMaps::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77519,9 +62240,9 @@ + (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77530,39 +62251,11 @@ - (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedAreasWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77572,9 +62265,9 @@ - (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77583,9 +62276,9 @@ + (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentAreaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77594,39 +62287,11 @@ - (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentAreaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77636,9 +62301,9 @@ - (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentAreaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77647,9 +62312,9 @@ + (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEstimatedEndTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77658,39 +62323,11 @@ - (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEstimatedEndTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77700,9 +62337,9 @@ - (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEstimatedEndTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EstimatedEndTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77711,9 +62348,9 @@ + (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProgressWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77722,44 +62359,11 @@ - (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77769,9 +62373,9 @@ - (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::Progress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77780,9 +62384,9 @@ + (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77791,39 +62395,11 @@ - (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77833,9 +62409,9 @@ - (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77844,9 +62420,9 @@ + (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77855,39 +62431,11 @@ - (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77897,9 +62445,9 @@ - (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77908,9 +62456,9 @@ + (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77919,44 +62467,11 @@ - (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77966,9 +62481,9 @@ - (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -77977,9 +62492,9 @@ + (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -77988,39 +62503,11 @@ - (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78030,9 +62517,9 @@ - (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + using TypeInfo = ServiceArea::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78041,9 +62528,9 @@ + (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78052,39 +62539,11 @@ - (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78094,9 +62553,9 @@ - (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + using TypeInfo = ServiceArea::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78105,9 +62564,9 @@ + (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78116,44 +62575,11 @@ - (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78163,9 +62589,9 @@ - (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + using TypeInfo = ServiceArea::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78174,9 +62600,13 @@ + (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterPumpConfigurationAndControl + +- (void)readAttributeMaxPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78185,11 +62615,11 @@ - (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78199,9 +62629,9 @@ - (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxPressure::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78210,9 +62640,9 @@ + (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78221,11 +62651,11 @@ - (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78235,9 +62665,9 @@ - (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxSpeed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78246,9 +62676,9 @@ + (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78257,11 +62687,11 @@ - (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78271,9 +62701,9 @@ - (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxFlow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78282,9 +62712,9 @@ + (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78293,11 +62723,11 @@ - (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78307,9 +62737,9 @@ - (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstPressure::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78318,9 +62748,9 @@ + (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78329,11 +62759,11 @@ - (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78343,9 +62773,9 @@ - (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstPressure::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78354,9 +62784,9 @@ + (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78365,11 +62795,11 @@ - (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78379,9 +62809,9 @@ - (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinCompPressure::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78390,9 +62820,9 @@ + (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCompPressureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78401,11 +62831,11 @@ - (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCompPressureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78415,9 +62845,9 @@ - (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCompPressureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxCompPressure::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78426,9 +62856,9 @@ + (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78437,11 +62867,11 @@ - (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78451,9 +62881,9 @@ - (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstSpeed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78462,9 +62892,9 @@ + (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78473,11 +62903,11 @@ - (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78487,9 +62917,9 @@ - (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstSpeed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78498,9 +62928,9 @@ + (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78509,11 +62939,11 @@ - (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78523,9 +62953,9 @@ - (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstFlow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78534,9 +62964,9 @@ + (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstFlowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78545,11 +62975,11 @@ - (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstFlowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78559,9 +62989,9 @@ - (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstFlowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstFlow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78570,9 +63000,9 @@ + (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78581,44 +63011,11 @@ - (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstTempWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78628,9 +63025,9 @@ - (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MinConstTemp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78639,9 +63036,9 @@ + (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxConstTempWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78650,11 +63047,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstTempWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78664,9 +63061,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxConstTempWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::MaxConstTemp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78675,9 +63072,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePumpStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78686,11 +63083,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePumpStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78700,9 +63097,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePumpStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78711,9 +63108,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78722,11 +63119,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78736,9 +63133,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78747,9 +63144,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEffectiveControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78758,11 +63155,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEffectiveControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78772,9 +63169,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEffectiveControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::EffectiveControlMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78783,9 +63180,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78794,11 +63191,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78808,9 +63205,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Capacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78819,9 +63216,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78830,11 +63227,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -78844,9 +63241,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PumpConfigurationAndControl::Attributes::Speed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -78855,826 +63252,540 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterColorControl (Deprecated) - -- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueWithParams:params completion: - completionHandler]; -} -- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveHueWithParams:params completion: - completionHandler]; -} -- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepHueWithParams:params completion: - completionHandler]; -} -- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToSaturationWithParams:params completion: - completionHandler]; -} -- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveSaturationWithParams:params completion: - completionHandler]; -} -- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepSaturationWithParams:params completion: - completionHandler]; -} -- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToHueAndSaturationWithParams:params completion: - completionHandler]; -} -- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorWithParams:params completion: - completionHandler]; -} -- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorWithParams:params completion: - completionHandler]; -} -- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorWithParams:params completion: - completionHandler]; -} -- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveToColorTemperatureWithParams:params completion: - completionHandler]; -} -- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueWithParams:params completion: - completionHandler]; -} -- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveHueWithParams:params completion: - completionHandler]; -} -- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedStepHueWithParams:params completion: - completionHandler]; -} -- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self enhancedMoveToHueAndSaturationWithParams:params completion: - completionHandler]; -} -- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self colorLoopSetWithParams:params completion: - completionHandler]; -} -- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stopMoveStepWithParams:params completion: - completionHandler]; -} -- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self moveColorTemperatureWithParams:params completion: - completionHandler]; -} -- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self stepColorTemperatureWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentHueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentSaturationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentSaturationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLifetimeRunningHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentSaturationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRemainingTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRemainingTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -+ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeRemainingTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeCurrentXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentXWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -- (void)readAttributeCurrentYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentYWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } -- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDriftCompensationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDriftCompensationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDriftCompensationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCompensationTextWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCompensationTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLifetimeRunningHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCompensationTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeColorTemperatureMiredsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorTemperatureMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLifetimeRunningHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeColorModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOptionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; + using TypeInfo = PumpConfigurationAndControl::Attributes::Power::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeLifetimeEnergyConsumedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOptionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -+ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeOptionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNumberOfPrimariesWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributeLifetimeEnergyConsumedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNumberOfPrimariesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeLifetimeEnergyConsumedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNumberOfPrimariesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributePrimary1XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary1XWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary1XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributePrimary1XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributePrimary1YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary1YWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary1YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::OperationMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeControlModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary1YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributePrimary1IntensityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeControlModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary1IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeControlModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary1IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary2XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeControlModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary2XWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ControlMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary2XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary2XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary2YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary2YWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary2YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary2YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary2IntensityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary2IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary2IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary3XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary3XWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary3XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary3XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary3YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary3YWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary3YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary3YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary3IntensityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePrimary3IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePrimary3IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePrimary4XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePrimary4XWithCompletion: + using TypeInfo = PumpConfigurationAndControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterPumpConfigurationAndControl (Deprecated) + +- (void)readAttributeMaxPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxPressureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79683,33 +63794,33 @@ - (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4YWithCompletion: + [self readAttributeMaxSpeedWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79718,33 +63829,33 @@ - (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4IntensityWithCompletion: + [self readAttributeMaxFlowWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79753,33 +63864,33 @@ - (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary4IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary4IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5XWithCompletion: + [self readAttributeMinConstPressureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79788,33 +63899,33 @@ - (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinConstPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinConstPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5YWithCompletion: + [self readAttributeMaxConstPressureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79823,33 +63934,33 @@ - (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxConstPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxConstPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5IntensityWithCompletion: + [self readAttributeMinCompPressureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79858,33 +63969,33 @@ - (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary5IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinCompPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary5IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinCompPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxCompPressureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6XWithCompletion: + [self readAttributeMaxCompPressureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCompPressureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79893,33 +64004,33 @@ - (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxCompPressureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxCompPressureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxCompPressureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6YWithCompletion: + [self readAttributeMinConstSpeedWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79928,33 +64039,33 @@ - (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinConstSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6IntensityWithCompletion: + [self readAttributeMaxConstSpeedWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -79963,41 +64074,33 @@ - (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePrimary6IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxConstSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePrimary6IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxConstSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointXWithCompletion: + [self readAttributeMinConstFlowWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80006,41 +64109,33 @@ - (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWhitePointXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinConstFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinConstFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstFlowWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointYWithCompletion: + [self readAttributeMaxConstFlowWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointYWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeWhitePointYWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxConstFlowWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80049,38 +64144,30 @@ - (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWhitePointYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxConstFlowWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstFlowWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWhitePointYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxConstFlowWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRXWithCompletion: + [self readAttributeMinConstTempWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeMinConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -80092,38 +64179,30 @@ - (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeMinConstTempWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeMinConstTempWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxConstTempWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRYWithCompletion: + [self readAttributeMaxConstTempWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRYWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointRYWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeMaxConstTempWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -80135,38 +64214,100 @@ - (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeMaxConstTempWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxConstTempWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeMaxConstTempWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePumpStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRIntensityWithCompletion: + [self readAttributePumpStatusWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributePumpStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointRIntensityWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePumpStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributePumpStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeColorPointRIntensityWithValue:value params:params completion:completionHandler]; + [self readAttributePumpStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + +- (void)readAttributeEffectiveOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveOperationModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeEffectiveOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEffectiveOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeEffectiveOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeEffectiveControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeEffectiveControlModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeEffectiveControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -80178,41 +64319,33 @@ - (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointRIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeEffectiveControlModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEffectiveControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointRIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeEffectiveControlModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGXWithCompletion: + [self readAttributeCapacityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGXWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGXWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80221,41 +64354,33 @@ - (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGYWithCompletion: + [self readAttributeSpeedWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGYWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeColorPointGYWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80264,38 +64389,38 @@ - (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLifetimeRunningHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGIntensityWithCompletion: + [self readAttributeLifetimeRunningHoursWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointGIntensityWithValue:value params:nil completion:completionHandler]; + [self writeAttributeLifetimeRunningHoursWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeLifetimeRunningHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointGIntensityWithValue:value params:params completion:completionHandler]; + [self writeAttributeLifetimeRunningHoursWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeLifetimeRunningHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -80307,41 +64432,76 @@ - (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointGIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeLifetimeRunningHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLifetimeRunningHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointGIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeLifetimeRunningHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBXWithCompletion: + [self readAttributePowerWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeColorPointBXWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeColorPointBXWithValue:value params:params completion:completionHandler]; + [self readAttributePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeEnergyConsumedWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80350,41 +64510,41 @@ - (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLifetimeEnergyConsumedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLifetimeEnergyConsumedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBYWithCompletion: + [self readAttributeOperationModeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBYWithValue:value params:nil completion:completionHandler]; + [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBYWithValue:value params:params completion:completionHandler]; + [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80393,41 +64553,76 @@ - (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBIntensityWithCompletion: + [self readAttributeControlModeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBIntensityWithValue:value params:nil completion:completionHandler]; + [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeColorPointBIntensityWithValue:value params:params completion:completionHandler]; + [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeControlModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeControlModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80436,33 +64631,33 @@ - (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorPointBIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorPointBIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedCurrentHueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80471,33 +64666,68 @@ - (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEnhancedCurrentHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedColorModeWithCompletion: + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -80506,30 +64736,30 @@ - (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeEnhancedColorModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeEnhancedColorModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopActiveWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -80541,533 +64771,724 @@ - (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeColorLoopActiveWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeColorLoopActiveWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeColorLoopDirectionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterThermostat + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRThermostatClusterSetpointRaiseLowerParams + alloc] init]; } - [self subscribeAttributeColorLoopDirectionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetpointRaiseLower::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeColorLoopDirectionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRThermostatClusterSetWeeklyScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetWeeklySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThermostatClusterGetWeeklyScheduleParams + alloc] init]; + } -- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThermostatClusterGetWeeklyScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeColorLoopTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self clearWeeklyScheduleWithParams:nil completion:completion]; } -- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRThermostatClusterClearWeeklyScheduleParams + alloc] init]; } - [self subscribeAttributeColorLoopTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::ClearWeeklySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeColorLoopTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRThermostatClusterSetActiveScheduleRequestParams + alloc] init]; + } -- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActiveScheduleRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeColorLoopStartEnhancedHueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRThermostatClusterSetActivePresetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActivePresetRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)atomicRequestWithParams:(MTRThermostatClusterAtomicRequestParams *)params completion:(void (^)(MTRThermostatClusterAtomicResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRThermostatClusterAtomicRequestParams + alloc] init]; } - [self subscribeAttributeColorLoopStartEnhancedHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::AtomicRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThermostatClusterAtomicResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorLoopStartEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeColorLoopStoredEnhancedHueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeColorCapabilitiesWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorCapabilitiesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeColorTempPhysicalMinMiredsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeColorTempPhysicalMaxMiredsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCoupleColorTempToLevelMinMiredsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStartUpColorTemperatureMiredsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:nil completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterBallastConfiguration ++ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81076,11 +65497,39 @@ - (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81090,9 +65539,9 @@ - (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81101,9 +65550,9 @@ + (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81112,11 +65561,39 @@ - (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81126,9 +65603,9 @@ - (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81137,9 +65614,9 @@ + (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81148,11 +65625,39 @@ - (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81162,9 +65667,9 @@ - (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81173,9 +65678,9 @@ + (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81184,11 +65689,11 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81203,20 +65708,20 @@ - (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWr } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.shortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81226,9 +65731,9 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81237,9 +65742,9 @@ + (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81248,11 +65753,11 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81267,20 +65772,20 @@ - (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWr } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = value.shortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81290,9 +65795,9 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81301,9 +65806,9 @@ + (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81312,11 +65817,11 @@ - (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81331,25 +65836,20 @@ - (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)valu } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.shortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81359,9 +65859,9 @@ - (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81370,9 +65870,9 @@ + (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81381,11 +65881,11 @@ - (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81400,25 +65900,20 @@ - (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)val } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = value.shortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81428,9 +65923,9 @@ - (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81439,9 +65934,9 @@ + (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81450,11 +65945,39 @@ - (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81464,9 +65987,9 @@ - (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81475,9 +65998,9 @@ + (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81486,11 +66009,11 @@ - (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81505,20 +66028,20 @@ - (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWr } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81528,9 +66051,9 @@ - (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81539,9 +66062,9 @@ + (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81550,11 +66073,11 @@ - (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullab completion:completion]; } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81569,20 +66092,20 @@ - (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value param } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81592,9 +66115,9 @@ - (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81603,9 +66126,9 @@ + (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81614,11 +66137,11 @@ - (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81633,25 +66156,164 @@ - (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81661,9 +66323,9 @@ - (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81672,9 +66334,9 @@ + (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81683,11 +66345,11 @@ - (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81702,25 +66364,20 @@ - (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params: } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81730,9 +66387,9 @@ - (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81741,9 +66398,9 @@ + (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81752,11 +66409,11 @@ - (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81771,20 +66428,25 @@ - (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:( } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81794,9 +66456,9 @@ - (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81805,9 +66467,9 @@ + (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81816,11 +66478,11 @@ - (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -81835,61 +66497,20 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)valu } ListFreer listFreer; - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81899,9 +66520,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81910,9 +66531,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81921,11 +66542,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81935,9 +66556,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81946,9 +66567,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81957,11 +66578,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81971,9 +66592,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -81982,9 +66603,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -81993,11 +66614,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82007,9 +66628,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82018,9 +66639,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82029,11 +66650,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82043,9 +66664,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82054,9 +66675,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82065,794 +66686,664 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterBallastConfiguration (Deprecated) - -- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalMinLevelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalMinLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalMinLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalMaxLevelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhysicalMaxLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePhysicalMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBallastStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBallastStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBallastStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinLevelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinLevelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMinLevelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxLevelWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxLevelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeMaxLevelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeIntrinsicBallastFactorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeIntrinsicBallastFactorWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeIntrinsicBallastFactorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeIntrinsicBallastFactorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBallastFactorAdjustmentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeBallastFactorAdjustmentWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:completionHandler]; + [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBallastFactorAdjustmentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeBallastFactorAdjustmentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampQuantityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampQuantityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLampQuantityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeLampTypeWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampTypeWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeLampTypeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeLampTypeWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self readAttributeLampManufacturerWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLampManufacturerWithValue:value params:nil completion:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeLampManufacturerWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampManufacturerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampManufacturerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLampRatedHoursWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeLampRatedHoursWithValue:value params:nil completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeLampRatedHoursWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampRatedHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampRatedHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampBurnHoursWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursWithValue:value params:nil completion:completionHandler]; + [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursWithValue:value params:params completion:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampBurnHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampBurnHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampAlarmModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampAlarmModeWithValue:value params:nil completion:completionHandler]; + [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLampAlarmModeWithValue:value params:params completion:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampAlarmModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLampAlarmModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + ++ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampBurnHoursTripPointWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursTripPointWithValue:value params:nil completion:completionHandler]; + [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:completionHandler]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLampBurnHoursTripPointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLampBurnHoursTripPointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterIlluminanceMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82861,11 +67352,39 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82875,9 +67394,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82886,9 +67405,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82897,11 +67416,11 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82911,9 +67430,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82922,9 +67441,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82933,11 +67452,39 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82947,9 +67494,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82958,9 +67505,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePresetTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82969,11 +67516,11 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePresetTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -82983,9 +67530,9 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePresetTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -82994,9 +67541,9 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScheduleTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83005,11 +67552,11 @@ - (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScheduleTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83019,9 +67566,9 @@ - (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScheduleTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83030,9 +67577,9 @@ + (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPresetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83041,11 +67588,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPresetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83055,9 +67602,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83066,9 +67613,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfSchedulesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83077,11 +67624,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83091,9 +67638,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83102,9 +67649,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfScheduleTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83113,11 +67660,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfScheduleTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83127,9 +67674,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfScheduleTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83138,9 +67685,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfScheduleTransitionPerDayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83149,11 +67696,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83163,9 +67710,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfScheduleTransitionPerDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83174,9 +67721,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePresetHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83185,11 +67732,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePresetHandleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83199,9 +67746,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePresetHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83210,9 +67757,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveScheduleHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83221,11 +67768,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveScheduleHandleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83235,9 +67782,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveScheduleHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83246,374 +67793,123 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLightSensorTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLightSensorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLightSensorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePresetsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributePresetsWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterPresetStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterPresetStruct *)value[i_0]; + if (element_0.presetHandle == nil) { + listHolder_0->mList[i_0].presetHandle.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].presetHandle.SetNonNull(); + nonNullValue_2 = AsByteSpan(element_0.presetHandle); + } + listHolder_0->mList[i_0].presetScenario = static_castmList[i_0].presetScenario)>>(element_0.presetScenario.unsignedCharValue); + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + if (element_0.name == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = AsCharSpan(element_0.name); + } + } + if (element_0.coolingSetpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].coolingSetpoint.Emplace(); + definedValue_2 = element_0.coolingSetpoint.shortValue; + } + if (element_0.heatingSetpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].heatingSetpoint.Emplace(); + definedValue_2 = element_0.heatingSetpoint.shortValue; + } + if (element_0.builtIn == nil) { + listHolder_0->mList[i_0].builtIn.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); + nonNullValue_2 = element_0.builtIn.boolValue; + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributePresetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributePresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterTemperatureMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSchedulesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83622,11 +67918,119 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + [self writeAttributeSchedulesWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterScheduleStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterScheduleStruct *)value[i_0]; + if (element_0.scheduleHandle == nil) { + listHolder_0->mList[i_0].scheduleHandle.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].scheduleHandle.SetNonNull(); + nonNullValue_2 = AsByteSpan(element_0.scheduleHandle); + } + listHolder_0->mList[i_0].systemMode = static_castmList[i_0].systemMode)>>(element_0.systemMode.unsignedCharValue); + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = AsCharSpan(element_0.name); + } + if (element_0.presetHandle != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].presetHandle.Emplace(); + definedValue_2 = AsByteSpan(element_0.presetHandle); + } + { + using ListType_2 = std::remove_reference_tmList[i_0].transitions)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.transitions.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.transitions.count); + if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_2); + for (size_t i_2 = 0; i_2 < element_0.transitions.count; ++i_2) { + if ( ! [element_0.transitions[i_2] isKindOfClass: [MTRThermostatClusterScheduleTransitionStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRThermostatClusterScheduleTransitionStruct *)element_0.transitions[i_2]; + listHolder_2->mList[i_2].dayOfWeek = static_castmList[i_2].dayOfWeek)>>(element_2.dayOfWeek.unsignedCharValue); + listHolder_2->mList[i_2].transitionTime = element_2.transitionTime.unsignedShortValue; + if (element_2.presetHandle != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].presetHandle.Emplace(); + definedValue_4 = AsByteSpan(element_2.presetHandle); + } + if (element_2.systemMode != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].systemMode.Emplace(); + definedValue_4 = static_cast>(element_2.systemMode.unsignedCharValue); + } + if (element_2.coolingSetpoint != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].coolingSetpoint.Emplace(); + definedValue_4 = element_2.coolingSetpoint.shortValue; + } + if (element_2.heatingSetpoint != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].heatingSetpoint.Emplace(); + definedValue_4 = element_2.heatingSetpoint.shortValue; + } + } + listHolder_0->mList[i_0].transitions = ListType_2(listHolder_2->mList, element_0.transitions.count); + } else { + listHolder_0->mList[i_0].transitions = ListType_2(); + } + } + if (element_0.builtIn == nil) { + listHolder_0->mList[i_0].builtIn.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); + nonNullValue_2 = element_0.builtIn.boolValue; + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83636,9 +68040,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83647,9 +68051,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointHoldExpiryTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83658,11 +68062,11 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointHoldExpiryTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83672,9 +68076,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83683,9 +68087,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83694,11 +68098,11 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83708,9 +68112,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = Thermostat::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83719,9 +68123,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83730,11 +68134,11 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83744,9 +68148,9 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = Thermostat::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83755,9 +68159,9 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83766,11 +68170,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83780,9 +68184,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83791,9 +68195,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83802,11 +68206,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83816,9 +68220,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Thermostat::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83827,9 +68231,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83838,11 +68242,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83852,9 +68256,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = Thermostat::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83863,9 +68267,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83874,11 +68278,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -83888,9 +68292,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = Thermostat::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -83899,94 +68303,295 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterThermostat (Deprecated) + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self setpointRaiseLowerWithParams:params completion: + completionHandler]; +} +- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self setWeeklyScheduleWithParams:params completion: + completionHandler]; +} +- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completionHandler:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self getWeeklyScheduleWithParams:params completion: + ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearWeeklyScheduleWithParams:params completion: + completionHandler]; +} +- (void)clearWeeklyScheduleWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self clearWeeklyScheduleWithParams:nil completionHandler:completionHandler]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLocalTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalTemperatureWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLocalTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLocalTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLocalTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLocalTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOutdoorTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutdoorTemperatureWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOutdoorTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOutdoorTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOutdoorTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOutdoorTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancyWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMinHeatSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAbsMinHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAbsMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMaxHeatSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAbsMaxHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAbsMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAbsMinCoolSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAbsMinCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAbsMaxCoolSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAbsMaxCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAbsMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePICoolingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithCompletion: + [self readAttributePICoolingDemandWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePICoolingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -83995,33 +68600,33 @@ - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePICoolingDemandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePICoolingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePICoolingDemandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePIHeatingDemandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithCompletion: + [self readAttributePIHeatingDemandWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePIHeatingDemandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84030,33 +68635,41 @@ - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePIHeatingDemandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePIHeatingDemandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithCompletion: + [self readAttributeHVACSystemTypeConfigurationWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84065,33 +68678,41 @@ - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithCompletion: + [self readAttributeLocalTemperatureCalibrationWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLocalTemperatureCalibrationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84100,33 +68721,41 @@ - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLocalTemperatureCalibrationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocalTemperatureCalibrationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLocalTemperatureCalibrationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedCoolingSetpointWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84135,33 +68764,41 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeOccupiedCoolingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeOccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedHeatingSetpointWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84170,33 +68807,41 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedHeatingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedCoolingSetpointWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84205,33 +68850,41 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedCoolingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedCoolingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: + [self readAttributeUnoccupiedHeatingSetpointWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84240,33 +68893,41 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedHeatingSetpointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedHeatingSetpointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributeMinHeatSetpointLimitWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84275,588 +68936,482 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeMaxHeatSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self readAttributeMaxHeatSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterPressureMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMaxHeatSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxHeatSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxHeatSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeMaxHeatSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMinCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeMinCoolSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeMinCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeMinCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeMaxCoolSetpointLimitWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMaxCoolSetpointLimitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxCoolSetpointLimitWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeMaxCoolSetpointLimitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeMaxCoolSetpointLimitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeMinSetpointDeadBandWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeMinSetpointDeadBandWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeMinSetpointDeadBandWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeMinSetpointDeadBandWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinSetpointDeadBandWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinSetpointDeadBandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeMinSetpointDeadBandWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeRemoteSensingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeRemoteSensingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeRemoteSensingWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeRemoteSensingWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemoteSensingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRemoteSensingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemoteSensingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRemoteSensingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeControlSequenceOfOperationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeControlSequenceOfOperationWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeControlSequenceOfOperationWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeControlSequenceOfOperationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeControlSequenceOfOperationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeControlSequenceOfOperationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeControlSequenceOfOperationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeSystemModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeSystemModeWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeSystemModeWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSystemModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSystemModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSystemModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSystemModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeThermostatRunningModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeThermostatRunningModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatRunningModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeThermostatRunningModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartOfWeekWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeStartOfWeekWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartOfWeekWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartOfWeekWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartOfWeekWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeStartOfWeekWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeNumberOfWeeklyTransitionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfWeeklyTransitionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfWeeklyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfDailyTransitionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeNumberOfDailyTransitionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfDailyTransitionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeNumberOfDailyTransitionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterPressureMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithCompletion: + [self readAttributeTemperatureSetpointHoldWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureSetpointHoldWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeTemperatureSetpointHoldWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84865,33 +69420,41 @@ - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureSetpointHoldWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureSetpointHoldWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithCompletion: + [self readAttributeTemperatureSetpointHoldDurationWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84900,33 +69463,41 @@ - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureSetpointHoldDurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureSetpointHoldDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatProgrammingOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithCompletion: + [self readAttributeThermostatProgrammingOperationModeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeThermostatProgrammingOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84935,33 +69506,33 @@ - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeThermostatProgrammingOperationModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatProgrammingOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeThermostatProgrammingOperationModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThermostatRunningStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithCompletion: + [self readAttributeThermostatRunningStateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatRunningStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -84970,33 +69541,33 @@ - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeThermostatRunningStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThermostatRunningStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeThermostatRunningStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeSourceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaledValueWithCompletion: + [self readAttributeSetpointChangeSourceWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85005,33 +69576,33 @@ - (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSetpointChangeSourceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSetpointChangeSourceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeAmountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinScaledValueWithCompletion: + [self readAttributeSetpointChangeAmountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeAmountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85040,33 +69611,33 @@ - (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSetpointChangeAmountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeAmountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSetpointChangeAmountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetpointChangeSourceTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxScaledValueWithCompletion: + [self readAttributeSetpointChangeSourceTimestampWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85075,30 +69646,38 @@ - (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeSetpointChangeSourceTimestampWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSetpointChangeSourceTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeSetpointChangeSourceTimestampWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaledToleranceWithCompletion: + [self readAttributeOccupiedSetbackWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedSetbackWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOccupiedSetbackWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -85110,33 +69689,33 @@ - (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeScaledToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeOccupiedSetbackWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaledToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeOccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaleWithCompletion: + [self readAttributeOccupiedSetbackMinWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85145,33 +69724,33 @@ - (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeScaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedSetbackMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeScaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOccupiedSetbackMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85180,33 +69759,41 @@ - (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOccupiedSetbackMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedSetbackWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedSetbackWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUnoccupiedSetbackWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUnoccupiedSetbackWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85215,33 +69802,33 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedSetbackWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedSetbackWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeUnoccupiedSetbackMinWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85250,33 +69837,33 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedSetbackMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedSetbackMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUnoccupiedSetbackMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: + [self readAttributeUnoccupiedSetbackMaxWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85285,33 +69872,41 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUnoccupiedSetbackMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUnoccupiedSetbackMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUnoccupiedSetbackMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEmergencyHeatDeltaWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributeEmergencyHeatDeltaWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeEmergencyHeatDeltaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85320,408 +69915,127 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeEmergencyHeatDeltaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterFlowMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeEmergencyHeatDeltaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeEmergencyHeatDeltaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeACTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeACTypeWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeACTypeWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeACTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeACTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeACTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeACCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeACCapacityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeACCapacityWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeACCapacityWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeACCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeACCapacityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeACCapacityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterFlowMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACRefrigerantTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithCompletion: + [self readAttributeACRefrigerantTypeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACRefrigerantTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACRefrigerantTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85730,30 +70044,38 @@ - (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACRefrigerantTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACRefrigerantTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACRefrigerantTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACCompressorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithCompletion: + [self readAttributeACCompressorTypeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCompressorTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACCompressorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -85765,30 +70087,81 @@ - (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeACCompressorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCompressorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeACCompressorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACErrorCodeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithCompletion: + [self readAttributeACErrorCodeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACErrorCodeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACErrorCodeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeACErrorCodeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeACErrorCodeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACErrorCodeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeACLouverPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACLouverPositionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACLouverPositionWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACLouverPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -85800,33 +70173,33 @@ - (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeACLouverPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACLouverPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeACLouverPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeACCoilTemperatureWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithCompletion: + [self readAttributeACCoilTemperatureWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCoilTemperatureWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -85835,19 +70208,62 @@ - (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeACCoilTemperatureWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeACCoilTemperatureWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeACCoilTemperatureWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeACCapacityformatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityformatWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeACCapacityformatWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeACCapacityformatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeACCapacityformatWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeACCapacityformatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeACCapacityformatWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -86034,11 +70450,36 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterRelativeHumidityMeasurement +@implementation MTRBaseClusterFanControl -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)stepWithParams:(MTRFanControlClusterStepParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + if (params == nil) { + params = [[MTRFanControlClusterStepParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = FanControl::Commands::Step::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeFanModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86047,11 +70488,39 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + [self writeAttributeFanModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeFanModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86061,9 +70530,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = FanControl::Attributes::FanMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86072,9 +70541,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFanModeSequenceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86083,11 +70552,39 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeFanModeSequenceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86097,9 +70594,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFanModeSequenceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = FanControl::Attributes::FanModeSequence::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86108,9 +70605,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86119,11 +70616,44 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self writeAttributePercentSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePercentSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86133,9 +70663,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePercentSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86144,9 +70674,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePercentCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86154,12 +70684,12 @@ - (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable valu queue:self.callbackQueue completion:completion]; } - -- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePercentCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86169,9 +70699,9 @@ - (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePercentCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; + using TypeInfo = FanControl::Attributes::PercentCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86180,9 +70710,9 @@ + (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86191,11 +70721,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86205,9 +70735,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedMax::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86216,9 +70746,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86227,11 +70757,44 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [self writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSpeedSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86241,9 +70804,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86252,9 +70815,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86263,11 +70826,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86277,9 +70840,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = FanControl::Attributes::SpeedCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86288,9 +70851,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86299,11 +70862,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRockSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86313,9 +70876,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSupport::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86324,9 +70887,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86335,11 +70898,39 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + [self writeAttributeRockSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRockSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86349,9 +70940,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRockSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FanControl::Attributes::RockSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86360,9 +70951,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86371,11 +70962,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindSupportWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86385,9 +70976,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FanControl::Attributes::WindSupport::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86396,339 +70987,137 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) - -- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWindSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMinMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self writeAttributeWindSettingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeWindSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindSettingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FanControl::Attributes::WindSetting::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAirflowDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; +- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeAirflowDirectionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeAirflowDirectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterOccupancySensing ++ (void)readAttributeAirflowDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = FanControl::Attributes::AirflowDirection::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86737,11 +71126,11 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86751,9 +71140,9 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + using TypeInfo = FanControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86762,9 +71151,9 @@ + (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86773,11 +71162,11 @@ - (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86787,9 +71176,9 @@ - (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + using TypeInfo = FanControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86798,9 +71187,9 @@ + (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86809,11 +71198,11 @@ - (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86823,9 +71212,9 @@ - (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86834,9 +71223,9 @@ + (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeHoldTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86845,39 +71234,11 @@ - (void)readAttributeHoldTimeWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeHoldTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86887,9 +71248,9 @@ - (void)subscribeAttributeHoldTimeWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHoldTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + using TypeInfo = FanControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86898,9 +71259,9 @@ + (void)readAttributeHoldTimeWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeHoldTimeLimitsWithCompletion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86909,11 +71270,11 @@ - (void)readAttributeHoldTimeLimitsWithCompletion:(void (^)(MTROccupancySensingC completion:completion]; } -- (void)subscribeAttributeHoldTimeLimitsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86923,9 +71284,9 @@ - (void)subscribeAttributeHoldTimeLimitsWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHoldTimeLimitsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; + using TypeInfo = FanControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -86934,9 +71295,9 @@ + (void)readAttributeHoldTimeLimitsWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -86945,382 +71306,657 @@ - (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = FanControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +@end - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; +@implementation MTRBaseClusterFanControl (Deprecated) - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeFanModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFanModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFanModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFanModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFanModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFanModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFanModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFanModeSequenceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFanModeSequenceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeSequenceWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeFanModeSequenceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeFanModeSequenceWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeFanModeSequenceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFanModeSequenceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFanModeSequenceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFanModeSequenceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePercentSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentSettingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePercentSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePercentSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePercentSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePercentSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePercentSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePercentSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePercentCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePercentCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePercentCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePercentCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePercentCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSpeedMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSpeedMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSpeedMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSpeedMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSpeedSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedSettingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSpeedSettingWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSpeedSettingWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSpeedSettingWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSpeedSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSpeedSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSpeedSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSpeedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSpeedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSpeedCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSpeedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSpeedCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRockSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRockSupportWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRockSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRockSupportWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeRockSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeRockSupportWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRockSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRockSettingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeRockSettingWithValue:value params:nil completion:completionHandler]; } - -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeRockSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeRockSettingWithValue:value params:params completion:completionHandler]; } -- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeRockSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRockSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeRockSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeRockSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindSupportWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWindSupportWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeWindSupportWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWindSupportWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeWindSupportWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWindSupportWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeWindSettingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeWindSettingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + [self writeAttributeWindSettingWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWindSettingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeWindSettingWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeWindSettingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWindSettingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindSettingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWindSettingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration + +- (void)readAttributeTemperatureDisplayModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87329,11 +71965,11 @@ - (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(voi completion:completion]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87348,20 +71984,20 @@ - (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumbe } ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureDisplayModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87371,9 +72007,9 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureDisplayModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87382,9 +72018,9 @@ + (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCac completion:completion]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeKeypadLockoutWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87393,11 +72029,11 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(voi completion:completion]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87412,20 +72048,20 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumbe } ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeKeypadLockoutWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87435,9 +72071,9 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeKeypadLockoutWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87446,9 +72082,9 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCac completion:completion]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScheduleProgrammingVisibilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87457,11 +72093,11 @@ - (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: completion:completion]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -87476,20 +72112,20 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSN } ListFreer listFreer; - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScheduleProgrammingVisibilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87499,9 +72135,9 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScheduleProgrammingVisibilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87512,7 +72148,7 @@ + (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87525,7 +72161,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87537,7 +72173,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87548,7 +72184,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87561,7 +72197,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87573,7 +72209,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87584,7 +72220,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87597,7 +72233,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87609,7 +72245,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87620,7 +72256,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87633,7 +72269,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87645,7 +72281,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -87656,7 +72292,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -87669,450 +72305,87 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:params queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterOccupancySensing (Deprecated) - -- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancyWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupancyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancySensorTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupancySensorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancySensorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancySensorTypeBitmapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOccupancySensorTypeBitmapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOccupancySensorTypeBitmapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIROccupiedToUnoccupiedDelayWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIRUnoccupiedToOccupiedDelayWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterThermostatUserInterfaceConfiguration (Deprecated) + +- (void)readAttributeTemperatureDisplayModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion: + [self readAttributeTemperatureDisplayModeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; + [self writeAttributeTemperatureDisplayModeWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureDisplayModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; + [self writeAttributeTemperatureDisplayModeWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureDisplayModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88121,41 +72394,41 @@ - (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTemperatureDisplayModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTemperatureDisplayModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTemperatureDisplayModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeKeypadLockoutWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion: + [self readAttributeKeypadLockoutWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; + [self writeAttributeKeypadLockoutWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeKeypadLockoutWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; + [self writeAttributeKeypadLockoutWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeKeypadLockoutWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88164,41 +72437,41 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeKeypadLockoutWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeKeypadLockoutWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeKeypadLockoutWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeScheduleProgrammingVisibilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: + [self readAttributeScheduleProgrammingVisibilityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; + [self writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScheduleProgrammingVisibilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -88207,19 +72480,19 @@ - (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeScheduleProgrammingVisibilityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScheduleProgrammingVisibilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeScheduleProgrammingVisibilityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -88396,201 +72669,478 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContain completionHandler(static_cast(value), error); }]; } - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterColorControl + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveToHueParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveToHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveHueParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterStepHueParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::StepHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveToSaturationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveToSaturation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveSaturationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveSaturation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterStepSaturationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::StepSaturation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveToHueAndSaturationParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveToHueAndSaturation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveToColorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveToColor::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveColorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveColor::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterStepColorParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::StepColor::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterMoveToColorTemperatureParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveToColorTemperature::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterEnhancedMoveToHueParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::EnhancedMoveToHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRColorControlClusterEnhancedMoveHueParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::EnhancedMoveHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completion:(MTRStatusCompletion)completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} + if (params == nil) { + params = [[MTRColorControlClusterEnhancedStepHueParams + alloc] init]; + } -@end + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -@implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + using RequestType = ColorControl::Commands::EnhancedStepHue::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams + alloc] init]; + } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRColorControlClusterColorLoopSetParams + alloc] init]; + } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::ColorLoopSet::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRColorControlClusterStopMoveStepParams + alloc] init]; + } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::StopMoveStep::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRColorControlClusterMoveColorTemperatureParams + alloc] init]; + } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::MoveColorTemperature::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRColorControlClusterStepColorTemperatureParams + alloc] init]; + } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ColorControl::Commands::StepColorTemperature::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88599,11 +73149,11 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88613,9 +73163,9 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentHue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88624,9 +73174,9 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentSaturationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88635,11 +73185,11 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentSaturationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88649,9 +73199,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentSaturationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentSaturation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88660,9 +73210,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88671,11 +73221,11 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88685,9 +73235,9 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::RemainingTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88696,9 +73246,9 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88707,11 +73257,11 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88721,9 +73271,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentX::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88732,9 +73282,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88743,11 +73293,11 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88757,9 +73307,9 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::CurrentY::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88768,9 +73318,9 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDriftCompensationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88779,11 +73329,11 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDriftCompensationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88793,9 +73343,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDriftCompensationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::DriftCompensation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88804,9 +73354,9 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCompensationTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88815,11 +73365,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCompensationTextWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88829,9 +73379,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCompensationTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::CompensationText::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88840,9 +73390,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88851,11 +73401,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88865,9 +73415,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTemperatureMireds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88876,9 +73426,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88887,11 +73437,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeColorModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88901,9 +73451,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88912,9 +73462,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88923,47 +73473,39 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88973,9 +73515,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Options::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -88984,9 +73526,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPrimariesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -88995,11 +73537,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPrimariesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89009,9 +73551,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPrimariesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::NumberOfPrimaries::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89020,13 +73562,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89035,11 +73573,11 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89049,9 +73587,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89060,9 +73598,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89071,11 +73609,11 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89085,9 +73623,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89096,9 +73634,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89107,11 +73645,11 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary1IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89121,9 +73659,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary1IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary1Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89132,9 +73670,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89143,11 +73681,11 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89157,9 +73695,9 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89168,9 +73706,9 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89179,11 +73717,11 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89193,9 +73731,9 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89204,9 +73742,9 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89215,11 +73753,11 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary2IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89229,9 +73767,9 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary2IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary2Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89240,9 +73778,9 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89251,11 +73789,11 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89265,9 +73803,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89276,9 +73814,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89287,11 +73825,11 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89301,9 +73839,9 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89312,9 +73850,9 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89323,11 +73861,11 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary3IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89337,9 +73875,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary3IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary3Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89348,9 +73886,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89359,11 +73897,11 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89373,9 +73911,9 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89384,9 +73922,9 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89395,11 +73933,11 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89409,9 +73947,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89420,9 +73958,9 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89431,11 +73969,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary4IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89445,9 +73983,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary4IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary4Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89456,9 +73994,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89467,11 +74005,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89481,9 +74019,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89492,9 +74030,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89503,11 +74041,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePrimary5YWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89517,9 +74055,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89528,9 +74066,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89539,11 +74077,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary5IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89553,9 +74091,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary5IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary5Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89564,9 +74102,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6XWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89575,11 +74113,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6XWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89589,9 +74127,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6XWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6X::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89600,9 +74138,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6YWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89611,11 +74149,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6YWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89625,9 +74163,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6YWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Y::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89636,13 +74174,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6IntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89651,11 +74185,11 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePrimary6IntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89665,9 +74199,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePrimary6IntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::Primary6Intensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89676,9 +74210,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89687,11 +74221,39 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeWhitePointXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89701,9 +74263,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointX::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89712,9 +74274,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89723,11 +74285,39 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeWhitePointYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89737,9 +74327,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::WhitePointY::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89748,9 +74338,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89759,11 +74349,39 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointRXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89773,9 +74391,9 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRX::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89784,9 +74402,9 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89795,11 +74413,39 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointRYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89809,9 +74455,9 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRY::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89820,9 +74466,9 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89831,11 +74477,44 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointRIntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89845,9 +74524,9 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointRIntensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89856,9 +74535,9 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89867,11 +74546,39 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointGXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89881,9 +74588,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGX::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89892,9 +74599,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89903,11 +74610,39 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointGYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89917,9 +74652,9 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGY::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89928,9 +74663,9 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89939,11 +74674,44 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointGIntensityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89953,9 +74721,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointGIntensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -89964,9 +74732,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBXWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89975,11 +74743,39 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointBXWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -89989,9 +74785,9 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBXWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBX::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90000,9 +74796,9 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBYWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90011,11 +74807,39 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointBYWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90025,9 +74849,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBYWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBY::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90036,9 +74860,9 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBIntensityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90047,11 +74871,44 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeColorPointBIntensityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90061,9 +74918,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBIntensityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorPointBIntensity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90072,9 +74929,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedCurrentHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90083,11 +74940,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedCurrentHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90097,9 +74954,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedCurrentHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedCurrentHue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90108,9 +74965,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedColorModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90119,11 +74976,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEnhancedColorModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90133,9 +74990,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEnhancedColorModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = ColorControl::Attributes::EnhancedColorMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90144,9 +75001,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopActiveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90155,11 +75012,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopActiveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90169,9 +75026,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopActiveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopActive::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90180,9 +75037,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopDirectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90191,11 +75048,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopDirectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90205,9 +75062,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopDirectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopDirection::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90216,9 +75073,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90227,11 +75084,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90241,9 +75098,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90252,13 +75109,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterOzoneConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStartEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90267,11 +75120,11 @@ - (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopStartEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90281,9 +75134,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopStartEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStartEnhancedHue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90292,9 +75145,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90303,11 +75156,11 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90317,9 +75170,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorLoopStoredEnhancedHue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90328,9 +75181,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90339,11 +75192,11 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90353,9 +75206,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorCapabilities::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90364,9 +75217,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90375,11 +75228,11 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90389,9 +75242,9 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMinMireds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90400,9 +75253,9 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90411,11 +75264,11 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90425,9 +75278,9 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::ColorTempPhysicalMaxMireds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90436,9 +75289,9 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90447,11 +75300,11 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90461,9 +75314,9 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90472,9 +75325,9 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90483,11 +75336,44 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90497,9 +75383,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = ColorControl::Attributes::StartUpColorTemperatureMireds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90508,9 +75394,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90519,11 +75405,11 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90533,9 +75419,9 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = ColorControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90544,9 +75430,9 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90555,11 +75441,11 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90569,9 +75455,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = ColorControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90580,9 +75466,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90591,11 +75477,11 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90605,9 +75491,9 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90616,9 +75502,9 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90627,11 +75513,11 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90641,9 +75527,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = ColorControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90652,9 +75538,9 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90663,11 +75549,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90677,9 +75563,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90688,9 +75574,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90699,11 +75585,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -90713,9 +75599,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ColorControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -90724,2077 +75610,2219 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterColorControl (Deprecated) + +- (void)moveToHueWithParams:(MTRColorControlClusterMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self moveToHueWithParams:params completion: + completionHandler]; +} +- (void)moveHueWithParams:(MTRColorControlClusterMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveHueWithParams:params completion: + completionHandler]; +} +- (void)stepHueWithParams:(MTRColorControlClusterStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepHueWithParams:params completion: + completionHandler]; +} +- (void)moveToSaturationWithParams:(MTRColorControlClusterMoveToSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToSaturationWithParams:params completion: + completionHandler]; +} +- (void)moveSaturationWithParams:(MTRColorControlClusterMoveSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveSaturationWithParams:params completion: + completionHandler]; +} +- (void)stepSaturationWithParams:(MTRColorControlClusterStepSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepSaturationWithParams:params completion: + completionHandler]; +} +- (void)moveToHueAndSaturationWithParams:(MTRColorControlClusterMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToHueAndSaturationWithParams:params completion: + completionHandler]; +} +- (void)moveToColorWithParams:(MTRColorControlClusterMoveToColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorWithParams:params completion: + completionHandler]; +} +- (void)moveColorWithParams:(MTRColorControlClusterMoveColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorWithParams:params completion: + completionHandler]; +} +- (void)stepColorWithParams:(MTRColorControlClusterStepColorParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorWithParams:params completion: + completionHandler]; +} +- (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveToColorTemperatureWithParams:params completion: + completionHandler]; +} +- (void)enhancedMoveToHueWithParams:(MTRColorControlClusterEnhancedMoveToHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueWithParams:params completion: + completionHandler]; +} +- (void)enhancedMoveHueWithParams:(MTRColorControlClusterEnhancedMoveHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveHueWithParams:params completion: + completionHandler]; +} +- (void)enhancedStepHueWithParams:(MTRColorControlClusterEnhancedStepHueParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedStepHueWithParams:params completion: + completionHandler]; +} +- (void)enhancedMoveToHueAndSaturationWithParams:(MTRColorControlClusterEnhancedMoveToHueAndSaturationParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self enhancedMoveToHueAndSaturationWithParams:params completion: + completionHandler]; +} +- (void)colorLoopSetWithParams:(MTRColorControlClusterColorLoopSetParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self colorLoopSetWithParams:params completion: + completionHandler]; +} +- (void)stopMoveStepWithParams:(MTRColorControlClusterStopMoveStepParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stopMoveStepWithParams:params completion: + completionHandler]; +} +- (void)moveColorTemperatureWithParams:(MTRColorControlClusterMoveColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self moveColorTemperatureWithParams:params completion: + completionHandler]; +} +- (void)stepColorTemperatureWithParams:(MTRColorControlClusterStepColorTemperatureParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self stepColorTemperatureWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentSaturationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSaturationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentSaturationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentSaturationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentSaturationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentSaturationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRemainingTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRemainingTimeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRemainingTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRemainingTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRemainingTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRemainingTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentXWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentYWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDriftCompensationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDriftCompensationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDriftCompensationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDriftCompensationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDriftCompensationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDriftCompensationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCompensationTextWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCompensationTextWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCompensationTextWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCompensationTextWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCompensationTextWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCompensationTextWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTemperatureMiredsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorTemperatureMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeColorModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOptionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOptionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeOptionsWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeOptionsWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOptionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOptionsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeOptionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeOptionsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPrimariesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeNumberOfPrimariesWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeNumberOfPrimariesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfPrimariesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeNumberOfPrimariesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeNumberOfPrimariesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary1XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary1XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary1XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary1XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary1XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary1YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterPM25ConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary1YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary1YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary1YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary1YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary1IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary1IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary1IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary1IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary1IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary1IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary2XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary2XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary2XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary2YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary2YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary2YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary2IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary2IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary2IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary2IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary2IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary2IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary3XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary3XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary3XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary3YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary3YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary3YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary3IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary3IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary3IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary3IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary3IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary3IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary4XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary4XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary4XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary4YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary4YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary4YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary4IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary4IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary4IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary4IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary4IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary4IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary5XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary5XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary5XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary5XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary5YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary5YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary5YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary5YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary5IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary5IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary5IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary5IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary5IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary5IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6XWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary6XWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary6XWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6XWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary6XWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary6XWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6YWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary6YWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary6YWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6YWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary6YWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary6YWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePrimary6IntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePrimary6IntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributePrimary6IntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePrimary6IntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributePrimary6IntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePrimary6IntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWhitePointXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWhitePointXWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterFormaldehydeConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeWhitePointXWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeWhitePointXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeWhitePointXWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeWhitePointXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWhitePointXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWhitePointXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWhitePointYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeWhitePointYWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeWhitePointYWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeWhitePointYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeWhitePointYWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeWhitePointYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWhitePointYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWhitePointYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWhitePointYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointRXWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointRXWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointRXWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointRXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointRXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointRXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointRXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointRYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorPointRYWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointRYWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointRYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointRYWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointRYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointRYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointRYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointRYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeColorPointRIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointRIntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointRIntensityWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointRIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointRIntensityWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeColorPointRIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointRIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointRIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointRIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorPointGXWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointGXWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointGXWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointGXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointGXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointGXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeColorPointGYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointGYWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointGYWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointGYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointGYWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointGYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointGYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointGYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorPointGYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointGIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointGIntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointGIntensityWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointGIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointGIntensityWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointGIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointGIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointGIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointGIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBXWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorPointBXWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointBXWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBXWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointBXWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointBXWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointBXWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBXWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointBXWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeColorPointBYWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointBYWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointBYWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointBYWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeColorPointBYWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeColorPointBYWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointBYWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeColorPointBYWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorPointBYWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorPointBIntensityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeColorPointBIntensityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeColorPointBIntensityWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeColorPointBIntensityWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeColorPointBIntensityWithValue:value params:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterPM1ConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorPointBIntensityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorPointBIntensityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorPointBIntensityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorPointBIntensityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedCurrentHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeEnhancedCurrentHueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeEnhancedCurrentHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnhancedCurrentHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeEnhancedCurrentHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeEnhancedCurrentHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEnhancedColorModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeEnhancedColorModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeEnhancedColorModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeEnhancedColorModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeEnhancedColorModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeEnhancedColorModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopActiveWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorLoopActiveWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorLoopActiveWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorLoopActiveWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorLoopActiveWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorLoopActiveWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopDirectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorLoopDirectionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorLoopDirectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorLoopDirectionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorLoopDirectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorLoopDirectionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorLoopTimeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorLoopTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorLoopTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorLoopTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorLoopTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStartEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorLoopStartEnhancedHueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorLoopStartEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorLoopStartEnhancedHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorLoopStartEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorLoopStartEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorLoopStoredEnhancedHueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorLoopStoredEnhancedHueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorLoopStoredEnhancedHueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorLoopStoredEnhancedHueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorLoopStoredEnhancedHueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorCapabilitiesWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorCapabilitiesWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorCapabilitiesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorCapabilitiesWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorCapabilitiesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorCapabilitiesWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorTempPhysicalMinMiredsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorTempPhysicalMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorTempPhysicalMinMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorTempPhysicalMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorTempPhysicalMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeColorTempPhysicalMaxMiredsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeColorTempPhysicalMaxMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeColorTempPhysicalMaxMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeColorTempPhysicalMaxMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeColorTempPhysicalMaxMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCoupleColorTempToLevelMinMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeCoupleColorTempToLevelMinMiredsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeCoupleColorTempToLevelMinMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeCoupleColorTempToLevelMinMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeCoupleColorTempToLevelMinMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpColorTemperatureMiredsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeStartUpColorTemperatureMiredsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeStartUpColorTemperatureMiredsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartUpColorTemperatureMiredsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpColorTemperatureMiredsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeStartUpColorTemperatureMiredsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterPM10ConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@end + +@implementation MTRBaseClusterBallastConfiguration -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92803,11 +77831,11 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePhysicalMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92817,9 +77845,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMinLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -92828,9 +77856,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92839,11 +77867,11 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92853,9 +77881,9 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::PhysicalMaxLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -92864,9 +77892,9 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92875,11 +77903,11 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92889,9 +77917,9 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -92900,9 +77928,9 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92911,47 +77939,39 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeMinLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92961,9 +77981,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MinLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -92972,9 +77992,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -92983,47 +78003,39 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93033,9 +78045,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::MaxLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93044,9 +78056,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIntrinsicBallastFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93055,47 +78067,44 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeIntrinsicBallastFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeIntrinsicBallastFactorWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93105,9 +78114,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIntrinsicBallastFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::IntrinsicBallastFactor::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93116,9 +78125,9 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastFactorAdjustmentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93127,47 +78136,44 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastFactorAdjustmentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93177,9 +78183,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastFactorAdjustmentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::BallastFactorAdjustment::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93188,9 +78194,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93199,11 +78205,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93213,9 +78219,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampQuantity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93224,9 +78230,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampTypeWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93235,47 +78241,39 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampTypeWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93285,9 +78283,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93296,9 +78294,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampManufacturerWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93307,51 +78305,39 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampManufacturerWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -@end + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -@implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampManufacturerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93361,9 +78347,9 @@ - (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampManufacturerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampManufacturer::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93372,9 +78358,9 @@ + (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampRatedHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93383,11 +78369,44 @@ - (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampRatedHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93397,9 +78416,9 @@ - (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampRatedHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampRatedHours::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93408,9 +78427,9 @@ + (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93419,11 +78438,44 @@ - (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampBurnHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93433,9 +78485,9 @@ - (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampBurnHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHours::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93444,9 +78496,9 @@ + (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampAlarmModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93455,11 +78507,39 @@ - (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampAlarmModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93469,9 +78549,9 @@ - (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampAlarmModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampAlarmMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93480,9 +78560,9 @@ + (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursTripPointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93491,11 +78571,44 @@ - (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedIntValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeLampBurnHoursTripPointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93505,9 +78618,9 @@ - (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampBurnHoursTripPointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::LampBurnHoursTripPoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93516,9 +78629,9 @@ + (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93527,11 +78640,11 @@ - (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93541,9 +78654,9 @@ - (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93552,9 +78665,9 @@ + (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93563,11 +78676,11 @@ - (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93577,9 +78690,9 @@ - (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93588,9 +78701,9 @@ + (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93599,11 +78712,11 @@ - (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93613,9 +78726,9 @@ - (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93624,9 +78737,9 @@ + (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93635,11 +78748,11 @@ - (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93649,9 +78762,9 @@ - (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93660,9 +78773,9 @@ + (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93671,11 +78784,11 @@ - (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93685,9 +78798,9 @@ - (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93696,9 +78809,9 @@ + (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93707,11 +78820,11 @@ - (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -93721,9 +78834,9 @@ - (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + using TypeInfo = BallastConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -93732,733 +78845,769 @@ + (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterBallastConfiguration (Deprecated) + +- (void)readAttributePhysicalMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributePhysicalMinLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePhysicalMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalMinLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalMinLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributePhysicalMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributePhysicalMaxLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePhysicalMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePhysicalMaxLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePhysicalMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePhysicalMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBallastStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBallastStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeBallastStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBallastStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeBallastStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBallastStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeMinLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMinLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMinLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMinLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeMaxLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeMaxLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeMaxLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeMaxLevelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeMaxLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxLevelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxLevelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeIntrinsicBalanceFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeIntrinsicBallastFactorWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBallastFactorWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeIntrinsicBalanceFactorWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeIntrinsicBalanceFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeIntrinsicBallastFactorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeIntrinsicBalanceFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeIntrinsicBallastFactorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBallastFactorAdjustmentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeBallastFactorAdjustmentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeBallastFactorAdjustmentWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeBallastFactorAdjustmentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBallastFactorAdjustmentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBallastFactorAdjustmentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBallastFactorAdjustmentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBallastFactorAdjustmentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLampQuantityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampQuantityWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLampQuantityWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampTypeWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLampTypeWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampTypeWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampTypeWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeLampTypeWithValue:value params:params completion:completionHandler]; } - -@end - -@implementation MTRBaseClusterRadonConcentrationMeasurement - -- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeLampTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLampTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampManufacturerWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLampManufacturerWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeLampManufacturerWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampManufacturerWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampManufacturerWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampManufacturerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampManufacturerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampManufacturerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLampManufacturerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLampRatedHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLampRatedHoursWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeLampRatedHoursWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampRatedHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeLampRatedHoursWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampRatedHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampRatedHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampRatedHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLampRatedHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampBurnHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLampBurnHoursWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampBurnHoursWithValue:value params:nil completion:completionHandler]; } - -+ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeLampBurnHoursWithValue:value params:params completion:completionHandler]; } - -- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampBurnHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampBurnHoursWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeLampBurnHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLampBurnHoursWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLampAlarmModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLampAlarmModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeLampAlarmModeWithValue:value params:nil completion:completionHandler]; } - -- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLampAlarmModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeLampAlarmModeWithValue:value params:params completion:completionHandler]; } - -+ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeLampAlarmModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampAlarmModeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampAlarmModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLampAlarmModeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeLampBurnHoursTripPointWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeLampBurnHoursTripPointWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeLampBurnHoursTripPointWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeLampBurnHoursTripPointWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:completionHandler]; } - -- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLampBurnHoursTripPointWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLampBurnHoursTripPointWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLampBurnHoursTripPointWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLampBurnHoursTripPointWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterIlluminanceMeasurement + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94467,11 +79616,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94481,9 +79630,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94492,9 +79641,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94503,11 +79652,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94517,9 +79666,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94528,9 +79677,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94539,11 +79688,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94553,53 +79702,20 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterWiFiNetworkManagement - -- (void)networkPassphraseRequestWithCompletion:(void (^)(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self networkPassphraseRequestWithParams:nil completion:completion]; -} -- (void)networkPassphraseRequestWithParams:(MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams * _Nullable)params completion:(void (^)(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = WiFiNetworkManagement::Commands::NetworkPassphraseRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + queue:queue + completion:completion]; } -- (void)readAttributeSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94608,11 +79724,11 @@ - (void)readAttributeSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSEr completion:completion]; } -- (void)subscribeAttributeSSIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94622,9 +79738,9 @@ - (void)subscribeAttributeSSIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::Tolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94633,9 +79749,9 @@ + (void)readAttributeSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributePassphraseSurrogateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLightSensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94644,11 +79760,11 @@ - (void)readAttributePassphraseSurrogateWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributePassphraseSurrogateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLightSensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94658,9 +79774,9 @@ - (void)subscribeAttributePassphraseSurrogateWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePassphraseSurrogateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLightSensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::LightSensorType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94671,7 +79787,7 @@ + (void)readAttributePassphraseSurrogateWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94684,7 +79800,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94696,7 +79812,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94707,7 +79823,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94720,7 +79836,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94732,7 +79848,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94743,7 +79859,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94756,7 +79872,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94768,7 +79884,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94779,7 +79895,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94792,7 +79908,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94804,7 +79920,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94815,7 +79931,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94828,7 +79944,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94840,7 +79956,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94851,7 +79967,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94864,7 +79980,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -94876,7 +79992,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IlluminanceMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -94887,188 +80003,372 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterThreadBorderRouterManagement +@implementation MTRBaseClusterIlluminanceMeasurement (Deprecated) -- (void)getActiveDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self getActiveDatasetRequestWithParams:nil completion:completion]; + [self readAttributeMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)getPendingDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self getPendingDatasetRequestWithParams:nil completion:completion]; + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - if (params == nil) { - params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams - alloc] init]; + [self readAttributeMinMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (void)readAttributeLightSensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLightSensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLightSensorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLightSensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLightSensorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBorderRouterNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeBorderRouterNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBorderRouterNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeBorderAgentIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeBorderAgentIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeBorderAgentIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterTemperatureMeasurement + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95077,11 +80377,11 @@ - (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95091,9 +80391,9 @@ - (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95102,9 +80402,9 @@ + (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95113,11 +80413,11 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95127,9 +80427,9 @@ - (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95138,9 +80438,9 @@ + (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeActiveDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95149,11 +80449,11 @@ - (void)readAttributeActiveDatasetTimestampWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeActiveDatasetTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95163,9 +80463,9 @@ - (void)subscribeAttributeActiveDatasetTimestampWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95174,9 +80474,9 @@ + (void)readAttributeActiveDatasetTimestampWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePendingDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95185,11 +80485,11 @@ - (void)readAttributePendingDatasetTimestampWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributePendingDatasetTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95199,9 +80499,9 @@ - (void)subscribeAttributePendingDatasetTimestampWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePendingDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::Tolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95212,7 +80512,7 @@ + (void)readAttributePendingDatasetTimestampWithClusterStateCache:(MTRClusterSta - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95225,7 +80525,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95237,7 +80537,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95248,7 +80548,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95261,7 +80561,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95273,7 +80573,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95284,7 +80584,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95297,7 +80597,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95309,7 +80609,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95320,7 +80620,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95333,7 +80633,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95345,7 +80645,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95356,7 +80656,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95369,7 +80669,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95381,7 +80681,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95392,7 +80692,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95405,7 +80705,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95417,7 +80717,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95428,195 +80728,337 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterThreadNetworkDirectory +@implementation MTRBaseClusterTemperatureMeasurement (Deprecated) -- (void)addNetworkWithParams:(MTRThreadNetworkDirectoryClusterAddNetworkParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - if (params == nil) { - params = [[MTRThreadNetworkDirectoryClusterAddNetworkParams - alloc] init]; + [self readAttributeMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - using RequestType = ThreadNetworkDirectory::Commands::AddNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)removeNetworkWithParams:(MTRThreadNetworkDirectoryClusterRemoveNetworkParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadNetworkDirectoryClusterRemoveNetworkParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } + [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - using RequestType = ThreadNetworkDirectory::Commands::RemoveNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)getOperationalDatasetWithParams:(MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams *)params completion:(void (^)(MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams - alloc] init]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ThreadNetworkDirectory::Commands::GetOperationalDataset::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributePreferredExtendedPanIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable) value params:nil completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = AsByteSpan(value); - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributePreferredExtendedPanIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributePreferredExtendedPanIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeThreadNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeThreadNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeThreadNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeThreadNetworkTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterPressureMeasurement + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95625,11 +81067,11 @@ - (void)readAttributeThreadNetworkTableSizeWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeThreadNetworkTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95639,9 +81081,9 @@ - (void)subscribeAttributeThreadNetworkTableSizeWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadNetworkTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95650,9 +81092,9 @@ + (void)readAttributeThreadNetworkTableSizeWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95661,11 +81103,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95675,9 +81117,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95686,9 +81128,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95697,11 +81139,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95711,9 +81153,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95722,9 +81164,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95733,11 +81175,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95747,9 +81189,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Tolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95758,9 +81200,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95769,11 +81211,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95783,9 +81225,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95794,9 +81236,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95805,11 +81247,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95819,9 +81261,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MinScaledValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95830,9 +81272,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxScaledValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95841,11 +81283,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxScaledValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95855,9 +81297,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxScaledValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::MaxScaledValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95866,13 +81308,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterWakeOnLAN - -- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaledToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95881,11 +81319,11 @@ - (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaledToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95895,9 +81333,9 @@ - (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaledToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ScaledTolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95906,9 +81344,9 @@ + (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeLinkLocalAddressWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScaleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95917,11 +81355,11 @@ - (void)readAttributeLinkLocalAddressWithCompletion:(void (^)(NSData * _Nullable completion:completion]; } -- (void)subscribeAttributeLinkLocalAddressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95931,9 +81369,9 @@ - (void)subscribeAttributeLinkLocalAddressWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLinkLocalAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::Scale::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95944,7 +81382,7 @@ + (void)readAttributeLinkLocalAddressWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95957,7 +81395,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95969,7 +81407,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -95980,7 +81418,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -95993,7 +81431,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96005,7 +81443,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96016,7 +81454,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96029,7 +81467,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96041,7 +81479,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96052,7 +81490,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96065,7 +81503,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96077,7 +81515,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96088,7 +81526,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96101,7 +81539,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96113,7 +81551,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96124,7 +81562,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96137,7 +81575,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96149,7 +81587,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PressureMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96160,23 +81598,300 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterWakeOnLan -@end +@implementation MTRBaseClusterPressureMeasurement (Deprecated) -@implementation MTRBaseClusterWakeOnLan (Deprecated) +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeMACAddressWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMACAddressWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMinScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinScaledValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMinScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMinScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMinScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMinScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxScaledValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxScaledValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMaxScaledValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxScaledValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMaxScaledValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxScaledValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeScaledToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeScaledToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeScaledToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeScaledToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaledToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeScaleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeScaleWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -96185,19 +81900,19 @@ - (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMACAddressWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeScaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMACAddressWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeScaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -96384,160 +82099,47 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterChannel - -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRChannelClusterChangeChannelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRBaseClusterFlowMeasurement - using RequestType = Channel::Commands::ChangeChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRChannelClusterChangeChannelResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRChannelClusterChangeChannelByNumberParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Channel::Commands::ChangeChannelByNumber::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRChannelClusterSkipChannelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Channel::Commands::SkipChannel::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)getProgramGuideWithCompletion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getProgramGuideWithParams:nil completion:completion]; -} -- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRChannelClusterGetProgramGuideParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Channel::Commands::GetProgramGuide::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRChannelClusterProgramGuideResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRChannelClusterRecordProgramParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Channel::Commands::RecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRChannelClusterCancelRecordProgramParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Channel::Commands::CancelRecordProgram::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = FlowMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96546,11 +82148,11 @@ - (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable val completion:completion]; } -- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96560,9 +82162,9 @@ - (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96571,9 +82173,9 @@ + (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96582,11 +82184,11 @@ - (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoS completion:completion]; } -- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96596,9 +82198,9 @@ - (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::Lineup::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96607,9 +82209,9 @@ + (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96618,11 +82220,11 @@ - (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterCha completion:completion]; } -- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96632,9 +82234,9 @@ - (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::Tolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96645,7 +82247,7 @@ + (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96658,7 +82260,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96670,7 +82272,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96681,7 +82283,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96694,7 +82296,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96706,7 +82308,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96717,7 +82319,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::EventList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96730,7 +82332,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::EventList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96742,7 +82344,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::EventList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96753,7 +82355,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96766,7 +82368,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96778,7 +82380,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96789,7 +82391,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96802,7 +82404,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96814,7 +82416,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96825,7 +82427,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96838,7 +82440,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -96850,7 +82452,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FlowMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -96861,39 +82463,55 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterChannel (Deprecated) +@implementation MTRBaseClusterFlowMeasurement (Deprecated) -- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self changeChannelWithParams:params completion: - ^(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self changeChannelByNumberWithParams:params completion: - completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self skipChannelWithParams:params completion: - completionHandler]; + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeChannelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -96902,33 +82520,33 @@ - (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChannelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLineupWithCompletion: - ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -96937,33 +82555,33 @@ - (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLineupWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLineupWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentChannelWithCompletion: - ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -96972,19 +82590,19 @@ - (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentChannelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentChannelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -97171,36 +82789,83 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterTargetNavigator +@implementation MTRBaseClusterRelativeHumidityMeasurement -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRTargetNavigatorClusterNavigateTargetParams - alloc] init]; - } + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = TargetNavigator::Commands::NavigateTarget::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTargetNavigatorClusterNavigateTargetResponseParams.class +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; +} + +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97209,11 +82874,11 @@ - (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97223,9 +82888,9 @@ - (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97234,9 +82899,9 @@ + (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeToleranceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97245,11 +82910,11 @@ - (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeToleranceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97259,9 +82924,9 @@ - (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeToleranceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::Tolerance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97272,7 +82937,7 @@ + (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97285,7 +82950,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97297,7 +82962,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97308,7 +82973,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97321,7 +82986,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97333,7 +82998,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97344,7 +83009,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97357,7 +83022,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97369,7 +83034,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97380,7 +83045,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97393,7 +83058,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97405,7 +83070,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97416,7 +83081,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97429,7 +83094,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97441,7 +83106,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97452,7 +83117,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97465,7 +83130,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -97477,7 +83142,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RelativeHumidityMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -97488,29 +83153,55 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTargetNavigator (Deprecated) +@implementation MTRBaseClusterRelativeHumidityMeasurement (Deprecated) -- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self navigateTargetWithParams:params completion: - ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTargetListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTargetListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeMinMeasuredValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -97519,33 +83210,33 @@ - (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTargetListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMinMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTargetListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMinMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentTargetWithCompletion: + [self readAttributeMaxMeasuredValueWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -97554,20 +83245,55 @@ - (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentTargetWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentTargetWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeMaxMeasuredValueWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeMaxMeasuredValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxMeasuredValueWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeToleranceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeToleranceWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeToleranceWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeToleranceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeToleranceWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -97753,384 +83479,183 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterMediaPlayback - -- (void)playWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self playWithParams:nil completion:completion]; -} -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterPlayParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Play::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil completion:completion]; -} -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterPauseParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Pause::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil completion:completion]; -} -- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Stop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startOverWithParams:nil completion:completion]; -} -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterStartOverParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRBaseClusterOccupancySensing - using RequestType = MediaPlayback::Commands::StartOver::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self previousWithParams:nil completion:completion]; -} -- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaPlaybackClusterPreviousParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Previous::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; -} -- (void)nextWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self nextWithParams:nil completion:completion]; + completion:completion]; } -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterNextParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Next::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self rewindWithParams:nil completion:completion]; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterRewindParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::Rewind::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self fastForwardWithParams:nil completion:completion]; -} -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaPlaybackClusterFastForwardParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::FastForward::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = OccupancySensing::Attributes::Occupancy::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterSkipForwardParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = MediaPlayback::Commands::SkipForward::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeOccupancySensorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaPlaybackClusterSkipBackwardParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::SkipBackward::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterSeekParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeOccupancySensorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeOccupancySensorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OccupancySensing::Attributes::OccupancySensorType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = MediaPlayback::Commands::Seek::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class +- (void)readAttributeOccupancySensorTypeBitmapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterActivateAudioTrackParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeOccupancySensorTypeBitmapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeOccupancySensorTypeBitmapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OccupancySensing::Attributes::OccupancySensorTypeBitmap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeHoldTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params completion:(MTRStatusCompletion)completion + +- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRMediaPlaybackClusterActivateTextTrackParams - alloc] init]; - } + [self writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeHoldTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; - using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)deactivateTextTrackWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeHoldTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self deactivateTextTrackWithParams:nil completion:completion]; + using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeHoldTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OccupancySensing::Attributes::HoldTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHoldTimeLimitsWithCompletion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98139,11 +83664,11 @@ - (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHoldTimeLimitsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98153,9 +83678,9 @@ - (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHoldTimeLimitsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::HoldTimeLimits::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98164,9 +83689,9 @@ + (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIROccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98175,11 +83700,39 @@ - (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePIROccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98189,9 +83742,9 @@ - (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98200,9 +83753,9 @@ + (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98211,11 +83764,39 @@ - (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePIRUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98225,9 +83806,9 @@ - (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98236,9 +83817,9 @@ + (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98247,11 +83828,39 @@ - (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClu completion:completion]; } -- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98261,9 +83870,9 @@ - (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98272,9 +83881,9 @@ + (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98283,11 +83892,39 @@ - (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98297,9 +83934,9 @@ - (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98308,9 +83945,9 @@ + (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98319,11 +83956,39 @@ - (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98333,9 +83998,9 @@ - (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98344,9 +84009,9 @@ + (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98355,11 +84020,39 @@ - (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98369,9 +84062,9 @@ - (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98380,9 +84073,9 @@ + (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98391,11 +84084,39 @@ - (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackCl completion:completion]; } -- (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98405,9 +84126,9 @@ - (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98416,9 +84137,9 @@ + (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98427,47 +84148,39 @@ - (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeAvailableAudioTracksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeAvailableAudioTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeActiveTextTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98477,9 +84190,9 @@ - (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98488,9 +84201,9 @@ + (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98499,11 +84212,39 @@ - (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98513,9 +84254,9 @@ - (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98526,7 +84267,7 @@ + (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98539,7 +84280,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98551,7 +84292,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98562,7 +84303,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98575,7 +84316,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98587,7 +84328,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98598,7 +84339,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98611,7 +84352,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98623,7 +84364,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98634,7 +84375,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98647,7 +84388,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98659,7 +84400,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98670,7 +84411,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98683,7 +84424,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98695,7 +84436,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98706,7 +84447,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98719,7 +84460,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -98731,7 +84472,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OccupancySensing::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -98742,141 +84483,219 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterMediaPlayback (Deprecated) +@implementation MTRBaseClusterOccupancySensing (Deprecated) -- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupancyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self playWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeOccupancyWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOccupancyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self playWithParams:nil completionHandler:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupancyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self pauseWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeOccupancyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)readAttributeOccupancySensorTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self pauseWithParams:nil completionHandler:completionHandler]; + [self readAttributeOccupancySensorTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOccupancySensorTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self stopWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancySensorTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupancySensorTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self stopPlaybackWithParams:nil completionHandler:completionHandler]; + [self readAttributeOccupancySensorTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)readAttributeOccupancySensorTypeBitmapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self startOverWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeOccupancySensorTypeBitmapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOccupancySensorTypeBitmapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self startOverWithParams:nil completionHandler:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeOccupancySensorTypeBitmapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeOccupancySensorTypeBitmapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self previousWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeOccupancySensorTypeBitmapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self previousWithParams:nil completionHandler:completionHandler]; + [self readAttributePIROccupiedToUnoccupiedDelayWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self nextWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; } -- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributePirOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self nextWithParams:nil completionHandler:completionHandler]; + [self writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; } -- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePirOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self rewindWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributePirOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self rewindWithParams:nil completionHandler:completionHandler]; + [self readAttributePIROccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler + +- (void)readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self fastForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributePIRUnoccupiedToOccupiedDelayWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self fastForwardWithParams:nil completionHandler:completionHandler]; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; } -- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)writeAttributePirUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self skipForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; } -- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePirUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self skipBackwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributePirUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self seekWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributePIRUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentStateWithCompletion: + [self readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePirUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePirUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -98885,33 +84704,41 @@ - (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePirUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePIRUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeStartTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStartTimeWithCompletion: + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -98920,33 +84747,41 @@ - (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStartTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUltrasonicOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStartTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUltrasonicOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDurationWithCompletion: + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -98955,33 +84790,41 @@ - (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUltrasonicUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSampledPositionWithCompletion: - ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -98990,33 +84833,41 @@ - (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSampledPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSampledPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePlaybackSpeedWithCompletion: + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -99025,33 +84876,41 @@ - (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePlaybackSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalContactOccupiedToUnoccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePlaybackSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePhysicalContactOccupiedToUnoccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSeekRangeEndWithCompletion: + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -99060,33 +84919,41 @@ - (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSeekRangeEndWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSeekRangeEndWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePhysicalContactUnoccupiedToOccupiedDelayWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSeekRangeStartWithCompletion: + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -99095,19 +84962,19 @@ - (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSeekRangeStartWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSeekRangeStartWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -99294,116 +85161,335 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterMediaInput +@implementation MTRBaseClusterCarbonMonoxideConcentrationMeasurement -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaInputClusterSelectInputParams - alloc] init]; - } + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = MediaInput::Commands::SelectInput::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self showInputStatusWithParams:nil completion:completion]; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaInputClusterShowInputStatusParams - alloc] init]; - } + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = MediaInput::Commands::ShowInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self hideInputStatusWithParams:nil completion:completion]; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRMediaInputClusterHideInputStatusParams - alloc] init]; - } + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = MediaInput::Commands::HideInputStatus::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRMediaInputClusterRenameInputParams - alloc] init]; - } + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = MediaInput::Commands::RenameInput::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99412,11 +85498,11 @@ - (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99426,9 +85512,9 @@ - (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99437,9 +85523,9 @@ + (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99448,11 +85534,11 @@ - (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99462,9 +85548,9 @@ - (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99475,7 +85561,7 @@ + (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99488,7 +85574,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99500,7 +85586,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99511,7 +85597,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99524,7 +85610,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99536,7 +85622,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99547,7 +85633,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99560,7 +85646,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99572,7 +85658,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99583,7 +85669,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99596,7 +85682,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99608,7 +85694,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99619,7 +85705,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99632,7 +85718,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99644,7 +85730,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99655,7 +85741,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99668,7 +85754,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -99680,7 +85766,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -99691,325 +85777,407 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterMediaInput (Deprecated) +@implementation MTRBaseClusterCarbonDioxideConcentrationMeasurement -- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self selectInputWithParams:params completion: - completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self showInputStatusWithParams:params completion: - completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self showInputStatusWithParams:nil completionHandler:completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self hideInputStatusWithParams:params completion: - completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self hideInputStatusWithParams:nil completionHandler:completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self renameInputWithParams:params completion: - completionHandler]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeInputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInputListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentInputWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentInputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentInputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -@end - -@implementation MTRBaseClusterLowPower - -- (void)sleepWithCompletion:(MTRStatusCompletion)completion +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self sleepWithParams:nil completion:completion]; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRLowPowerClusterSleepParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = LowPower::Commands::Sleep::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100022,7 +86190,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100034,7 +86202,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100045,7 +86213,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100058,7 +86226,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100070,7 +86238,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100081,7 +86249,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100094,7 +86262,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100106,7 +86274,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100117,7 +86285,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100130,7 +86298,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100142,7 +86310,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100153,7 +86321,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100166,7 +86334,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100178,7 +86346,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100189,7 +86357,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100202,7 +86370,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100214,7 +86382,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100225,232 +86393,407 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLowPower (Deprecated) +@implementation MTRBaseClusterNitrogenDioxideConcentrationMeasurement -- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self sleepWithParams:params completion: - completionHandler]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self sleepWithParams:nil completionHandler:completionHandler]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -@end - -@implementation MTRBaseClusterKeypadInput - -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRKeypadInputClusterSendKeyParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = KeypadInput::Commands::SendKey::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRKeypadInputClusterSendKeyResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100463,7 +86806,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100475,7 +86818,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100486,7 +86829,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100499,7 +86842,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100511,7 +86854,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100522,7 +86865,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100535,7 +86878,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100547,7 +86890,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100558,7 +86901,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100571,7 +86914,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100583,7 +86926,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100594,7 +86937,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100607,7 +86950,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100619,7 +86962,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100630,7 +86973,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100643,7 +86986,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100655,7 +86998,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100666,255 +87009,47 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterKeypadInput (Deprecated) - -- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self sendKeyWithParams:params completion: - ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterOzoneConcentrationMeasurement -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterContentLauncher - -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRContentLauncherClusterLaunchContentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentLauncher::Commands::LaunchContent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRContentLauncherClusterLaunchURLParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentLauncher::Commands::LaunchURL::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentLauncherClusterLauncherResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100923,11 +87058,11 @@ - (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable va completion:completion]; } -- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100937,9 +87072,9 @@ - (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -100948,9 +87083,9 @@ + (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -100959,39 +87094,11 @@ - (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101001,9 +87108,9 @@ - (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101012,9 +87119,9 @@ + (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101023,11 +87130,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101037,9 +87144,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101048,9 +87155,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101059,11 +87166,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101073,9 +87180,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101084,9 +87191,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101095,11 +87202,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101109,9 +87216,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101120,9 +87227,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101131,11 +87238,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101145,9 +87252,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101156,9 +87263,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101167,11 +87274,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101181,9 +87288,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101192,9 +87299,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101203,11 +87310,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101217,9 +87324,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101228,343 +87335,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterContentLauncher (Deprecated) - -- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self launchContentWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self launchURLWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptHeaderWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptHeaderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptHeaderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedStreamingProtocolsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeSupportedStreamingProtocolsWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedStreamingProtocolsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedStreamingProtocolsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterAudioOutput - -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAudioOutputClusterSelectOutputParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = AudioOutput::Commands::SelectOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAudioOutputClusterRenameOutputParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = AudioOutput::Commands::RenameOutput::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101573,11 +87346,11 @@ - (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101587,9 +87360,9 @@ - (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101598,22 +87371,22 @@ + (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil queue:self.callbackQueue completion:completion]; -} - -- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +} + +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101623,9 +87396,9 @@ - (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101636,7 +87409,7 @@ + (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101649,7 +87422,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101661,7 +87434,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101672,7 +87445,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101685,7 +87458,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101697,7 +87470,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101708,7 +87481,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101721,7 +87494,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101733,7 +87506,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101744,7 +87517,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101757,7 +87530,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101769,7 +87542,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101780,7 +87553,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101793,7 +87566,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101805,7 +87578,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101816,7 +87589,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101829,7 +87602,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -101841,7 +87614,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OzoneConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -101852,363 +87625,227 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterAudioOutput (Deprecated) +@implementation MTRBaseClusterPM25ConcentrationMeasurement -- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self selectOutputWithParams:params completion: - completionHandler]; -} -- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self renameOutputWithParams:params completion: - completionHandler]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOutputListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeOutputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOutputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentOutputWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentOutputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentOutputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -@end - -@implementation MTRBaseClusterApplicationLauncher - -- (void)launchAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self launchAppWithParams:nil completion:completion]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRApplicationLauncherClusterLaunchAppParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self stopAppWithParams:nil completion:completion]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRApplicationLauncherClusterStopAppParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ApplicationLauncher::Commands::StopApp::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)hideAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self hideAppWithParams:nil completion:completion]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRApplicationLauncherClusterHideAppParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ApplicationLauncher::Commands::HideApp::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102217,11 +87854,11 @@ - (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable val completion:completion]; } -- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102231,9 +87868,9 @@ - (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102242,9 +87879,9 @@ + (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102253,49 +87890,11 @@ - (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherCl completion:completion]; } -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0.application.catalogVendorID = value.application.catalogVendorID.unsignedShortValue; - nonNullValue_0.application.applicationID = AsCharSpan(value.application.applicationID); - if (value.endpoint != nil) { - auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); - definedValue_2 = value.endpoint.unsignedShortValue; - } - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102305,9 +87904,9 @@ - (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102316,9 +87915,9 @@ + (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102327,11 +87926,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102341,9 +87940,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102352,9 +87951,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102363,11 +87962,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102377,9 +87976,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102388,9 +87987,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102399,11 +87998,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102413,9 +88012,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102424,9 +88023,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102435,11 +88034,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102449,9 +88048,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102460,9 +88059,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102471,11 +88070,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102485,9 +88084,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102496,9 +88095,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102507,11 +88106,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102521,9 +88120,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102532,302 +88131,45 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterApplicationLauncher (Deprecated) - -- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self launchAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self stopAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self hideAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCatalogListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCatalogListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCatalogListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentAppWithCompletion: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeCurrentAppWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeCurrentAppWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentAppWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentAppWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterApplicationBasic - -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102836,11 +88178,11 @@ - (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102850,9 +88192,9 @@ - (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102861,9 +88203,9 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102872,11 +88214,11 @@ - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102886,9 +88228,9 @@ - (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + using TypeInfo = Pm25ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102897,9 +88239,13 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterFormaldehydeConcentrationMeasurement + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102908,11 +88254,11 @@ - (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullabl completion:completion]; } -- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102922,9 +88268,9 @@ - (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102933,9 +88279,9 @@ + (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102944,11 +88290,11 @@ - (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102958,9 +88304,9 @@ - (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -102969,9 +88315,9 @@ + (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102980,11 +88326,11 @@ - (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClus completion:completion]; } -- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -102994,9 +88340,9 @@ - (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103005,9 +88351,9 @@ + (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103016,11 +88362,11 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103030,9 +88376,9 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103041,9 +88387,9 @@ + (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103052,11 +88398,11 @@ - (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Null completion:completion]; } -- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103066,9 +88412,9 @@ - (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103077,9 +88423,9 @@ + (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103088,11 +88434,11 @@ - (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103102,9 +88448,9 @@ - (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103113,9 +88459,9 @@ + (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103124,11 +88470,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103138,9 +88484,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103149,9 +88495,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103160,11 +88506,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103174,9 +88520,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103185,9 +88531,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103196,11 +88542,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103210,9 +88556,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103221,9 +88567,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103232,11 +88578,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103246,9 +88592,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103257,9 +88603,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103268,11 +88614,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103282,9 +88628,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103293,9 +88639,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103304,11 +88650,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103318,576 +88664,348 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterApplicationBasic (Deprecated) - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationWithCompletion: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationVersionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApplicationVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApplicationVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAllowedVendorListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAllowedVendorListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAllowedVendorListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } @end -@implementation MTRBaseClusterAccountLogin +@implementation MTRBaseClusterPM1ConcentrationMeasurement -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRAccountLoginClusterGetSetupPINParams - alloc] init]; - } + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = AccountLogin::Commands::GetSetupPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRAccountLoginClusterLoginParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = AccountLogin::Commands::Login::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)logoutWithCompletion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self logoutWithParams:nil completion:completion]; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRAccountLoginClusterLogoutParams - alloc] init]; - } + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = AccountLogin::Commands::Logout::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103896,11 +89014,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103910,9 +89028,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103921,9 +89039,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103932,11 +89050,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103946,9 +89064,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103957,9 +89075,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103968,11 +89086,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -103982,9 +89100,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -103993,9 +89111,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104004,11 +89122,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104018,9 +89136,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104029,9 +89147,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104040,11 +89158,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104054,9 +89172,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104065,9 +89183,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104076,11 +89194,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104090,9 +89208,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104101,487 +89219,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterAccountLogin (Deprecated) - -- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self getSetupPINWithParams:params completion: - ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self loginWithParams:params completion: - completionHandler]; -} -- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self logoutWithParams:params completion: - completionHandler]; -} -- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self logoutWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterContentControl - -- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterUpdatePINParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::UpdatePIN::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resetPINWithCompletion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resetPINWithParams:nil completion:completion]; -} -- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRContentControlClusterResetPINParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::ResetPIN::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentControlClusterResetPINResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)enableWithCompletion:(MTRStatusCompletion)completion -{ - [self enableWithParams:nil completion:completion]; -} -- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterEnableParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::Enable::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)disableWithCompletion:(MTRStatusCompletion)completion -{ - [self disableWithParams:nil completion:completion]; -} -- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterDisableParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::Disable::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addBonusTimeWithCompletion:(MTRStatusCompletion)completion -{ - [self addBonusTimeWithParams:nil completion:completion]; -} -- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterAddBonusTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::AddBonusTime::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterSetScreenDailyTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)blockUnratedContentWithCompletion:(MTRStatusCompletion)completion -{ - [self blockUnratedContentWithParams:nil completion:completion]; -} -- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRContentControlClusterBlockUnratedContentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::BlockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unblockUnratedContentWithCompletion:(MTRStatusCompletion)completion -{ - [self unblockUnratedContentWithParams:nil completion:completion]; + completion:completion]; } -- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRContentControlClusterUnblockUnratedContentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams - alloc] init]; - } + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104590,11 +89302,11 @@ - (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104604,9 +89316,9 @@ - (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104615,9 +89327,9 @@ + (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104626,11 +89338,11 @@ - (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104640,9 +89352,9 @@ - (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104651,9 +89363,9 @@ + (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104662,11 +89374,11 @@ - (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * completion:completion]; } -- (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104676,9 +89388,9 @@ - (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104687,9 +89399,9 @@ + (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104698,11 +89410,11 @@ - (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _ completion:completion]; } -- (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104712,9 +89424,9 @@ - (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104723,9 +89435,9 @@ + (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104734,11 +89446,11 @@ - (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSS completion:completion]; } -- (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104748,9 +89460,9 @@ - (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + using TypeInfo = Pm1ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104759,9 +89471,13 @@ + (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterPM10ConcentrationMeasurement + +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104770,11 +89486,11 @@ - (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104784,9 +89500,9 @@ - (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104795,9 +89511,9 @@ + (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104806,11 +89522,11 @@ - (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104820,9 +89536,9 @@ - (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104831,9 +89547,9 @@ + (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104842,11 +89558,11 @@ - (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104856,9 +89572,9 @@ - (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104867,9 +89583,9 @@ + (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104878,11 +89594,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104892,9 +89608,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104903,9 +89619,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104914,11 +89630,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104928,9 +89644,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104939,9 +89655,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104950,11 +89666,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104964,9 +89680,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -104975,9 +89691,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -104986,11 +89702,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105000,9 +89716,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105011,9 +89727,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105022,11 +89738,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105036,9 +89752,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105047,9 +89763,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105058,11 +89774,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105072,9 +89788,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105083,38 +89799,81 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterContentAppObserver +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRContentAppObserverClusterContentAppMessageParams - alloc] init]; - } + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRContentAppObserverClusterContentAppMessageResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::LevelValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105127,7 +89886,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105139,7 +89898,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105150,7 +89909,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105163,7 +89922,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105175,7 +89934,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105186,7 +89945,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105199,7 +89958,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105211,7 +89970,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105222,7 +89981,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105235,7 +89994,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105247,7 +90006,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105258,7 +90017,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105271,7 +90030,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105283,7 +90042,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105294,7 +90053,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105307,7 +90066,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105319,7 +90078,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Pm10ConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105330,24 +90089,24 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterEcosystemInformation +@implementation MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement -- (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeDeviceDirectoryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105357,9 +90116,9 @@ - (void)subscribeAttributeDeviceDirectoryWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDeviceDirectoryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105368,22 +90127,94 @@ + (void)readAttributeDeviceDirectoryWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeLocationDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeLocationDirectoryWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105393,9 +90224,9 @@ - (void)subscribeAttributeLocationDirectoryWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocationDirectoryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105404,9 +90235,9 @@ + (void)readAttributeLocationDirectoryWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105415,11 +90246,11 @@ - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105429,9 +90260,9 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105440,9 +90271,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105451,11 +90282,11 @@ - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105465,9 +90296,9 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105476,9 +90307,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105487,11 +90318,11 @@ - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105501,9 +90332,9 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105512,9 +90343,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105523,11 +90354,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105537,9 +90368,9 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105548,9 +90379,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105559,11 +90390,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105573,9 +90404,9 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105584,9 +90415,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105595,11 +90426,11 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105609,9 +90440,9 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105620,62 +90451,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterCommissionerControl - -- (void)requestCommissioningApprovalWithParams:(MTRCommissionerControlClusterRequestCommissioningApprovalParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = CommissionerControl::Commands::RequestCommissioningApproval::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)commissionNodeWithParams:(MTRCommissionerControlClusterCommissionNodeParams *)params completion:(void (^)(MTRCommissionerControlClusterReverseOpenCommissioningWindowParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRCommissionerControlClusterCommissionNodeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = CommissionerControl::Commands::CommissionNode::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRCommissionerControlClusterReverseOpenCommissioningWindowParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedDeviceCategoriesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105684,11 +90462,11 @@ - (void)readAttributeSupportedDeviceCategoriesWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeSupportedDeviceCategoriesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105698,9 +90476,9 @@ - (void)subscribeAttributeSupportedDeviceCategoriesWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedDeviceCategoriesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105711,7 +90489,7 @@ + (void)readAttributeSupportedDeviceCategoriesWithClusterStateCache:(MTRClusterS - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105724,7 +90502,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105736,7 +90514,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105747,7 +90525,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105760,7 +90538,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105772,7 +90550,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105783,7 +90561,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105796,7 +90574,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105808,7 +90586,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105819,7 +90597,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105832,7 +90610,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105844,7 +90622,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105855,7 +90633,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105868,7 +90646,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105880,7 +90658,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105891,7 +90669,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105904,7 +90682,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105916,7 +90694,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -105927,64 +90705,83 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterElectricalMeasurement +@implementation MTRBaseClusterRadonConcentrationMeasurement -- (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion +- (void)readAttributeMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self getProfileInfoCommandWithParams:nil completion:completion]; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeMinMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeMinMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeMinMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::MinMeasuredValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -105993,11 +90790,11 @@ - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106007,9 +90804,9 @@ - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106018,9 +90815,9 @@ + (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106029,11 +90826,11 @@ - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106043,9 +90840,9 @@ - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106054,9 +90851,9 @@ + (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePeakMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106065,11 +90862,11 @@ - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePeakMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106079,9 +90876,9 @@ - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePeakMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106090,9 +90887,9 @@ + (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106101,11 +90898,11 @@ - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106115,9 +90912,9 @@ - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106126,9 +90923,9 @@ + (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAverageMeasuredValueWindowWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106137,11 +90934,11 @@ - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAverageMeasuredValueWindowWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106151,9 +90948,9 @@ - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAverageMeasuredValueWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106162,9 +90959,9 @@ + (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUncertaintyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106173,11 +90970,11 @@ - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUncertaintyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106187,9 +90984,9 @@ - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUncertaintyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::Uncertainty::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106198,9 +90995,9 @@ + (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106209,11 +91006,11 @@ - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106223,9 +91020,9 @@ - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106234,9 +91031,9 @@ + (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeasurementMediumWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106245,11 +91042,11 @@ - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMeasurementMediumWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106259,9 +91056,9 @@ - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMeasurementMediumWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::MeasurementMedium::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106270,9 +91067,9 @@ + (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLevelValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106281,11 +91078,11 @@ - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeLevelValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106295,9 +91092,9 @@ - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLevelValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::LevelValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106306,9 +91103,9 @@ + (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106317,11 +91114,11 @@ - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106331,9 +91128,9 @@ - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106342,9 +91139,9 @@ + (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106353,11 +91150,11 @@ - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106367,9 +91164,9 @@ - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106378,9 +91175,9 @@ + (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106389,11 +91186,11 @@ - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106403,9 +91200,9 @@ - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106414,9 +91211,9 @@ + (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106425,11 +91222,11 @@ - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106439,9 +91236,9 @@ - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106450,9 +91247,9 @@ + (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106461,11 +91258,11 @@ - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106475,9 +91272,9 @@ - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106486,9 +91283,9 @@ + (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106497,11 +91294,80 @@ - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RadonConcentrationMeasurement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterWiFiNetworkManagement + +- (void)networkPassphraseRequestWithCompletion:(void (^)(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self networkPassphraseRequestWithParams:nil completion:completion]; +} +- (void)networkPassphraseRequestWithParams:(MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams * _Nullable)params completion:(void (^)(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WiFiNetworkManagement::Commands::NetworkPassphraseRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSSIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106511,9 +91377,9 @@ - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::Ssid::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106522,9 +91388,9 @@ + (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePassphraseSurrogateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106533,11 +91399,11 @@ - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePassphraseSurrogateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106547,9 +91413,9 @@ - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePassphraseSurrogateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::PassphraseSurrogate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106558,9 +91424,9 @@ + (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106569,11 +91435,11 @@ - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106583,9 +91449,9 @@ - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106594,9 +91460,9 @@ + (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106605,11 +91471,11 @@ - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106619,9 +91485,9 @@ - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106630,9 +91496,9 @@ + (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106641,11 +91507,11 @@ - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106655,9 +91521,9 @@ - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106666,9 +91532,9 @@ + (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106677,11 +91543,11 @@ - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106691,9 +91557,9 @@ - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106702,9 +91568,9 @@ + (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106713,11 +91579,11 @@ - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106727,9 +91593,9 @@ - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106738,9 +91604,9 @@ + (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106749,11 +91615,11 @@ - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106763,9 +91629,9 @@ - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; + using TypeInfo = WiFiNetworkManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106774,9 +91640,118 @@ + (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterThreadBorderRouterManagement + +- (void)getActiveDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getActiveDatasetRequestWithParams:nil completion:completion]; +} +- (void)getActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getPendingDatasetRequestWithCompletion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getPendingDatasetRequestWithParams:nil completion:completion]; +} +- (void)getPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams * _Nullable)params completion:(void (^)(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThreadBorderRouterManagementClusterDatasetResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setActiveDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setPendingDatasetRequestWithParams:(MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeBorderRouterNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106785,11 +91760,11 @@ - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBorderRouterNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106799,9 +91774,9 @@ - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBorderRouterNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderRouterName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106810,9 +91785,9 @@ + (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBorderAgentIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106821,11 +91796,11 @@ - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBorderAgentIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106835,9 +91810,9 @@ - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBorderAgentIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::BorderAgentID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106846,9 +91821,9 @@ + (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106857,11 +91832,11 @@ - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106871,9 +91846,9 @@ - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ThreadVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106882,9 +91857,9 @@ + (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106893,11 +91868,11 @@ - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106907,9 +91882,9 @@ - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::InterfaceEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106918,9 +91893,9 @@ + (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106929,11 +91904,11 @@ - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveDatasetTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106943,9 +91918,9 @@ - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106954,9 +91929,9 @@ + (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePendingDatasetTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106965,11 +91940,11 @@ - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePendingDatasetTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -106979,9 +91954,9 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePendingDatasetTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -106990,9 +91965,9 @@ + (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107001,11 +91976,11 @@ - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107015,9 +91990,9 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107026,9 +92001,9 @@ + (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107037,11 +92012,11 @@ - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107051,9 +92026,9 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107062,9 +92037,9 @@ + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107073,11 +92048,11 @@ - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107087,9 +92062,9 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107098,9 +92073,9 @@ + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107109,11 +92084,11 @@ - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107123,9 +92098,9 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107134,9 +92109,9 @@ + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107145,11 +92120,11 @@ - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107159,9 +92134,9 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107170,9 +92145,9 @@ + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107181,11 +92156,11 @@ - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSN completion:completion]; } -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107195,9 +92170,9 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadBorderRouterManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107206,9 +92181,92 @@ + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterThreadNetworkDirectory + +- (void)addNetworkWithParams:(MTRThreadNetworkDirectoryClusterAddNetworkParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThreadNetworkDirectoryClusterAddNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = ThreadNetworkDirectory::Commands::AddNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeNetworkWithParams:(MTRThreadNetworkDirectoryClusterRemoveNetworkParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThreadNetworkDirectoryClusterRemoveNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = ThreadNetworkDirectory::Commands::RemoveNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getOperationalDatasetWithParams:(MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams *)params completion:(void (^)(MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ThreadNetworkDirectory::Commands::GetOperationalDataset::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributePreferredExtendedPanIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107217,11 +92275,44 @@ - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NS completion:completion]; } -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributePreferredExtendedPanIDWithValue:(NSData * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = AsByteSpan(value); + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributePreferredExtendedPanIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107231,9 +92322,9 @@ - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscri subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePreferredExtendedPanIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107242,9 +92333,9 @@ + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRC completion:completion]; } -- (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107253,11 +92344,11 @@ - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107267,9 +92358,9 @@ - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworks::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107278,9 +92369,9 @@ + (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadNetworkTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107289,11 +92380,11 @@ - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadNetworkTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107303,9 +92394,9 @@ - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadNetworkTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107314,9 +92405,9 @@ + (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107325,11 +92416,11 @@ - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107339,9 +92430,9 @@ - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107350,9 +92441,9 @@ + (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107361,11 +92452,11 @@ - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107375,9 +92466,9 @@ - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107386,9 +92477,9 @@ + (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107397,11 +92488,11 @@ - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107411,9 +92502,9 @@ - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107422,9 +92513,9 @@ + (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107433,11 +92524,11 @@ - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNu completion:completion]; } -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107447,9 +92538,9 @@ - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribe subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107458,9 +92549,9 @@ + (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClu completion:completion]; } -- (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107469,11 +92560,11 @@ - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107483,9 +92574,9 @@ - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107494,9 +92585,9 @@ + (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107505,11 +92596,11 @@ - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107519,9 +92610,9 @@ - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; + using TypeInfo = ThreadNetworkDirectory::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107530,9 +92621,13 @@ + (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterWakeOnLAN + +- (void)readAttributeMACAddressWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107541,11 +92636,11 @@ - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMACAddressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107555,9 +92650,9 @@ - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMACAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::MACAddress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107566,9 +92661,9 @@ + (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLinkLocalAddressWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107577,11 +92672,11 @@ - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLinkLocalAddressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107591,9 +92686,9 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLinkLocalAddressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::LinkLocalAddress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107602,9 +92697,9 @@ + (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClust completion:completion]; } -- (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107613,11 +92708,11 @@ - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107627,9 +92722,9 @@ - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107638,9 +92733,9 @@ + (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107649,11 +92744,11 @@ - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107663,9 +92758,9 @@ - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107674,9 +92769,9 @@ + (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107685,11 +92780,11 @@ - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107699,9 +92794,9 @@ - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107710,9 +92805,9 @@ + (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107721,11 +92816,11 @@ - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107735,9 +92830,9 @@ - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107746,9 +92841,9 @@ + (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107757,11 +92852,11 @@ - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107771,9 +92866,9 @@ - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107782,9 +92877,9 @@ + (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107793,11 +92888,11 @@ - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107807,9 +92902,9 @@ - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; + using TypeInfo = WakeOnLan::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107818,45 +92913,386 @@ + (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterWakeOnLan +@end + +@implementation MTRBaseClusterWakeOnLan (Deprecated) + +- (void)readAttributeMACAddressWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + [self readAttributeMACAddressWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMACAddressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMACAddressWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMACAddressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMACAddressWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterChannel + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completion:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRChannelClusterChangeChannelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::ChangeChannel::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRChannelClusterChangeChannelResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRChannelClusterChangeChannelByNumberParams + alloc] init]; + } -- (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::ChangeChannelByNumber::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + if (params == nil) { + params = [[MTRChannelClusterSkipChannelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::SkipChannel::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)getProgramGuideWithCompletion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getProgramGuideWithParams:nil completion:completion]; +} +- (void)getProgramGuideWithParams:(MTRChannelClusterGetProgramGuideParams * _Nullable)params completion:(void (^)(MTRChannelClusterProgramGuideResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRChannelClusterGetProgramGuideParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::GetProgramGuide::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRChannelClusterProgramGuideResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } +- (void)recordProgramWithParams:(MTRChannelClusterRecordProgramParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRChannelClusterRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -+ (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + using RequestType = Channel::Commands::RecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)cancelRecordProgramWithParams:(MTRChannelClusterCancelRecordProgramParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRChannelClusterCancelRecordProgramParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Channel::Commands::CancelRecordProgram::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107865,11 +93301,11 @@ - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeChannelListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107879,9 +93315,9 @@ - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; + using TypeInfo = Channel::Attributes::ChannelList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107890,9 +93326,9 @@ + (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLineupWithCompletion:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107901,11 +93337,11 @@ - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLineupWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107915,9 +93351,9 @@ - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLineupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; + using TypeInfo = Channel::Attributes::Lineup::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107926,9 +93362,9 @@ + (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentChannelWithCompletion:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107937,11 +93373,11 @@ - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCurrentChannelWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107951,9 +93387,9 @@ - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; + using TypeInfo = Channel::Attributes::CurrentChannel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107962,9 +93398,9 @@ + (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107973,11 +93409,11 @@ - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -107987,9 +93423,9 @@ - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; + using TypeInfo = Channel::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -107998,9 +93434,9 @@ + (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108009,11 +93445,11 @@ - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108023,9 +93459,9 @@ - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; + using TypeInfo = Channel::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108034,9 +93470,9 @@ + (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = Channel::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108045,11 +93481,11 @@ - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = Channel::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108059,9 +93495,9 @@ - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; + using TypeInfo = Channel::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108070,9 +93506,9 @@ + (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108081,39 +93517,11 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)( completion:completion]; } -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108123,9 +93531,9 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubsc subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; + using TypeInfo = Channel::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108134,9 +93542,9 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MT completion:completion]; } -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108145,39 +93553,11 @@ - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108187,9 +93567,9 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; + using TypeInfo = Channel::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108198,9 +93578,9 @@ + (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108209,39 +93589,11 @@ - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108251,9 +93603,9 @@ - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; + using TypeInfo = Channel::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108262,114 +93614,361 @@ + (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterChannel (Deprecated) + +- (void)changeChannelWithParams:(MTRChannelClusterChangeChannelParams *)params completionHandler:(void (^)(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self changeChannelWithParams:params completion: + ^(MTRChannelClusterChangeChannelResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)changeChannelByNumberWithParams:(MTRChannelClusterChangeChannelByNumberParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeChannelByNumberWithParams:params completion: + completionHandler]; +} +- (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self skipChannelWithParams:params completion: + completionHandler]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeChannelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeChannelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeChannelListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeChannelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + [self readAttributeChannelListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (void)readAttributeLineupWithCompletionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineupWithCompletion: + ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLineupWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLineupWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeLineupWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterLineupInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLineupWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; +- (void)readAttributeCurrentChannelWithCompletionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentChannelWithCompletion: + ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentChannelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRChannelClusterChannelInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentChannelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; +@end - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +@implementation MTRBaseClusterTargetNavigator + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completion:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRTargetNavigatorClusterNavigateTargetParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TargetNavigator::Commands::NavigateTarget::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRTargetNavigatorClusterNavigateTargetResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTargetListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTargetListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108379,9 +93978,9 @@ - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTargetListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::TargetList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108390,9 +93989,9 @@ + (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentTargetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108401,39 +94000,11 @@ - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentTargetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108443,9 +94014,9 @@ - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentTargetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::CurrentTarget::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108454,9 +94025,9 @@ + (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108465,11 +94036,11 @@ - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108479,9 +94050,9 @@ - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108490,9 +94061,9 @@ + (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108501,11 +94072,11 @@ - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108515,9 +94086,9 @@ - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108526,9 +94097,9 @@ + (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108537,11 +94108,11 @@ - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108551,9 +94122,9 @@ - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108562,9 +94133,9 @@ + (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108573,11 +94144,11 @@ - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108587,9 +94158,9 @@ - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108598,9 +94169,9 @@ + (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108609,11 +94180,11 @@ - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108623,9 +94194,9 @@ - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108634,9 +94205,9 @@ + (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108645,11 +94216,11 @@ - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -108659,9 +94230,9 @@ - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; + using TypeInfo = TargetNavigator::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -108670,569 +94241,651 @@ + (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterTargetNavigator (Deprecated) + +- (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams *)params completionHandler:(void (^)(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self navigateTargetWithParams:params completion: + ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)readAttributeTargetListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self readAttributeTargetListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeTargetListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTargetListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeTargetListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTargetListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)readAttributeCurrentTargetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentTargetWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentTargetWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentTargetWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentTargetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentTargetWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@end + +@implementation MTRBaseClusterMediaPlayback + +- (void)playWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self playWithParams:nil completion:completion]; } +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterPlayParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -+ (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Play::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)pauseWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self pauseWithParams:nil completion:completion]; +} +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterPauseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Pause::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopWithParams:nil completion:completion]; } +- (void)stopWithParams:(MTRMediaPlaybackClusterStopParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + using RequestType = MediaPlayback::Commands::Stop::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)startOverWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + [self startOverWithParams:nil completion:completion]; +} +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRMediaPlaybackClusterStartOverParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::StartOver::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)previousWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self previousWithParams:nil completion:completion]; } -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } + if (params == nil) { + params = [[MTRMediaPlaybackClusterPreviousParams + alloc] init]; + } - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + using RequestType = MediaPlayback::Commands::Previous::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } - -+ (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)nextWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self nextWithParams:nil completion:completion]; } - -- (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterNextParams + alloc] init]; + } -- (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -+ (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + using RequestType = MediaPlayback::Commands::Next::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)rewindWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self rewindWithParams:nil completion:completion]; } - -+ (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterRewindParams + alloc] init]; + } -- (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Rewind::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)fastForwardWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self fastForwardWithParams:nil completion:completion]; } - -+ (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterFastForwardParams + alloc] init]; + } -- (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::FastForward::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSkipForwardParams + alloc] init]; + } -+ (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::SkipForward::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSkipBackwardParams + alloc] init]; + } -+ (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::SkipBackward::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completion:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterSeekParams + alloc] init]; + } -+ (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; -- (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::Seek::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRMediaPlaybackClusterPlaybackResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)activateAudioTrackWithParams:(MTRMediaPlaybackClusterActivateAudioTrackParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterActivateAudioTrackParams + alloc] init]; + } -+ (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::ActivateAudioTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)activateTextTrackWithParams:(MTRMediaPlaybackClusterActivateTextTrackParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterActivateTextTrackParams + alloc] init]; + } -+ (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaPlayback::Commands::ActivateTextTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)deactivateTextTrackWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self deactivateTextTrackWithParams:nil completion:completion]; } - -+ (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)deactivateTextTrackWithParams:(MTRMediaPlaybackClusterDeactivateTextTrackParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams + alloc] init]; + } -- (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -- (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -+ (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + using RequestType = MediaPlayback::Commands::DeactivateTextTrack::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109241,11 +94894,11 @@ - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109255,9 +94908,9 @@ - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::CurrentState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109266,9 +94919,9 @@ + (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109277,11 +94930,11 @@ - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109291,9 +94944,9 @@ - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::StartTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109302,9 +94955,9 @@ + (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109313,11 +94966,11 @@ - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109327,9 +94980,9 @@ - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::Duration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109338,9 +94991,9 @@ + (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSampledPositionWithCompletion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109349,11 +95002,11 @@ - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSampledPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109363,9 +95016,9 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSampledPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SampledPosition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109374,9 +95027,9 @@ + (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePlaybackSpeedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109385,11 +95038,11 @@ - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePlaybackSpeedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109399,9 +95052,9 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePlaybackSpeedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::PlaybackSpeed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109410,9 +95063,9 @@ + (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSeekRangeEndWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109421,11 +95074,11 @@ - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSeekRangeEndWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109435,9 +95088,9 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSeekRangeEndWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeEnd::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109446,9 +95099,9 @@ + (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSeekRangeStartWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109457,11 +95110,11 @@ - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSeekRangeStartWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109471,9 +95124,9 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSeekRangeStartWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::SeekRangeStart::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109482,9 +95135,9 @@ + (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveAudioTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109493,11 +95146,11 @@ - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveAudioTrackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109507,9 +95160,9 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveAudioTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveAudioTrack::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109518,9 +95171,9 @@ + (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAvailableAudioTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109529,11 +95182,11 @@ - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAvailableAudioTracksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109543,9 +95196,9 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAvailableAudioTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableAudioTracks::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109554,9 +95207,9 @@ + (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveTextTrackWithCompletion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109565,11 +95218,11 @@ - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveTextTrackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109579,9 +95232,9 @@ - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveTextTrackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ActiveTextTrack::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109590,9 +95243,9 @@ + (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAvailableTextTracksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109601,11 +95254,11 @@ - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAvailableTextTracksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109615,9 +95268,9 @@ - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAvailableTextTracksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AvailableTextTracks::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109626,9 +95279,9 @@ + (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109637,11 +95290,11 @@ - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109651,9 +95304,9 @@ - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109662,9 +95315,9 @@ + (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109673,11 +95326,11 @@ - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109687,9 +95340,9 @@ - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109698,9 +95351,9 @@ + (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109709,11 +95362,11 @@ - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109723,9 +95376,9 @@ - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109734,9 +95387,9 @@ + (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109745,11 +95398,11 @@ - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109759,9 +95412,9 @@ - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109770,9 +95423,9 @@ + (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109781,11 +95434,11 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(voi completion:completion]; } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109795,9 +95448,9 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109806,9 +95459,9 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCac completion:completion]; } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109817,11 +95470,11 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)( completion:completion]; } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -109831,9 +95484,9 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubsc subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; + using TypeInfo = MediaPlayback::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -109841,334 +95494,671 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MT queue:queue completion:completion]; } - -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + +@end + +@implementation MTRBaseClusterMediaPlayback (Deprecated) + +- (void)playWithParams:(MTRMediaPlaybackClusterPlayParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self playWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)playWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self playWithParams:nil completionHandler:completionHandler]; +} +- (void)pauseWithParams:(MTRMediaPlaybackClusterPauseParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)pauseWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self pauseWithParams:nil completionHandler:completionHandler]; +} +- (void)stopPlaybackWithParams:(MTRMediaPlaybackClusterStopPlaybackParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self stopWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)stopPlaybackWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self stopPlaybackWithParams:nil completionHandler:completionHandler]; +} +- (void)startOverWithParams:(MTRMediaPlaybackClusterStartOverParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)startOverWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self startOverWithParams:nil completionHandler:completionHandler]; +} +- (void)previousWithParams:(MTRMediaPlaybackClusterPreviousParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self previousWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)previousWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self previousWithParams:nil completionHandler:completionHandler]; +} +- (void)nextWithParams:(MTRMediaPlaybackClusterNextParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self nextWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)nextWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self nextWithParams:nil completionHandler:completionHandler]; +} +- (void)rewindWithParams:(MTRMediaPlaybackClusterRewindParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)rewindWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self rewindWithParams:nil completionHandler:completionHandler]; +} +- (void)fastForwardWithParams:(MTRMediaPlaybackClusterFastForwardParams * _Nullable)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)fastForwardWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self fastForwardWithParams:nil completionHandler:completionHandler]; +} +- (void)skipForwardWithParams:(MTRMediaPlaybackClusterSkipForwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self skipForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)skipBackwardWithParams:(MTRMediaPlaybackClusterSkipBackwardParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self skipBackwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self seekWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeCurrentStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentStateWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentStateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentStateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeStartTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartTimeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStartTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeStartTimeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeStartTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartTimeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeDurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDurationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSampledPositionWithCompletionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSampledPositionWithCompletion: + ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSampledPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSampledPositionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSampledPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRMediaPlaybackClusterPlaybackPosition * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSampledPositionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePlaybackSpeedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePlaybackSpeedWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePlaybackSpeedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePlaybackSpeedWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePlaybackSpeedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePlaybackSpeedWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSeekRangeEndWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeEndWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSeekRangeEndWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSeekRangeEndWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSeekRangeEndWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeEndWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSeekRangeStartWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSeekRangeStartWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSeekRangeStartWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSeekRangeStartWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSeekRangeStartWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeSeekRangeStartWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -+ (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@end + +@implementation MTRBaseClusterMediaInput -- (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTRMediaInputClusterSelectInputParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaInput::Commands::SelectInput::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)showInputStatusWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self showInputStatusWithParams:nil completion:completion]; } - -+ (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaInputClusterShowInputStatusParams + alloc] init]; + } -- (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaInput::Commands::ShowInputStatus::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)hideInputStatusWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self hideInputStatusWithParams:nil completion:completion]; } - -+ (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTRMediaInputClusterHideInputStatusParams + alloc] init]; + } -- (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaInput::Commands::HideInputStatus::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + if (params == nil) { + params = [[MTRMediaInputClusterRenameInputParams + alloc] init]; + } -+ (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = MediaInput::Commands::RenameInput::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110177,11 +96167,11 @@ - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInputListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110191,9 +96181,9 @@ - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::InputList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110202,9 +96192,9 @@ + (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentInputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110213,11 +96203,11 @@ - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentInputWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110227,9 +96217,9 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentInputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::CurrentInput::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110238,9 +96228,9 @@ + (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110249,11 +96239,11 @@ - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110263,9 +96253,9 @@ - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110274,9 +96264,9 @@ + (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110285,11 +96275,11 @@ - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110299,9 +96289,9 @@ - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110310,9 +96300,9 @@ + (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110321,11 +96311,11 @@ - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110335,9 +96325,9 @@ - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110346,9 +96336,9 @@ + (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110357,11 +96347,11 @@ - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110371,9 +96361,9 @@ - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110382,9 +96372,9 @@ + (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110393,11 +96383,11 @@ - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110407,9 +96397,9 @@ - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110418,9 +96408,9 @@ + (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110429,11 +96419,11 @@ - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110443,9 +96433,9 @@ - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; + using TypeInfo = MediaInput::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110454,9 +96444,327 @@ + (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterMediaInput (Deprecated) + +- (void)selectInputWithParams:(MTRMediaInputClusterSelectInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self selectInputWithParams:params completion: + completionHandler]; +} +- (void)showInputStatusWithParams:(MTRMediaInputClusterShowInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:params completion: + completionHandler]; +} +- (void)showInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self showInputStatusWithParams:nil completionHandler:completionHandler]; +} +- (void)hideInputStatusWithParams:(MTRMediaInputClusterHideInputStatusParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:params completion: + completionHandler]; +} +- (void)hideInputStatusWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self hideInputStatusWithParams:nil completionHandler:completionHandler]; +} +- (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self renameInputWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeInputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInputListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeInputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeInputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeInputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentInputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentInputWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentInputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentInputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentInputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentInputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterLowPower + +- (void)sleepWithCompletion:(MTRStatusCompletion)completion +{ + [self sleepWithParams:nil completion:completion]; +} +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRLowPowerClusterSleepParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LowPower::Commands::Sleep::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110465,11 +96773,11 @@ - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110479,9 +96787,9 @@ - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110490,9 +96798,9 @@ + (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110501,11 +96809,11 @@ - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110515,9 +96823,9 @@ - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110526,9 +96834,9 @@ + (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110537,11 +96845,11 @@ - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110551,9 +96859,9 @@ - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110562,9 +96870,9 @@ + (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110573,11 +96881,11 @@ - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(voi completion:completion]; } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110587,9 +96895,9 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MT subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110598,9 +96906,9 @@ + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCac completion:completion]; } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110609,11 +96917,11 @@ - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)( completion:completion]; } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110623,9 +96931,9 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubsc subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110634,9 +96942,9 @@ + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MT completion:completion]; } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110645,11 +96953,11 @@ - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^) completion:completion]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110659,9 +96967,9 @@ - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubs subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + using TypeInfo = LowPower::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110670,153 +96978,234 @@ + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(M completion:completion]; } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterLowPower (Deprecated) + +- (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self sleepWithParams:params completion: + completionHandler]; +} +- (void)sleepWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self sleepWithParams:nil completionHandler:completionHandler]; } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} +@end + +@implementation MTRBaseClusterKeypadInput -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completion:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRKeypadInputClusterSendKeyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = KeypadInput::Commands::SendKey::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRKeypadInputClusterSendKeyResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110829,7 +97218,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110841,7 +97230,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110852,7 +97241,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110865,7 +97254,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110877,7 +97266,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110888,7 +97277,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110901,7 +97290,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110913,7 +97302,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110924,7 +97313,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110937,7 +97326,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110949,7 +97338,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; + using TypeInfo = KeypadInput::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110960,7 +97349,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110973,7 +97362,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -110985,7 +97374,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = KeypadInput::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -110996,7 +97385,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -111009,7 +97398,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -111021,7 +97410,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = KeypadInput::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -111032,420 +97421,29 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterElectricalMeasurement (Deprecated) - -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self getProfileInfoCommandWithParams:params completion: - completionHandler]; -} -- (void)getProfileInfoCommandWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self getProfileInfoCommandWithParams:nil completionHandler:completionHandler]; -} -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self getMeasurementProfileCommandWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeMeasurementTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasurementTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMeasurementTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasurementTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMeasurementTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMeasurementTypeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcVoltageMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcVoltageMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcCurrentMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcCurrentMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcCurrentMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcPowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcPowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcPowerMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcPowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeDcPowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcPowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcPowerMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcPowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcPowerMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterKeypadInput (Deprecated) -- (void)readAttributeDcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDcVoltageMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeDcVoltageMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params completionHandler:(void (^)(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeDcVoltageMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self sendKeyWithParams:params completion: + ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)readAttributeDcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcVoltageDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -111454,33 +97452,33 @@ - (void)subscribeAttributeDcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDcVoltageDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcVoltageDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcCurrentMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -111489,33 +97487,33 @@ - (void)subscribeAttributeDcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDcCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeDcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeDcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcCurrentDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -111524,33 +97522,33 @@ - (void)subscribeAttributeDcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDcCurrentDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcCurrentDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcPowerMultiplierWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -111559,33 +97557,33 @@ - (void)subscribeAttributeDcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDcPowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcPowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcPowerDivisorWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -111594,418 +97592,430 @@ - (void)subscribeAttributeDcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDcPowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDcPowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeAcFrequencyWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeAcFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterContentLauncher + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentLauncherClusterLaunchContentParams + alloc] init]; } - [self subscribeAttributeAcFrequencyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcFrequencyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeAcFrequencyMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcFrequencyMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentLauncher::Commands::LaunchContent::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeAcFrequencyMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completion:(void (^)(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentLauncherClusterLaunchURLParams + alloc] init]; } - [self subscribeAttributeAcFrequencyMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentLauncher::Commands::LaunchURL::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeAcFrequencyMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptHeaderWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcFrequencyMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcFrequencyMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptHeaderWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcFrequencyMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAcFrequencyMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptHeaderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcFrequencyMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptHeader::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcFrequencyMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSupportedStreamingProtocolsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcFrequencyMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeNeutralCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeNeutralCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeNeutralCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNeutralCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeNeutralCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeSupportedStreamingProtocolsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeNeutralCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTotalActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedStreamingProtocolsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTotalActivePowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::SupportedStreamingProtocols::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTotalActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTotalActivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTotalActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTotalActivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTotalReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTotalReactivePowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTotalReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTotalReactivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTotalReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTotalReactivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTotalApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTotalApparentPowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTotalApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTotalApparentPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTotalApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTotalApparentPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeMeasured1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasured1stHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeMeasured1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasured1stHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeMeasured1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeMeasured3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasured3rdHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeMeasured3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasured3rdHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeMeasured3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeMeasured5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasured5thHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeMeasured5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasured5thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeMeasured5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeMeasured7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMeasured7thHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentLauncher::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeMeasured7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterContentLauncher (Deprecated) + +- (void)launchContentWithParams:(MTRContentLauncherClusterLaunchContentParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMeasured7thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self launchContentWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -+ (void)readAttributeMeasured7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)launchURLWithParams:(MTRContentLauncherClusterLaunchURLParams *)params completionHandler:(void (^)(MTRContentLauncherClusterLaunchResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self launchURLWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)readAttributeMeasured9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptHeaderWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasured9thHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptHeaderWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptHeaderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112014,30 +98024,38 @@ - (void)subscribeAttributeMeasured9thHarmonicCurrentWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasured9thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptHeaderWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasured9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptHeaderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptHeaderWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasured11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedStreamingProtocolsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasured11thHarmonicCurrentWithCompletion: + [self readAttributeSupportedStreamingProtocolsWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeSupportedStreamingProtocolsWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeSupportedStreamingProtocolsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -112049,33 +98067,33 @@ - (void)subscribeAttributeMeasured11thHarmonicCurrentWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasured11thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeSupportedStreamingProtocolsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeMeasured11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedStreamingProtocolsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeSupportedStreamingProtocolsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112084,33 +98102,33 @@ - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredPhase1stHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112119,33 +98137,33 @@ - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112154,33 +98172,33 @@ - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredPhase5thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112189,33 +98207,33 @@ - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredPhase7thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112224,383 +98242,396 @@ - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithMinInterval:(NSNumb subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMeasuredPhase9thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterAudioOutput + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRAudioOutputClusterSelectOutputParams + alloc] init]; } - [self subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = AudioOutput::Commands::SelectOutput::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeMeasuredPhase11thHarmonicCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRAudioOutputClusterRenameOutputParams + alloc] init]; + } -- (void)readAttributeAcFrequencyMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcFrequencyMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = AudioOutput::Commands::RenameOutput::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeAcFrequencyMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeOutputListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcFrequencyMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcFrequencyMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOutputListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcFrequencyMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcFrequencyDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutputListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcFrequencyDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::OutputList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeAcFrequencyDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeCurrentOutputWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcFrequencyDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcFrequencyDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeCurrentOutputWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcFrequencyDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentOutputWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePowerMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::CurrentOutput::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePowerDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeHarmonicCurrentMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHarmonicCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeHarmonicCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePhaseHarmonicCurrentMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributePhaseHarmonicCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeInstantaneousVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInstantaneousVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeInstantaneousVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstantaneousVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeInstantaneousVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeInstantaneousVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeInstantaneousLineCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInstantaneousLineCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeInstantaneousLineCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstantaneousLineCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeInstantaneousLineCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeInstantaneousLineCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeInstantaneousActiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInstantaneousActiveCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AudioOutput::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeInstantaneousActiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterAudioOutput (Deprecated) + +- (void)selectOutputWithParams:(MTRAudioOutputClusterSelectOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInstantaneousActiveCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self selectOutputWithParams:params completion: + completionHandler]; } -+ (void)readAttributeInstantaneousActiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeInstantaneousActiveCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self renameOutputWithParams:params completion: + completionHandler]; } -- (void)readAttributeInstantaneousReactiveCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOutputListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInstantaneousReactiveCurrentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOutputListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOutputListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112609,33 +98640,33 @@ - (void)subscribeAttributeInstantaneousReactiveCurrentWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeInstantaneousReactiveCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeOutputListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeInstantaneousReactiveCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOutputListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInstantaneousReactiveCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeOutputListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeInstantaneousPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentOutputWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInstantaneousPowerWithCompletion: + [self readAttributeCurrentOutputWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentOutputWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112644,33 +98675,33 @@ - (void)subscribeAttributeInstantaneousPowerWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeInstantaneousPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentOutputWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeInstantaneousPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentOutputWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeInstantaneousPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentOutputWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112679,68 +98710,68 @@ - (void)subscribeAttributeRmsVoltageWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsVoltageMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112749,30 +98780,30 @@ - (void)subscribeAttributeRmsVoltageMaxWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRmsVoltageMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRmsCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -112784,33 +98815,33 @@ - (void)subscribeAttributeRmsCurrentWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRmsCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRmsCurrentMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentMinWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112819,68 +98850,484 @@ - (void)subscribeAttributeRmsCurrentMinWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsCurrentMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsCurrentMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsCurrentMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeRmsCurrentMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeRmsCurrentMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterApplicationLauncher + +- (void)launchAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + [self launchAppWithParams:nil completion:completion]; +} +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRApplicationLauncherClusterLaunchAppParams + alloc] init]; } - [self subscribeAttributeRmsCurrentMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ApplicationLauncher::Commands::LaunchApp::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stopAppWithParams:nil completion:completion]; +} +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRApplicationLauncherClusterStopAppParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ApplicationLauncher::Commands::StopApp::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)hideAppWithCompletion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self hideAppWithParams:nil completion:completion]; +} +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completion:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRApplicationLauncherClusterHideAppParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ApplicationLauncher::Commands::HideApp::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRApplicationLauncherClusterLauncherResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCatalogListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeCatalogListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCatalogListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::CatalogList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeCurrentAppWithCompletion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0.application.catalogVendorID = value.application.catalogVendorID.unsignedShortValue; + nonNullValue_0.application.applicationID = AsCharSpan(value.application.applicationID); + if (value.endpoint != nil) { + auto & definedValue_2 = nonNullValue_0.endpoint.Emplace(); + definedValue_2 = value.endpoint.unsignedShortValue; + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeCurrentAppWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeCurrentAppWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::CurrentApp::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ApplicationLauncher::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterApplicationLauncher (Deprecated) + +- (void)launchAppWithParams:(MTRApplicationLauncherClusterLaunchAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self launchAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -+ (void)readAttributeRmsCurrentMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)stopAppWithParams:(MTRApplicationLauncherClusterStopAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self stopAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)hideAppWithParams:(MTRApplicationLauncherClusterHideAppParams * _Nullable)params completionHandler:(void (^)(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self hideAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)readAttributeActivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCatalogListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCatalogListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCatalogListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112889,33 +99336,41 @@ - (void)subscribeAttributeActivePowerWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeCatalogListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeActivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCatalogListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCatalogListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeActivePowerMinWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentAppWithCompletionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerMinWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentAppWithCompletion: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCurrentAppWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeCurrentAppWithValue:(MTRApplicationLauncherClusterApplicationEP * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeCurrentAppWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeCurrentAppWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112924,33 +99379,33 @@ - (void)subscribeAttributeActivePowerMinWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActivePowerMinWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentAppWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeActivePowerMinWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentAppWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerMinWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentAppWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeActivePowerMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerMaxWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112959,33 +99414,33 @@ - (void)subscribeAttributeActivePowerMaxWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActivePowerMaxWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeActivePowerMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActivePowerMaxWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeReactivePowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeReactivePowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -112994,33 +99449,33 @@ - (void)subscribeAttributeReactivePowerWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeReactivePowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeReactivePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeReactivePowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeApparentPowerWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeApparentPowerWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113029,33 +99484,33 @@ - (void)subscribeAttributeApparentPowerWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeApparentPowerWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeApparentPowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeApparentPowerWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributePowerFactorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePowerFactorWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113064,41 +99519,33 @@ - (void)subscribeAttributePowerFactorWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePowerFactorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePowerFactorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePowerFactorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113107,466 +99554,552 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithMinInterval:(NSN subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsUnderVoltageCounterWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeAverageRmsUnderVoltageCounterWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +@end + +@implementation MTRBaseClusterApplicationBasic + +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsUnderVoltageCounterWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::VendorName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsExtremeOverVoltagePeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::VendorID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeApplicationNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeApplicationNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsExtremeOverVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeApplicationNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeProductIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeProductIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::ProductID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeApplicationWithCompletion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeApplicationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRmsVoltageSagPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSagPeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::Application::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsVoltageSagPeriodWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeRmsVoltageSagPeriodWithValue:value params:params completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageSagPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSagPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::Status::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageSagPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeApplicationVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSagPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageSwellPeriodWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeApplicationVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSwellPeriodWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeApplicationVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:nil completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::ApplicationVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeAllowedVendorListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeRmsVoltageSwellPeriodWithValue:value params:params completion:completionHandler]; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsVoltageSwellPeriodWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAllowedVendorListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSwellPeriodWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsVoltageSwellPeriodWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAllowedVendorListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSwellPeriodWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AllowedVendorList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcVoltageMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcVoltageMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcVoltageMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcVoltageMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcVoltageMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcVoltageMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcVoltageDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcVoltageDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcVoltageDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcVoltageDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcVoltageDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcVoltageDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcCurrentMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcCurrentMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcCurrentMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcCurrentMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcCurrentMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcCurrentMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcCurrentDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcCurrentDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcCurrentDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcCurrentDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcCurrentDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcCurrentDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcPowerMultiplierWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcPowerMultiplierWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcPowerMultiplierWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcPowerMultiplierWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcPowerMultiplierWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcPowerMultiplierWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAcPowerDivisorWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcPowerDivisorWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAcPowerDivisorWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcPowerDivisorWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAcPowerDivisorWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcPowerDivisorWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ApplicationBasic::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterApplicationBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverloadAlarmsMaskWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113575,33 +100108,33 @@ - (void)subscribeAttributeOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOverloadAlarmsMaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverloadAlarmsMaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVoltageOverloadWithCompletion: + [self readAttributeVendorIDWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113610,33 +100143,33 @@ - (void)subscribeAttributeVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeVoltageOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeVoltageOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentOverloadWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeApplicationNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113645,111 +100178,68 @@ - (void)subscribeAttributeCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeApplicationNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeAcOverloadAlarmsMaskWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcOverloadAlarmsMaskWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeAcOverloadAlarmsMaskWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeAcOverloadAlarmsMaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcOverloadAlarmsMaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcOverloadAlarmsMaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcOverloadAlarmsMaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcVoltageOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcVoltageOverloadWithCompletion: + [self readAttributeProductIDWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcVoltageOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; } else { subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcVoltageOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcVoltageOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeProductIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcVoltageOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeProductIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcCurrentOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationWithCompletionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcCurrentOverloadWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationWithCompletion: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113758,33 +100248,33 @@ - (void)subscribeAttributeAcCurrentOverloadWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcCurrentOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeApplicationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcCurrentOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcCurrentOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeApplicationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcActivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcActivePowerOverloadWithCompletion: + [self readAttributeStatusWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113793,33 +100283,33 @@ - (void)subscribeAttributeAcActivePowerOverloadWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcActivePowerOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcActivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcActivePowerOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAcReactivePowerOverloadWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeApplicationVersionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcReactivePowerOverloadWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeApplicationVersionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeApplicationVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113828,33 +100318,33 @@ - (void)subscribeAttributeAcReactivePowerOverloadWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAcReactivePowerOverloadWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeApplicationVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcReactivePowerOverloadWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeApplicationVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcReactivePowerOverloadWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeApplicationVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAllowedVendorListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsOverVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAllowedVendorListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAllowedVendorListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113863,33 +100353,33 @@ - (void)subscribeAttributeAverageRmsOverVoltageWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAverageRmsOverVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAllowedVendorListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageRmsOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAllowedVendorListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsOverVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAllowedVendorListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsUnderVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113898,33 +100388,33 @@ - (void)subscribeAttributeAverageRmsUnderVoltageWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAverageRmsUnderVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageRmsUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsUnderVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsExtremeOverVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsExtremeOverVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113933,33 +100423,33 @@ - (void)subscribeAttributeRmsExtremeOverVoltageWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsExtremeOverVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsExtremeOverVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsExtremeOverVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsExtremeUnderVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsExtremeUnderVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -113968,33 +100458,33 @@ - (void)subscribeAttributeRmsExtremeUnderVoltageWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsExtremeUnderVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsExtremeUnderVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsExtremeUnderVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageSagWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageSagWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114003,30 +100493,30 @@ - (void)subscribeAttributeRmsVoltageSagWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageSagWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeRmsVoltageSagWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRmsVoltageSagWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeRmsVoltageSwellWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageSwellWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -114038,138 +100528,373 @@ - (void)subscribeAttributeRmsVoltageSwellWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageSwellWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRmsVoltageSwellWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterAccountLogin + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completion:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRAccountLoginClusterGetSetupPINParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::GetSetupPIN::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRAccountLoginClusterGetSetupPINResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAccountLoginClusterLoginParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::Login::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)logoutWithCompletion:(MTRStatusCompletion)completion +{ + [self logoutWithParams:nil completion:completion]; +} +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAccountLoginClusterLogoutParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMs == nil) { + timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); + } + + using RequestType = AccountLogin::Commands::Logout::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = AccountLogin::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSwellWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLineCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLineCurrentPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLineCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLineCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLineCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLineCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveCurrentPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AccountLogin::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +@end + +@implementation MTRBaseClusterAccountLogin (Deprecated) + +- (void)getSetupPINWithParams:(MTRAccountLoginClusterGetSetupPINParams *)params completionHandler:(void (^)(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeActiveCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self getSetupPINWithParams:params completion: + ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } - -- (void)readAttributeReactiveCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)loginWithParams:(MTRAccountLoginClusterLoginParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeReactiveCurrentPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self loginWithParams:params completion: + completionHandler]; } -- (void)subscribeAttributeReactiveCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReactiveCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self logoutWithParams:params completion: + completionHandler]; } -+ (void)readAttributeReactiveCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)logoutWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeReactiveCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self logoutWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeRmsVoltagePhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltagePhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114178,33 +100903,33 @@ - (void)subscribeAttributeRmsVoltagePhaseBWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltagePhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsVoltagePhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltagePhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsVoltageMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMinPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114213,33 +100938,33 @@ - (void)subscribeAttributeRmsVoltageMinPhaseBWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeRmsVoltageMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRmsVoltageMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMaxPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114248,33 +100973,33 @@ - (void)subscribeAttributeRmsVoltageMaxPhaseBWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsVoltageMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsVoltageMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsCurrentPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentPhaseBWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114283,33 +101008,33 @@ - (void)subscribeAttributeRmsCurrentPhaseBWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsCurrentPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsCurrentPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsCurrentMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentMinPhaseBWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -114318,1461 +101043,1641 @@ - (void)subscribeAttributeRmsCurrentMinPhaseBWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRmsCurrentMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRmsCurrentMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRmsCurrentMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRmsCurrentMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeRmsCurrentMaxPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeRmsCurrentMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterContentControl + +- (void)updatePINWithParams:(MTRContentControlClusterUpdatePINParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterUpdatePINParams + alloc] init]; } - [self subscribeAttributeRmsCurrentMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeRmsCurrentMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)readAttributeActivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::UpdatePIN::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)resetPINWithCompletion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeActivePowerPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self resetPINWithParams:nil completion:completion]; } -- (void)subscribeAttributeActivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)resetPINWithParams:(MTRContentControlClusterResetPINParams * _Nullable)params completion:(void (^)(MTRContentControlClusterResetPINResponseParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterResetPINParams + alloc] init]; } - [self subscribeAttributeActivePowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::ResetPIN::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentControlClusterResetPINResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeActivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)enableWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeActivePowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self enableWithParams:nil completion:completion]; } +- (void)enableWithParams:(MTRContentControlClusterEnableParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterEnableParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeActivePowerMinPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + using RequestType = ContentControl::Commands::Enable::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)disableWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeActivePowerMinPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self disableWithParams:nil completion:completion]; } -- (void)subscribeAttributeActivePowerMinPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)disableWithParams:(MTRContentControlClusterDisableParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterDisableParams + alloc] init]; } - [self subscribeAttributeActivePowerMinPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::Disable::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeActivePowerMinPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addBonusTimeWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeActivePowerMinPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self addBonusTimeWithParams:nil completion:completion]; } - -- (void)readAttributeActivePowerMaxPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)addBonusTimeWithParams:(MTRContentControlClusterAddBonusTimeParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeActivePowerMaxPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRContentControlClusterAddBonusTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::AddBonusTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeActivePowerMaxPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setScreenDailyTimeWithParams:(MTRContentControlClusterSetScreenDailyTimeParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterSetScreenDailyTimeParams + alloc] init]; } - [self subscribeAttributeActivePowerMaxPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetScreenDailyTime::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeActivePowerMaxPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)blockUnratedContentWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeActivePowerMaxPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self blockUnratedContentWithParams:nil completion:completion]; } +- (void)blockUnratedContentWithParams:(MTRContentControlClusterBlockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRContentControlClusterBlockUnratedContentParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (void)readAttributeReactivePowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + using RequestType = ContentControl::Commands::BlockUnratedContent::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unblockUnratedContentWithCompletion:(MTRStatusCompletion)completion { - [self readAttributeReactivePowerPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self unblockUnratedContentWithParams:nil completion:completion]; } -- (void)subscribeAttributeReactivePowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)unblockUnratedContentWithParams:(MTRContentControlClusterUnblockUnratedContentParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterUnblockUnratedContentParams + alloc] init]; } - [self subscribeAttributeReactivePowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::UnblockUnratedContent::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeReactivePowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)setOnDemandRatingThresholdWithParams:(MTRContentControlClusterSetOnDemandRatingThresholdParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeReactivePowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} + if (params == nil) { + params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams + alloc] init]; + } -- (void)readAttributeApparentPowerPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeApparentPowerPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetOnDemandRatingThreshold::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeApparentPowerPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setScheduledContentRatingThresholdWithParams:(MTRContentControlClusterSetScheduledContentRatingThresholdParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams + alloc] init]; } - [self subscribeAttributeApparentPowerPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentControl::Commands::SetScheduledContentRatingThreshold::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeApparentPowerPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeApparentPowerPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributePowerFactorPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePowerFactorPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributePowerFactorPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerFactorPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::Enabled::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributePowerFactorPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeOnDemandRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePowerFactorPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOnDemandRatingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOnDemandRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatings::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeOnDemandRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeOnDemandRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeOnDemandRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::OnDemandRatingThreshold::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeScheduledContentRatingsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeScheduledContentRatingsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeScheduledContentRatingsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatings::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeScheduledContentRatingThresholdWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeScheduledContentRatingThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeScheduledContentRatingThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScheduledContentRatingThreshold::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeScreenDailyTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeScreenDailyTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeScreenDailyTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ScreenDailyTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRemainingScreenTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRemainingScreenTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSagPeriodPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeRemainingScreenTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::RemainingScreenTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageSagPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBlockUnratedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBlockUnratedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeBlockUnratedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::BlockUnrated::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseBWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLineCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLineCurrentPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLineCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLineCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLineCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLineCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeActiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeActiveCurrentPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeActiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeActiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeReactiveCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeReactiveCurrentPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeReactiveCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReactiveCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeReactiveCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeReactiveCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltagePhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltagePhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltagePhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltagePhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltagePhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltagePhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageMinPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageMaxPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +@end + +@implementation MTRBaseClusterContentAppObserver + +- (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessageParams *)params completion:(void (^)(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRContentAppObserverClusterContentAppMessageParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = ContentAppObserver::Commands::ContentAppMessage::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRContentAppObserverClusterContentAppMessageResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeRmsCurrentPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsCurrentPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsCurrentPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsCurrentMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentMinPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsCurrentMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsCurrentMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsCurrentMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentMaxPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsCurrentMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsCurrentMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsCurrentMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeActivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeActivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActivePowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeActivePowerMinPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerMinPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeActivePowerMinPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActivePowerMinPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMinPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerMinPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeActivePowerMaxPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerMaxPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeActivePowerMaxPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActivePowerMaxPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActivePowerMaxPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActivePowerMaxPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ContentAppObserver::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeReactivePowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterEcosystemInformation + +- (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeReactivePowerPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeReactivePowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeDeviceDirectoryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeReactivePowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReactivePowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeDeviceDirectoryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeReactivePowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeApparentPowerPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeApparentPowerPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeApparentPowerPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeLocationDirectoryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeApparentPowerPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeLocationDirectoryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeApparentPowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::LocationDirectory::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePowerFactorPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributePowerFactorPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePowerFactorPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = EcosystemInformation::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterCommissionerControl + +- (void)requestCommissioningApprovalWithParams:(MTRCommissionerControlClusterRequestCommissioningApprovalParams *)params completion:(MTRStatusCompletion)completion { - [self readAttributeRmsVoltageSagPeriodPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CommissionerControl::Commands::RequestCommissioningApproval::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)commissionNodeWithParams:(MTRCommissionerControlClusterCommissionNodeParams *)params completion:(void (^)(MTRCommissionerControlClusterReverseOpenCommissioningWindowParams * _Nullable data, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRCommissionerControlClusterCommissionNodeParams + alloc] init]; } - [self subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = CommissionerControl::Commands::CommissionNode::Type; + [self.device _invokeKnownCommandWithEndpointID:self.endpointID + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRCommissionerControlClusterReverseOpenCommissioningWindowParams.class + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSupportedDeviceCategoriesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeSupportedDeviceCategoriesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeSupportedDeviceCategoriesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::SupportedDeviceCategories::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = CommissionerControl::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 3ab34174b53453..b86600455521cd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -24,9 +24,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIdentifyID MTR_DEPRECATED("Please use MTRClusterIDTypeIdentifyID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000003, MTRClusterGroupsID MTR_DEPRECATED("Please use MTRClusterIDTypeGroupsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000004, MTRClusterOnOffID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000006, - MTRClusterOnOffSwitchConfigurationID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffSwitchConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000007, MTRClusterLevelControlID MTR_DEPRECATED("Please use MTRClusterIDTypeLevelControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000008, - MTRClusterBinaryInputBasicID MTR_DEPRECATED("Please use MTRClusterIDTypeBinaryInputBasicID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000000F, MTRClusterPulseWidthModulationID MTR_DEPRECATED("Please use MTRClusterIDTypePulseWidthModulationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000001C, MTRClusterDescriptorID MTR_DEPRECATED("Please use MTRClusterIDTypeDescriptorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000001D, MTRClusterBindingID MTR_DEPRECATED("Please use MTRClusterIDTypeBindingID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000001E, @@ -60,7 +58,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterModeSelectID MTR_DEPRECATED("Please use MTRClusterIDTypeModeSelectID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000050, MTRClusterDoorLockID MTR_DEPRECATED("Please use MTRClusterIDTypeDoorLockID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000101, MTRClusterWindowCoveringID MTR_DEPRECATED("Please use MTRClusterIDTypeWindowCoveringID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000102, - MTRClusterBarrierControlID MTR_DEPRECATED("Please use MTRClusterIDTypeBarrierControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000103, MTRClusterPumpConfigurationAndControlID MTR_DEPRECATED("Please use MTRClusterIDTypePumpConfigurationAndControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000200, MTRClusterThermostatID MTR_DEPRECATED("Please use MTRClusterIDTypeThermostatID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000201, MTRClusterFanControlID MTR_DEPRECATED("Please use MTRClusterIDTypeFanControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000202, @@ -85,14 +82,11 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterApplicationLauncherID MTR_DEPRECATED("Please use MTRClusterIDTypeApplicationLauncherID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000050C, MTRClusterApplicationBasicID MTR_DEPRECATED("Please use MTRClusterIDTypeApplicationBasicID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000050D, MTRClusterAccountLoginID MTR_DEPRECATED("Please use MTRClusterIDTypeAccountLoginID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000050E, - MTRClusterElectricalMeasurementID MTR_DEPRECATED("Please use MTRClusterIDTypeElectricalMeasurementID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000B04, MTRClusterTestClusterID MTR_DEPRECATED("Please use MTRClusterIDTypeUnitTestingID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0xFFF1FC05, MTRClusterIDTypeIdentifyID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, MTRClusterIDTypeGroupsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, MTRClusterIDTypeOnOffID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, - MTRClusterIDTypeOnOffSwitchConfigurationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRClusterIDTypeLevelControlID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRClusterIDTypeBinaryInputBasicID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F, MTRClusterIDTypePulseWidthModulationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001C, MTRClusterIDTypeDescriptorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001D, MTRClusterIDTypeBindingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, @@ -163,7 +157,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeDeviceEnergyManagementModeID MTR_PROVISIONALLY_AVAILABLE = 0x0000009F, MTRClusterIDTypeDoorLockID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000101, MTRClusterIDTypeWindowCoveringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000102, - MTRClusterIDTypeBarrierControlID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000103, MTRClusterIDTypeServiceAreaID MTR_PROVISIONALLY_AVAILABLE = 0x00000150, MTRClusterIDTypePumpConfigurationAndControlID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000200, MTRClusterIDTypeThermostatID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000201, @@ -206,9 +199,17 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeContentAppObserverID MTR_PROVISIONALLY_AVAILABLE = 0x00000510, MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750, MTRClusterIDTypeCommissionerControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000751, - MTRClusterIDTypeElectricalMeasurementID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000B04, MTRClusterIDTypeUnitTestingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05, MTRClusterIDTypeSampleMEIID MTR_PROVISIONALLY_AVAILABLE = 0xFFF1FC20, + + MTRClusterBarrierControlID MTR_DEPRECATED("Please use MTRClusterIDTypeBarrierControlID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000103, + MTRClusterIDTypeBarrierControlID MTR_DEPRECATED("The BarrierControl cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000103, + MTRClusterBinaryInputBasicID MTR_DEPRECATED("Please use MTRClusterIDTypeBinaryInputBasicID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x0000000F, + MTRClusterIDTypeBinaryInputBasicID MTR_DEPRECATED("The BinaryInputBasic cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000000F, + MTRClusterElectricalMeasurementID MTR_DEPRECATED("Please use MTRClusterIDTypeElectricalMeasurementID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000B04, + MTRClusterIDTypeElectricalMeasurementID MTR_DEPRECATED("The ElectricalMeasurement cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000B04, + MTRClusterOnOffSwitchConfigurationID MTR_DEPRECATED("Please use MTRClusterIDTypeOnOffSwitchConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000007, + MTRClusterIDTypeOnOffSwitchConfigurationID MTR_DEPRECATED("The OnOffSwitchConfiguration cluster will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000007, }; #pragma mark - Attributes IDs @@ -346,39 +347,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterOnOffAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster OnOffSwitchConfiguration deprecated attribute names - MTRClusterOnOffSwitchConfigurationAttributeSwitchTypeID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000010, - MTRClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterOnOffSwitchConfigurationAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterOnOffSwitchConfigurationAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterOnOffSwitchConfigurationAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster OnOffSwitchConfiguration attributes - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster LevelControl deprecated attribute names MTRClusterLevelControlAttributeCurrentLevelID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterLevelControlAttributeCurrentLevelID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -460,67 +428,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterLevelControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster BinaryInputBasic deprecated attribute names - MTRClusterBinaryInputBasicAttributeActiveTextID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000004, - MTRClusterBinaryInputBasicAttributeDescriptionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000001C, - MTRClusterBinaryInputBasicAttributeInactiveTextID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000002E, - MTRClusterBinaryInputBasicAttributeOutOfServiceID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000051, - MTRClusterBinaryInputBasicAttributePolarityID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000054, - MTRClusterBinaryInputBasicAttributePresentValueID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000055, - MTRClusterBinaryInputBasicAttributeReliabilityID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000067, - MTRClusterBinaryInputBasicAttributeStatusFlagsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000006F, - MTRClusterBinaryInputBasicAttributeApplicationTypeID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000100, - MTRClusterBinaryInputBasicAttributeGeneratedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterBinaryInputBasicAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterBinaryInputBasicAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterBinaryInputBasicAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterBinaryInputBasicAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster BinaryInputBasic attributes - MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001C, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000002E, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000051, - MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000054, - MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000055, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000067, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000006F, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000100, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster PulseWidthModulation deprecated attribute names MTRClusterPulseWidthModulationAttributeGeneratedCommandListID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -3073,71 +2980,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterWindowCoveringAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster BarrierControl deprecated attribute names - MTRClusterBarrierControlAttributeBarrierMovingStateID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - MTRClusterBarrierControlAttributeBarrierSafetyStatusID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000002, - MTRClusterBarrierControlAttributeBarrierCapabilitiesID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000003, - MTRClusterBarrierControlAttributeBarrierOpenEventsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000004, - MTRClusterBarrierControlAttributeBarrierCloseEventsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000005, - MTRClusterBarrierControlAttributeBarrierCommandOpenEventsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000006, - MTRClusterBarrierControlAttributeBarrierCommandCloseEventsID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000007, - MTRClusterBarrierControlAttributeBarrierOpenPeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000008, - MTRClusterBarrierControlAttributeBarrierClosePeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000009, - MTRClusterBarrierControlAttributeBarrierPositionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000000A, - MTRClusterBarrierControlAttributeGeneratedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterBarrierControlAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterBarrierControlAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterBarrierControlAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterBarrierControlAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster BarrierControl attributes - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, - MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000A, - MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterBarrierControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster ServiceArea attributes MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, @@ -4915,546 +4757,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterCommissionerControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, MTRAttributeIDTypeClusterCommissionerControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster ElectricalMeasurement deprecated attribute names - MTRClusterElectricalMeasurementAttributeMeasurementTypeID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterElectricalMeasurementAttributeDcVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000100, - MTRClusterElectricalMeasurementAttributeDcVoltageMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000101, - MTRClusterElectricalMeasurementAttributeDcVoltageMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000102, - MTRClusterElectricalMeasurementAttributeDcCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000103, - MTRClusterElectricalMeasurementAttributeDcCurrentMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000104, - MTRClusterElectricalMeasurementAttributeDcCurrentMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000105, - MTRClusterElectricalMeasurementAttributeDcPowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000106, - MTRClusterElectricalMeasurementAttributeDcPowerMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000107, - MTRClusterElectricalMeasurementAttributeDcPowerMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000108, - MTRClusterElectricalMeasurementAttributeDcVoltageMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000200, - MTRClusterElectricalMeasurementAttributeDcVoltageDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000201, - MTRClusterElectricalMeasurementAttributeDcCurrentMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000202, - MTRClusterElectricalMeasurementAttributeDcCurrentDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000203, - MTRClusterElectricalMeasurementAttributeDcPowerMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000204, - MTRClusterElectricalMeasurementAttributeDcPowerDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000205, - MTRClusterElectricalMeasurementAttributeAcFrequencyID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000300, - MTRClusterElectricalMeasurementAttributeAcFrequencyMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000301, - MTRClusterElectricalMeasurementAttributeAcFrequencyMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000302, - MTRClusterElectricalMeasurementAttributeNeutralCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000303, - MTRClusterElectricalMeasurementAttributeTotalActivePowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000304, - MTRClusterElectricalMeasurementAttributeTotalReactivePowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000305, - MTRClusterElectricalMeasurementAttributeTotalApparentPowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000306, - MTRClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000307, - MTRClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000308, - MTRClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000309, - MTRClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030A, - MTRClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030B, - MTRClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030C, - MTRClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030D, - MTRClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030E, - MTRClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000030F, - MTRClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000310, - MTRClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000311, - MTRClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000312, - MTRClusterElectricalMeasurementAttributeAcFrequencyMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000400, - MTRClusterElectricalMeasurementAttributeAcFrequencyDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000401, - MTRClusterElectricalMeasurementAttributePowerMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000402, - MTRClusterElectricalMeasurementAttributePowerDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000403, - MTRClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000404, - MTRClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000405, - MTRClusterElectricalMeasurementAttributeInstantaneousVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000500, - MTRClusterElectricalMeasurementAttributeInstantaneousLineCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000501, - MTRClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000502, - MTRClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000503, - MTRClusterElectricalMeasurementAttributeInstantaneousPowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000504, - MTRClusterElectricalMeasurementAttributeRmsVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000505, - MTRClusterElectricalMeasurementAttributeRmsVoltageMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000506, - MTRClusterElectricalMeasurementAttributeRmsVoltageMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000507, - MTRClusterElectricalMeasurementAttributeRmsCurrentID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000508, - MTRClusterElectricalMeasurementAttributeRmsCurrentMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000509, - MTRClusterElectricalMeasurementAttributeRmsCurrentMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050A, - MTRClusterElectricalMeasurementAttributeActivePowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050B, - MTRClusterElectricalMeasurementAttributeActivePowerMinID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050C, - MTRClusterElectricalMeasurementAttributeActivePowerMaxID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050D, - MTRClusterElectricalMeasurementAttributeReactivePowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050E, - MTRClusterElectricalMeasurementAttributeApparentPowerID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000050F, - MTRClusterElectricalMeasurementAttributePowerFactorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000510, - MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000511, - MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000513, - MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000514, - MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000515, - MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000516, - MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000517, - MTRClusterElectricalMeasurementAttributeAcVoltageMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000600, - MTRClusterElectricalMeasurementAttributeAcVoltageDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000601, - MTRClusterElectricalMeasurementAttributeAcCurrentMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000602, - MTRClusterElectricalMeasurementAttributeAcCurrentDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000603, - MTRClusterElectricalMeasurementAttributeAcPowerMultiplierID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000604, - MTRClusterElectricalMeasurementAttributeAcPowerDivisorID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000605, - MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000700, - MTRClusterElectricalMeasurementAttributeVoltageOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000701, - MTRClusterElectricalMeasurementAttributeCurrentOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000702, - MTRClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000800, - MTRClusterElectricalMeasurementAttributeAcVoltageOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000801, - MTRClusterElectricalMeasurementAttributeAcCurrentOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000802, - MTRClusterElectricalMeasurementAttributeAcActivePowerOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000803, - MTRClusterElectricalMeasurementAttributeAcReactivePowerOverloadID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000804, - MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000805, - MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000806, - MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000807, - MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000808, - MTRClusterElectricalMeasurementAttributeRmsVoltageSagID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000809, - MTRClusterElectricalMeasurementAttributeRmsVoltageSwellID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000080A, - MTRClusterElectricalMeasurementAttributeLineCurrentPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000901, - MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000902, - MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000903, - MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000905, - MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000906, - MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000907, - MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000908, - MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000909, - MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090A, - MTRClusterElectricalMeasurementAttributeActivePowerPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090B, - MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090C, - MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090D, - MTRClusterElectricalMeasurementAttributeReactivePowerPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090E, - MTRClusterElectricalMeasurementAttributeApparentPowerPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x0000090F, - MTRClusterElectricalMeasurementAttributePowerFactorPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000910, - MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000911, - MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000912, - MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000913, - MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000914, - MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000915, - MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000916, - MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000917, - MTRClusterElectricalMeasurementAttributeLineCurrentPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A01, - MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A02, - MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A03, - MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A05, - MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A06, - MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A07, - MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A08, - MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A09, - MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0A, - MTRClusterElectricalMeasurementAttributeActivePowerPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0B, - MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0C, - MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0D, - MTRClusterElectricalMeasurementAttributeReactivePowerPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0E, - MTRClusterElectricalMeasurementAttributeApparentPowerPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A0F, - MTRClusterElectricalMeasurementAttributePowerFactorPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A10, - MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A11, - MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A12, - MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A13, - MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A14, - MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A15, - MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A16, - MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000A17, - MTRClusterElectricalMeasurementAttributeGeneratedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterElectricalMeasurementAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterElectricalMeasurementAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeAttributeListID, - MTRClusterElectricalMeasurementAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterElectricalMeasurementAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = MTRClusterGlobalAttributeClusterRevisionID, - - // Cluster ElectricalMeasurement attributes - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000100, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000101, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000102, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000103, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000104, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000105, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000106, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000107, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000108, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000200, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000201, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000202, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000203, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000204, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000205, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000300, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000301, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000302, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000303, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000304, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000305, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000306, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000307, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000308, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000309, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000030F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000310, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000311, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000312, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000400, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000401, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000402, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000403, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000404, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000405, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000500, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000501, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000502, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000503, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000504, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000505, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000506, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000507, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000508, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000509, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000510, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000511, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000513, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000514, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000515, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000516, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000517, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000600, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000601, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000602, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000603, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000604, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000605, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000700, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000701, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000702, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000800, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000801, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000802, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000803, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000804, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000805, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000806, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000807, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000808, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000809, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000080A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000901, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000902, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000903, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000905, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000906, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000907, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000908, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000909, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000090F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000910, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000911, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000912, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000913, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000914, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000915, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000916, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000917, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A01, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A02, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A03, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A05, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A06, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A07, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A08, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A09, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0A, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0B, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0C, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0D, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0E, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A0F, - MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A10, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A11, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A12, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A13, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A14, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A15, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A16, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000A17, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - - // Cluster TestCluster deprecated attribute names - MTRClusterTestClusterAttributeBooleanID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + // Cluster TestCluster deprecated attribute names + MTRClusterTestClusterAttributeBooleanID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000000, MTRClusterTestClusterAttributeBitmap8ID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -5702,125 +5007,816 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRClusterTestClusterAttributeGeneratedCommandListID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = MTRClusterGlobalAttributeGeneratedCommandListID, - MTRClusterTestClusterAttributeAcceptedCommandListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRClusterTestClusterAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterTestClusterAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterTestClusterAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterTestClusterAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster UnitTesting attributes + MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, + MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, + MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, + MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, + MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, + MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, + MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, + MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, + MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, + MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, + MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000A, + MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000B, + MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000C, + MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000D, + MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000E, + MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F, + MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, + MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000011, + MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, + MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, + MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000014, + MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000015, + MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000016, + MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000017, + MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000018, + MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000019, + MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001A, + MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001B, + MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001C, + MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001D, + MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, + MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001F, + MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000020, + MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000021, + MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000022, + MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000023, + MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000024, + MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000025, + MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, + MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000027, + MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000028, + MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000029, + MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000002A, + MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000002B, + MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000030, + MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000031, + MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000032, + MTRAttributeIDTypeClusterUnitTestingAttributeGlobalEnumID MTR_PROVISIONALLY_AVAILABLE = 0x00000033, + MTRAttributeIDTypeClusterUnitTestingAttributeGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00000034, + MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x000000FF, + MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID MTR_PROVISIONALLY_AVAILABLE = 0x00003000, + MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID MTR_PROVISIONALLY_AVAILABLE = 0x00003001, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004000, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004001, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004002, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004003, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004004, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004005, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004006, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004007, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004008, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004009, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400A, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400B, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400C, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400D, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400E, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400F, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004010, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004011, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004012, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004013, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004014, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004015, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004016, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004017, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004018, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004019, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000401E, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004024, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004025, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004026, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004027, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004028, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004029, + MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000402A, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableGlobalEnumID MTR_PROVISIONALLY_AVAILABLE = 0x00004033, + MTRAttributeIDTypeClusterUnitTestingAttributeNullableGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00004034, + MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterUnitTestingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID MTR_PROVISIONALLY_AVAILABLE = 0xFFF24F01, + + // Cluster SampleMEI attributes + MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterSampleMEIAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterSampleMEIAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterSampleMEIAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterSampleMEIAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster BarrierControl deprecated attribute names + MTRClusterBarrierControlAttributeBarrierMovingStateID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + MTRClusterBarrierControlAttributeBarrierSafetyStatusID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000002, + MTRClusterBarrierControlAttributeBarrierCapabilitiesID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000003, + MTRClusterBarrierControlAttributeBarrierOpenEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000004, + MTRClusterBarrierControlAttributeBarrierCloseEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000005, + MTRClusterBarrierControlAttributeBarrierCommandOpenEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000006, + MTRClusterBarrierControlAttributeBarrierCommandCloseEventsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000007, + MTRClusterBarrierControlAttributeBarrierOpenPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000008, + MTRClusterBarrierControlAttributeBarrierClosePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000009, + MTRClusterBarrierControlAttributeBarrierPositionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000000A, + MTRClusterBarrierControlAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBarrierControlAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBarrierControlAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBarrierControlAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBarrierControlAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster BarrierControl attributes + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID MTR_DEPRECATED("The BarrierMovingState attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID MTR_DEPRECATED("The BarrierSafetyStatus attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000002, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID MTR_DEPRECATED("The BarrierCapabilities attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000003, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID MTR_DEPRECATED("The BarrierOpenEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000004, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID MTR_DEPRECATED("The BarrierCloseEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000005, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID MTR_DEPRECATED("The BarrierCommandOpenEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000006, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID MTR_DEPRECATED("The BarrierCommandCloseEvents attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000007, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID MTR_DEPRECATED("The BarrierOpenPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000008, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID MTR_DEPRECATED("The BarrierClosePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000009, + MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID MTR_DEPRECATED("The BarrierPosition attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000000A, + MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster BinaryInputBasic deprecated attribute names + MTRClusterBinaryInputBasicAttributeActiveTextID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000004, + MTRClusterBinaryInputBasicAttributeDescriptionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000001C, + MTRClusterBinaryInputBasicAttributeInactiveTextID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000002E, + MTRClusterBinaryInputBasicAttributeOutOfServiceID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000051, + MTRClusterBinaryInputBasicAttributePolarityID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000054, + MTRClusterBinaryInputBasicAttributePresentValueID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000055, + MTRClusterBinaryInputBasicAttributeReliabilityID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000067, + MTRClusterBinaryInputBasicAttributeStatusFlagsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000006F, + MTRClusterBinaryInputBasicAttributeApplicationTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000100, + MTRClusterBinaryInputBasicAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterBinaryInputBasicAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterBinaryInputBasicAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterBinaryInputBasicAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterBinaryInputBasicAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + + // Cluster BinaryInputBasic attributes + MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID MTR_DEPRECATED("The ActiveText attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000004, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID MTR_DEPRECATED("The Description attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000001C, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID MTR_DEPRECATED("The InactiveText attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000002E, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID MTR_DEPRECATED("The OutOfService attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000051, + MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID MTR_DEPRECATED("The Polarity attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000054, + MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID MTR_DEPRECATED("The PresentValue attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000055, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID MTR_DEPRECATED("The Reliability attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000067, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID MTR_DEPRECATED("The StatusFlags attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000006F, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID MTR_DEPRECATED("The ApplicationType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000100, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + + // Cluster ElectricalMeasurement deprecated attribute names + MTRClusterElectricalMeasurementAttributeMeasurementTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementAttributeDcVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000100, + MTRClusterElectricalMeasurementAttributeDcVoltageMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000101, + MTRClusterElectricalMeasurementAttributeDcVoltageMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000102, + MTRClusterElectricalMeasurementAttributeDcCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000103, + MTRClusterElectricalMeasurementAttributeDcCurrentMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000104, + MTRClusterElectricalMeasurementAttributeDcCurrentMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000105, + MTRClusterElectricalMeasurementAttributeDcPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000106, + MTRClusterElectricalMeasurementAttributeDcPowerMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000107, + MTRClusterElectricalMeasurementAttributeDcPowerMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000108, + MTRClusterElectricalMeasurementAttributeDcVoltageMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000200, + MTRClusterElectricalMeasurementAttributeDcVoltageDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000201, + MTRClusterElectricalMeasurementAttributeDcCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000202, + MTRClusterElectricalMeasurementAttributeDcCurrentDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000203, + MTRClusterElectricalMeasurementAttributeDcPowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000204, + MTRClusterElectricalMeasurementAttributeDcPowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000205, + MTRClusterElectricalMeasurementAttributeAcFrequencyID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000300, + MTRClusterElectricalMeasurementAttributeAcFrequencyMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000301, + MTRClusterElectricalMeasurementAttributeAcFrequencyMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000302, + MTRClusterElectricalMeasurementAttributeNeutralCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000303, + MTRClusterElectricalMeasurementAttributeTotalActivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000304, + MTRClusterElectricalMeasurementAttributeTotalReactivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000305, + MTRClusterElectricalMeasurementAttributeTotalApparentPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000306, + MTRClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000307, + MTRClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000308, + MTRClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000309, + MTRClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030A, + MTRClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030B, + MTRClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030C, + MTRClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030D, + MTRClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030E, + MTRClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000030F, + MTRClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000310, + MTRClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000311, + MTRClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000312, + MTRClusterElectricalMeasurementAttributeAcFrequencyMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000400, + MTRClusterElectricalMeasurementAttributeAcFrequencyDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000401, + MTRClusterElectricalMeasurementAttributePowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000402, + MTRClusterElectricalMeasurementAttributePowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000403, + MTRClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000404, + MTRClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000405, + MTRClusterElectricalMeasurementAttributeInstantaneousVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000500, + MTRClusterElectricalMeasurementAttributeInstantaneousLineCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000501, + MTRClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000502, + MTRClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000503, + MTRClusterElectricalMeasurementAttributeInstantaneousPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000504, + MTRClusterElectricalMeasurementAttributeRmsVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000505, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000506, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000507, + MTRClusterElectricalMeasurementAttributeRmsCurrentID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000508, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000509, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050A, + MTRClusterElectricalMeasurementAttributeActivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050B, + MTRClusterElectricalMeasurementAttributeActivePowerMinID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050D, + MTRClusterElectricalMeasurementAttributeReactivePowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050E, + MTRClusterElectricalMeasurementAttributeApparentPowerID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000050F, + MTRClusterElectricalMeasurementAttributePowerFactorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000510, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000511, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000513, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000514, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000515, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000516, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000517, + MTRClusterElectricalMeasurementAttributeAcVoltageMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000600, + MTRClusterElectricalMeasurementAttributeAcVoltageDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000601, + MTRClusterElectricalMeasurementAttributeAcCurrentMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000602, + MTRClusterElectricalMeasurementAttributeAcCurrentDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000603, + MTRClusterElectricalMeasurementAttributeAcPowerMultiplierID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000604, + MTRClusterElectricalMeasurementAttributeAcPowerDivisorID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000605, + MTRClusterElectricalMeasurementAttributeOverloadAlarmsMaskID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000700, + MTRClusterElectricalMeasurementAttributeVoltageOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000701, + MTRClusterElectricalMeasurementAttributeCurrentOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000702, + MTRClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000800, + MTRClusterElectricalMeasurementAttributeAcVoltageOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000801, + MTRClusterElectricalMeasurementAttributeAcCurrentOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000802, + MTRClusterElectricalMeasurementAttributeAcActivePowerOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000803, + MTRClusterElectricalMeasurementAttributeAcReactivePowerOverloadID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000804, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000805, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000806, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000807, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000808, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000809, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000080A, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000901, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000902, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000903, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000905, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000906, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000907, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000908, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000909, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x0000090F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000910, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000911, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000912, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000913, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000914, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000915, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000916, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000917, + MTRClusterElectricalMeasurementAttributeLineCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A01, + MTRClusterElectricalMeasurementAttributeActiveCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A02, + MTRClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A03, + MTRClusterElectricalMeasurementAttributeRmsVoltagePhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A05, + MTRClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A06, + MTRClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A07, + MTRClusterElectricalMeasurementAttributeRmsCurrentPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A08, + MTRClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A09, + MTRClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0A, + MTRClusterElectricalMeasurementAttributeActivePowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0B, + MTRClusterElectricalMeasurementAttributeActivePowerMinPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0C, + MTRClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0D, + MTRClusterElectricalMeasurementAttributeReactivePowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0E, + MTRClusterElectricalMeasurementAttributeApparentPowerPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A0F, + MTRClusterElectricalMeasurementAttributePowerFactorPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A10, + MTRClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A11, + MTRClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A12, + MTRClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A13, + MTRClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A14, + MTRClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A15, + MTRClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A16, + MTRClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000A17, + MTRClusterElectricalMeasurementAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterElectricalMeasurementAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = MTRClusterGlobalAttributeAcceptedCommandListID, - MTRClusterTestClusterAttributeAttributeListID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRClusterElectricalMeasurementAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = MTRClusterGlobalAttributeAttributeListID, - MTRClusterTestClusterAttributeFeatureMapID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRClusterElectricalMeasurementAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = MTRClusterGlobalAttributeFeatureMapID, - MTRClusterTestClusterAttributeClusterRevisionID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + MTRClusterElectricalMeasurementAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = MTRClusterGlobalAttributeClusterRevisionID, - // Cluster UnitTesting attributes - MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRAttributeIDTypeClusterUnitTestingAttributeBitmap8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRAttributeIDTypeClusterUnitTestingAttributeBitmap16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, - MTRAttributeIDTypeClusterUnitTestingAttributeBitmap32ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRAttributeIDTypeClusterUnitTestingAttributeBitmap64ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000004, - MTRAttributeIDTypeClusterUnitTestingAttributeInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000005, - MTRAttributeIDTypeClusterUnitTestingAttributeInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, - MTRAttributeIDTypeClusterUnitTestingAttributeInt24uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, - MTRAttributeIDTypeClusterUnitTestingAttributeInt32uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRAttributeIDTypeClusterUnitTestingAttributeInt40uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, - MTRAttributeIDTypeClusterUnitTestingAttributeInt48uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000A, - MTRAttributeIDTypeClusterUnitTestingAttributeInt56uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000B, - MTRAttributeIDTypeClusterUnitTestingAttributeInt64uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000C, - MTRAttributeIDTypeClusterUnitTestingAttributeInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000D, - MTRAttributeIDTypeClusterUnitTestingAttributeInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000E, - MTRAttributeIDTypeClusterUnitTestingAttributeInt24sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F, - MTRAttributeIDTypeClusterUnitTestingAttributeInt32sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, - MTRAttributeIDTypeClusterUnitTestingAttributeInt40sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000011, - MTRAttributeIDTypeClusterUnitTestingAttributeInt48sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, - MTRAttributeIDTypeClusterUnitTestingAttributeInt56sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000013, - MTRAttributeIDTypeClusterUnitTestingAttributeInt64sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000014, - MTRAttributeIDTypeClusterUnitTestingAttributeEnum8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000015, - MTRAttributeIDTypeClusterUnitTestingAttributeEnum16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000016, - MTRAttributeIDTypeClusterUnitTestingAttributeFloatSingleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000017, - MTRAttributeIDTypeClusterUnitTestingAttributeFloatDoubleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000018, - MTRAttributeIDTypeClusterUnitTestingAttributeOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000019, - MTRAttributeIDTypeClusterUnitTestingAttributeListInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001A, - MTRAttributeIDTypeClusterUnitTestingAttributeListOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001B, - MTRAttributeIDTypeClusterUnitTestingAttributeListStructOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001C, - MTRAttributeIDTypeClusterUnitTestingAttributeLongOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001D, - MTRAttributeIDTypeClusterUnitTestingAttributeCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001E, - MTRAttributeIDTypeClusterUnitTestingAttributeLongCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000001F, - MTRAttributeIDTypeClusterUnitTestingAttributeEpochUsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000020, - MTRAttributeIDTypeClusterUnitTestingAttributeEpochSID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000021, - MTRAttributeIDTypeClusterUnitTestingAttributeVendorIdID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000022, - MTRAttributeIDTypeClusterUnitTestingAttributeListNullablesAndOptionalsStructID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000023, - MTRAttributeIDTypeClusterUnitTestingAttributeEnumAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000024, - MTRAttributeIDTypeClusterUnitTestingAttributeStructAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000025, - MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000026, - MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000027, - MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000028, - MTRAttributeIDTypeClusterUnitTestingAttributeRangeRestrictedInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000029, - MTRAttributeIDTypeClusterUnitTestingAttributeListLongOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000002A, - MTRAttributeIDTypeClusterUnitTestingAttributeListFabricScopedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000002B, - MTRAttributeIDTypeClusterUnitTestingAttributeTimedWriteBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000030, - MTRAttributeIDTypeClusterUnitTestingAttributeGeneralErrorBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000031, - MTRAttributeIDTypeClusterUnitTestingAttributeClusterErrorBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000032, - MTRAttributeIDTypeClusterUnitTestingAttributeGlobalEnumID MTR_PROVISIONALLY_AVAILABLE = 0x00000033, - MTRAttributeIDTypeClusterUnitTestingAttributeGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00000034, - MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x000000FF, - MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID MTR_PROVISIONALLY_AVAILABLE = 0x00003000, - MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID MTR_PROVISIONALLY_AVAILABLE = 0x00003001, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004000, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004001, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004002, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap32ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004003, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap64ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004004, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004005, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004006, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004007, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004008, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004009, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400A, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400B, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400C, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400D, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400E, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt24sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000400F, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt32sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004010, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt40sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004011, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt48sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004012, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt56sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004013, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableInt64sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004014, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004015, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnum16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004016, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatSingleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004017, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableFloatDoubleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004018, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableOctetStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004019, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableCharStringID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000401E, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableEnumAttrID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004024, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableStructID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004025, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004026, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt8sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004027, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004028, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableRangeRestrictedInt16sID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004029, - MTRAttributeIDTypeClusterUnitTestingAttributeWriteOnlyInt8uID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000402A, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableGlobalEnumID MTR_PROVISIONALLY_AVAILABLE = 0x00004033, - MTRAttributeIDTypeClusterUnitTestingAttributeNullableGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00004034, - MTRAttributeIDTypeClusterUnitTestingAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterUnitTestingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterUnitTestingAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - MTRAttributeIDTypeClusterUnitTestingAttributeMeiInt8uID MTR_PROVISIONALLY_AVAILABLE = 0xFFF24F01, + // Cluster ElectricalMeasurement attributes + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID MTR_DEPRECATED("The MeasurementType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID MTR_DEPRECATED("The DcVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000100, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID MTR_DEPRECATED("The DcVoltageMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000101, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID MTR_DEPRECATED("The DcVoltageMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000102, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID MTR_DEPRECATED("The DcCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000103, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID MTR_DEPRECATED("The DcCurrentMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000104, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID MTR_DEPRECATED("The DcCurrentMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000105, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID MTR_DEPRECATED("The DcPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000106, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID MTR_DEPRECATED("The DcPowerMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000107, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID MTR_DEPRECATED("The DcPowerMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000108, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID MTR_DEPRECATED("The DcVoltageMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000200, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID MTR_DEPRECATED("The DcVoltageDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000201, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID MTR_DEPRECATED("The DcCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000202, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID MTR_DEPRECATED("The DcCurrentDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000203, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID MTR_DEPRECATED("The DcPowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000204, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID MTR_DEPRECATED("The DcPowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000205, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID MTR_DEPRECATED("The AcFrequency attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000300, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID MTR_DEPRECATED("The AcFrequencyMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000301, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID MTR_DEPRECATED("The AcFrequencyMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000302, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID MTR_DEPRECATED("The NeutralCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000303, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID MTR_DEPRECATED("The TotalActivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000304, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID MTR_DEPRECATED("The TotalReactivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000305, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID MTR_DEPRECATED("The TotalApparentPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000306, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID MTR_DEPRECATED("The Measured1stHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000307, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID MTR_DEPRECATED("The Measured3rdHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000308, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID MTR_DEPRECATED("The Measured5thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000309, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID MTR_DEPRECATED("The Measured7thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID MTR_DEPRECATED("The Measured9thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID MTR_DEPRECATED("The Measured11thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase1stHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase3rdHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase5thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000030F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase7thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000310, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase9thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000311, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID MTR_DEPRECATED("The MeasuredPhase11thHarmonicCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000312, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID MTR_DEPRECATED("The AcFrequencyMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000400, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID MTR_DEPRECATED("The AcFrequencyDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000401, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID MTR_DEPRECATED("The PowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000402, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID MTR_DEPRECATED("The PowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000403, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID MTR_DEPRECATED("The HarmonicCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000404, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID MTR_DEPRECATED("The PhaseHarmonicCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000405, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID MTR_DEPRECATED("The InstantaneousVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000500, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID MTR_DEPRECATED("The InstantaneousLineCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000501, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID MTR_DEPRECATED("The InstantaneousActiveCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000502, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID MTR_DEPRECATED("The InstantaneousReactiveCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000503, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID MTR_DEPRECATED("The InstantaneousPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000504, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID MTR_DEPRECATED("The RmsVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000505, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID MTR_DEPRECATED("The RmsVoltageMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000506, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID MTR_DEPRECATED("The RmsVoltageMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000507, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID MTR_DEPRECATED("The RmsCurrent attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000508, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID MTR_DEPRECATED("The RmsCurrentMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000509, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID MTR_DEPRECATED("The RmsCurrentMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID MTR_DEPRECATED("The ActivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID MTR_DEPRECATED("The ActivePowerMin attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID MTR_DEPRECATED("The ActivePowerMax attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID MTR_DEPRECATED("The ReactivePower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID MTR_DEPRECATED("The ApparentPower attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000050F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID MTR_DEPRECATED("The PowerFactor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000510, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000511, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID MTR_DEPRECATED("The AverageRmsUnderVoltageCounter attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000513, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000514, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000515, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID MTR_DEPRECATED("The RmsVoltageSagPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000516, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID MTR_DEPRECATED("The RmsVoltageSwellPeriod attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000517, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID MTR_DEPRECATED("The AcVoltageMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000600, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID MTR_DEPRECATED("The AcVoltageDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000601, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID MTR_DEPRECATED("The AcCurrentMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000602, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID MTR_DEPRECATED("The AcCurrentDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000603, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID MTR_DEPRECATED("The AcPowerMultiplier attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000604, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID MTR_DEPRECATED("The AcPowerDivisor attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000605, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID MTR_DEPRECATED("The OverloadAlarmsMask attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000700, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID MTR_DEPRECATED("The VoltageOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000701, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID MTR_DEPRECATED("The CurrentOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000702, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID MTR_DEPRECATED("The AcOverloadAlarmsMask attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000800, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID MTR_DEPRECATED("The AcVoltageOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000801, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID MTR_DEPRECATED("The AcCurrentOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000802, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID MTR_DEPRECATED("The AcActivePowerOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000803, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID MTR_DEPRECATED("The AcReactivePowerOverload attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000804, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID MTR_DEPRECATED("The AverageRmsOverVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000805, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID MTR_DEPRECATED("The AverageRmsUnderVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000806, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID MTR_DEPRECATED("The RmsExtremeOverVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000807, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID MTR_DEPRECATED("The RmsExtremeUnderVoltage attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000808, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID MTR_DEPRECATED("The RmsVoltageSag attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000809, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID MTR_DEPRECATED("The RmsVoltageSwell attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000080A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID MTR_DEPRECATED("The LineCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000901, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID MTR_DEPRECATED("The ActiveCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000902, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID MTR_DEPRECATED("The ReactiveCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000903, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID MTR_DEPRECATED("The RmsVoltagePhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000905, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID MTR_DEPRECATED("The RmsVoltageMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000906, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID MTR_DEPRECATED("The RmsVoltageMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000907, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID MTR_DEPRECATED("The RmsCurrentPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000908, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID MTR_DEPRECATED("The RmsCurrentMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000909, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID MTR_DEPRECATED("The RmsCurrentMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID MTR_DEPRECATED("The ActivePowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID MTR_DEPRECATED("The ActivePowerMinPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID MTR_DEPRECATED("The ActivePowerMaxPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID MTR_DEPRECATED("The ReactivePowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID MTR_DEPRECATED("The ApparentPowerPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x0000090F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID MTR_DEPRECATED("The PowerFactorPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000910, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000911, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID MTR_DEPRECATED("The AverageRmsOverVoltageCounterPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000912, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID MTR_DEPRECATED("The AverageRmsUnderVoltageCounterPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000913, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000914, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000915, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID MTR_DEPRECATED("The RmsVoltageSagPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000916, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID MTR_DEPRECATED("The RmsVoltageSwellPeriodPhaseB attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000917, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID MTR_DEPRECATED("The LineCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A01, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID MTR_DEPRECATED("The ActiveCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A02, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID MTR_DEPRECATED("The ReactiveCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A03, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID MTR_DEPRECATED("The RmsVoltagePhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A05, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID MTR_DEPRECATED("The RmsVoltageMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A06, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID MTR_DEPRECATED("The RmsVoltageMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A07, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID MTR_DEPRECATED("The RmsCurrentPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A08, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID MTR_DEPRECATED("The RmsCurrentMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A09, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID MTR_DEPRECATED("The RmsCurrentMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0A, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID MTR_DEPRECATED("The ActivePowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0B, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID MTR_DEPRECATED("The ActivePowerMinPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0C, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID MTR_DEPRECATED("The ActivePowerMaxPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0D, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID MTR_DEPRECATED("The ReactivePowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0E, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID MTR_DEPRECATED("The ApparentPowerPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A0F, + MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID MTR_DEPRECATED("The PowerFactorPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A10, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID MTR_DEPRECATED("The AverageRmsVoltageMeasurementPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A11, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID MTR_DEPRECATED("The AverageRmsOverVoltageCounterPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A12, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID MTR_DEPRECATED("The AverageRmsUnderVoltageCounterPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A13, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID MTR_DEPRECATED("The RmsExtremeOverVoltagePeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A14, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID MTR_DEPRECATED("The RmsExtremeUnderVoltagePeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A15, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID MTR_DEPRECATED("The RmsVoltageSagPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A16, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID MTR_DEPRECATED("The RmsVoltageSwellPeriodPhaseC attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000A17, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster SampleMEI attributes - MTRAttributeIDTypeClusterSampleMEIAttributeFlipFlopID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterSampleMEIAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterSampleMEIAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterSampleMEIAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterSampleMEIAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterSampleMEIAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterSampleMEIAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster OnOffSwitchConfiguration deprecated attribute names + MTRClusterOnOffSwitchConfigurationAttributeSwitchTypeID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterOnOffSwitchConfigurationAttributeSwitchActionsID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000010, + MTRClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeGeneratedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAcceptedCommandListID, + MTRClusterOnOffSwitchConfigurationAttributeAttributeListID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeAttributeListID, + MTRClusterOnOffSwitchConfigurationAttributeFeatureMapID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeFeatureMapID, + MTRClusterOnOffSwitchConfigurationAttributeClusterRevisionID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = MTRClusterGlobalAttributeClusterRevisionID, + // Cluster OnOffSwitchConfiguration attributes + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID MTR_DEPRECATED("The SwitchType attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID MTR_DEPRECATED("The SwitchActions attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000010, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID MTR_DEPRECATED("The GeneratedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID MTR_DEPRECATED("The AcceptedCommandList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID MTR_DEPRECATED("The AttributeList attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID MTR_DEPRECATED("The FeatureMap attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID MTR_DEPRECATED("The ClusterRevision attribute will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, }; #pragma mark - Commands IDs @@ -6583,18 +6579,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltValueID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRCommandIDTypeClusterWindowCoveringCommandGoToTiltPercentageID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - // Cluster BarrierControl deprecated command id names - MTRClusterBarrierControlCommandBarrierControlGoToPercentID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterBarrierControlCommandBarrierControlStopID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - - // Cluster BarrierControl commands - MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - // Cluster ServiceArea commands MTRCommandIDTypeClusterServiceAreaCommandSelectAreasID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRCommandIDTypeClusterServiceAreaCommandSelectAreasResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, @@ -6952,26 +6936,6 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterCommissionerControlCommandCommissionNodeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterCommissionerControlCommandReverseOpenCommissioningWindowID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - // Cluster ElectricalMeasurement deprecated command id names - MTRClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterElectricalMeasurementCommandGetProfileInfoCommandID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000000, - MTRClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - MTRClusterElectricalMeasurementCommandGetMeasurementProfileCommandID - MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000001, - - // Cluster ElectricalMeasurement commands - MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - // Cluster TestCluster deprecated command id names MTRClusterTestClusterCommandTestID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterUnitTestingCommandTestID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -7126,6 +7090,37 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterSampleMEICommandAddArgumentsResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterSampleMEICommandAddArgumentsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + // Cluster BarrierControl deprecated command id names + MTRClusterBarrierControlCommandBarrierControlGoToPercentID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterBarrierControlCommandBarrierControlStopID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + + // Cluster BarrierControl commands + MTRCommandIDTypeClusterBarrierControlCommandBarrierControlGoToPercentID MTR_DEPRECATED("The BarrierControlGoToPercent command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID MTR_DEPRECATED("The BarrierControlStop command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + + // Cluster ElectricalMeasurement deprecated command id names + MTRClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementCommandGetProfileInfoCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000000, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + MTRClusterElectricalMeasurementCommandGetMeasurementProfileCommandID + MTR_DEPRECATED("Please use MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000001, + + // Cluster ElectricalMeasurement commands + MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoResponseCommandID MTR_DEPRECATED("The GetProfileInfoResponseCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetProfileInfoCommandID MTR_DEPRECATED("The GetProfileInfoCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000000, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileResponseCommandID MTR_DEPRECATED("The GetMeasurementProfileResponseCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, + MTRCommandIDTypeClusterElectricalMeasurementCommandGetMeasurementProfileCommandID MTR_DEPRECATED("The GetMeasurementProfileCommand command will be removed", ios(16.4, 18.2), macos(13.3, 15.2), watchos(9.4, 11.2), tvos(16.4, 18.2)) = 0x00000001, }; #pragma mark - Events IDs diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index f5beab931c57fa..59b10037b32a43 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -36,15 +36,9 @@ case MTRClusterIDTypeOnOffID: result = @"OnOff"; break; - case MTRClusterIDTypeOnOffSwitchConfigurationID: - result = @"OnOffSwitchConfiguration"; - break; case MTRClusterIDTypeLevelControlID: result = @"LevelControl"; break; - case MTRClusterIDTypeBinaryInputBasicID: - result = @"BinaryInputBasic"; - break; case MTRClusterIDTypePulseWidthModulationID: result = @"PulseWidthModulation"; break; @@ -255,9 +249,6 @@ case MTRClusterIDTypeWindowCoveringID: result = @"WindowCovering"; break; - case MTRClusterIDTypeBarrierControlID: - result = @"BarrierControl"; - break; case MTRClusterIDTypeServiceAreaID: result = @"ServiceArea"; break; @@ -384,9 +375,6 @@ case MTRClusterIDTypeCommissionerControlID: result = @"CommissionerControl"; break; - case MTRClusterIDTypeElectricalMeasurementID: - result = @"ElectricalMeasurement"; - break; case MTRClusterIDTypeUnitTestingID: result = @"UnitTesting"; break; @@ -547,49 +535,6 @@ } break; - case MTRClusterIDTypeOnOffSwitchConfigurationID: - - switch (attributeID) { - - // Cluster OnOffSwitchConfiguration attributes - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID: - result = @"SwitchType"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID: - result = @"SwitchActions"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID: - result = @"GeneratedCommandList"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID: - result = @"AcceptedCommandList"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID: - result = @"EventList"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID: - result = @"AttributeList"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID: - result = @"FeatureMap"; - break; - - case MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID: - result = @"ClusterRevision"; - break; - - default: - result = [NSString stringWithFormat:@"", attributeID]; - break; - } - break; - case MTRClusterIDTypeLevelControlID: switch (attributeID) { @@ -681,77 +626,6 @@ } break; - case MTRClusterIDTypeBinaryInputBasicID: - - switch (attributeID) { - - // Cluster BinaryInputBasic attributes - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID: - result = @"ActiveText"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID: - result = @"Description"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID: - result = @"InactiveText"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID: - result = @"OutOfService"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID: - result = @"Polarity"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID: - result = @"PresentValue"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID: - result = @"Reliability"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID: - result = @"StatusFlags"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID: - result = @"ApplicationType"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID: - result = @"GeneratedCommandList"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID: - result = @"AcceptedCommandList"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID: - result = @"EventList"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID: - result = @"AttributeList"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID: - result = @"FeatureMap"; - break; - - case MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID: - result = @"ClusterRevision"; - break; - - default: - result = [NSString stringWithFormat:@"", attributeID]; - break; - } - break; - case MTRClusterIDTypePulseWidthModulationID: switch (attributeID) { @@ -5370,81 +5244,6 @@ } break; - case MTRClusterIDTypeBarrierControlID: - - switch (attributeID) { - - // Cluster BarrierControl attributes - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID: - result = @"BarrierMovingState"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID: - result = @"BarrierSafetyStatus"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID: - result = @"BarrierCapabilities"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID: - result = @"BarrierOpenEvents"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID: - result = @"BarrierCloseEvents"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID: - result = @"BarrierCommandOpenEvents"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID: - result = @"BarrierCommandCloseEvents"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID: - result = @"BarrierOpenPeriod"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID: - result = @"BarrierClosePeriod"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID: - result = @"BarrierPosition"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID: - result = @"GeneratedCommandList"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID: - result = @"AcceptedCommandList"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeEventListID: - result = @"EventList"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID: - result = @"AttributeList"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID: - result = @"FeatureMap"; - break; - - case MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID: - result = @"ClusterRevision"; - break; - - default: - result = [NSString stringWithFormat:@"", attributeID]; - break; - } - break; - case MTRClusterIDTypeServiceAreaID: switch (attributeID) { @@ -8419,553 +8218,6 @@ } break; - case MTRClusterIDTypeElectricalMeasurementID: - - switch (attributeID) { - - // Cluster ElectricalMeasurement attributes - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID: - result = @"MeasurementType"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID: - result = @"DcVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID: - result = @"DcVoltageMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID: - result = @"DcVoltageMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID: - result = @"DcCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID: - result = @"DcCurrentMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID: - result = @"DcCurrentMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID: - result = @"DcPower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID: - result = @"DcPowerMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID: - result = @"DcPowerMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID: - result = @"DcVoltageMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID: - result = @"DcVoltageDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID: - result = @"DcCurrentMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID: - result = @"DcCurrentDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID: - result = @"DcPowerMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID: - result = @"DcPowerDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID: - result = @"AcFrequency"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID: - result = @"AcFrequencyMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID: - result = @"AcFrequencyMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID: - result = @"NeutralCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID: - result = @"TotalActivePower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID: - result = @"TotalReactivePower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID: - result = @"TotalApparentPower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID: - result = @"Measured1stHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID: - result = @"Measured3rdHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID: - result = @"Measured5thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID: - result = @"Measured7thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID: - result = @"Measured9thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID: - result = @"Measured11thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID: - result = @"MeasuredPhase1stHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID: - result = @"MeasuredPhase3rdHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID: - result = @"MeasuredPhase5thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID: - result = @"MeasuredPhase7thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID: - result = @"MeasuredPhase9thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID: - result = @"MeasuredPhase11thHarmonicCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID: - result = @"AcFrequencyMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID: - result = @"AcFrequencyDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID: - result = @"PowerMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID: - result = @"PowerDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID: - result = @"HarmonicCurrentMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID: - result = @"PhaseHarmonicCurrentMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID: - result = @"InstantaneousVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID: - result = @"InstantaneousLineCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID: - result = @"InstantaneousActiveCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID: - result = @"InstantaneousReactiveCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID: - result = @"InstantaneousPower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID: - result = @"RmsVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID: - result = @"RmsVoltageMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID: - result = @"RmsVoltageMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID: - result = @"RmsCurrent"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID: - result = @"RmsCurrentMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID: - result = @"RmsCurrentMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID: - result = @"ActivePower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID: - result = @"ActivePowerMin"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID: - result = @"ActivePowerMax"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID: - result = @"ReactivePower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID: - result = @"ApparentPower"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID: - result = @"PowerFactor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID: - result = @"AverageRmsVoltageMeasurementPeriod"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID: - result = @"AverageRmsUnderVoltageCounter"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID: - result = @"RmsExtremeOverVoltagePeriod"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID: - result = @"RmsExtremeUnderVoltagePeriod"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID: - result = @"RmsVoltageSagPeriod"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID: - result = @"RmsVoltageSwellPeriod"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID: - result = @"AcVoltageMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID: - result = @"AcVoltageDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID: - result = @"AcCurrentMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID: - result = @"AcCurrentDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID: - result = @"AcPowerMultiplier"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID: - result = @"AcPowerDivisor"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID: - result = @"OverloadAlarmsMask"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID: - result = @"VoltageOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID: - result = @"CurrentOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID: - result = @"AcOverloadAlarmsMask"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID: - result = @"AcVoltageOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID: - result = @"AcCurrentOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID: - result = @"AcActivePowerOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID: - result = @"AcReactivePowerOverload"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID: - result = @"AverageRmsOverVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID: - result = @"AverageRmsUnderVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID: - result = @"RmsExtremeOverVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID: - result = @"RmsExtremeUnderVoltage"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID: - result = @"RmsVoltageSag"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID: - result = @"RmsVoltageSwell"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID: - result = @"LineCurrentPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID: - result = @"ActiveCurrentPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID: - result = @"ReactiveCurrentPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID: - result = @"RmsVoltagePhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID: - result = @"RmsVoltageMinPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID: - result = @"RmsVoltageMaxPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID: - result = @"RmsCurrentPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID: - result = @"RmsCurrentMinPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID: - result = @"RmsCurrentMaxPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID: - result = @"ActivePowerPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID: - result = @"ActivePowerMinPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID: - result = @"ActivePowerMaxPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID: - result = @"ReactivePowerPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID: - result = @"ApparentPowerPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID: - result = @"PowerFactorPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID: - result = @"AverageRmsVoltageMeasurementPeriodPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID: - result = @"AverageRmsOverVoltageCounterPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID: - result = @"AverageRmsUnderVoltageCounterPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID: - result = @"RmsExtremeOverVoltagePeriodPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID: - result = @"RmsExtremeUnderVoltagePeriodPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID: - result = @"RmsVoltageSagPeriodPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID: - result = @"RmsVoltageSwellPeriodPhaseB"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID: - result = @"LineCurrentPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID: - result = @"ActiveCurrentPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID: - result = @"ReactiveCurrentPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID: - result = @"RmsVoltagePhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID: - result = @"RmsVoltageMinPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID: - result = @"RmsVoltageMaxPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID: - result = @"RmsCurrentPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID: - result = @"RmsCurrentMinPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID: - result = @"RmsCurrentMaxPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID: - result = @"ActivePowerPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID: - result = @"ActivePowerMinPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID: - result = @"ActivePowerMaxPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID: - result = @"ReactivePowerPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID: - result = @"ApparentPowerPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID: - result = @"PowerFactorPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID: - result = @"AverageRmsVoltageMeasurementPeriodPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID: - result = @"AverageRmsOverVoltageCounterPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID: - result = @"AverageRmsUnderVoltageCounterPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID: - result = @"RmsExtremeOverVoltagePeriodPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID: - result = @"RmsExtremeUnderVoltagePeriodPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID: - result = @"RmsVoltageSagPeriodPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID: - result = @"RmsVoltageSwellPeriodPhaseC"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID: - result = @"GeneratedCommandList"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID: - result = @"AcceptedCommandList"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID: - result = @"EventList"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID: - result = @"AttributeList"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID: - result = @"FeatureMap"; - break; - - case MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID: - result = @"ClusterRevision"; - break; - - default: - result = [NSString stringWithFormat:@"", attributeID]; - break; - } - break; - case MTRClusterIDTypeUnitTestingID: switch (attributeID) { @@ -9442,16 +8694,6 @@ } break; - case MTRClusterIDTypeOnOffSwitchConfigurationID: - - switch (eventID) { - - default: - result = [NSString stringWithFormat:@"", eventID]; - break; - } - break; - case MTRClusterIDTypeLevelControlID: switch (eventID) { @@ -9462,16 +8704,6 @@ } break; - case MTRClusterIDTypeBinaryInputBasicID: - - switch (eventID) { - - default: - result = [NSString stringWithFormat:@"", eventID]; - break; - } - break; - case MTRClusterIDTypePulseWidthModulationID: switch (eventID) { @@ -10561,16 +9793,6 @@ } break; - case MTRClusterIDTypeBarrierControlID: - - switch (eventID) { - - default: - result = [NSString stringWithFormat:@"", eventID]; - break; - } - break; - case MTRClusterIDTypeServiceAreaID: switch (eventID) { @@ -11090,16 +10312,6 @@ } break; - case MTRClusterIDTypeElectricalMeasurementID: - - switch (eventID) { - - default: - result = [NSString stringWithFormat:@"", eventID]; - break; - } - break; - case MTRClusterIDTypeUnitTestingID: switch (eventID) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index e2197784a01237..3a761fa7054192 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -182,48 +182,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster On/off Switch Configuration - * Attributes and commands for configuring On/Off switching devices. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRClusterOnOffSwitchConfiguration : MTRGenericCluster - -- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRClusterOnOffSwitchConfiguration (Availability) - -/** - * The queue is currently unused, but may be used in the future for calling completions - * for command invocations if commands are added to this cluster. - */ -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Level Control * Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' @@ -312,72 +270,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Binary Input (Basic) - * An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRClusterBinaryInputBasic : MTRGenericCluster - -- (NSDictionary * _Nullable)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRClusterBinaryInputBasic (Availability) - -/** - * The queue is currently unused, but may be used in the future for calling completions - * for command invocations if commands are added to this cluster. - */ -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Pulse Width Modulation * Cluster to control pulse width modulation @@ -4430,79 +4322,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Barrier Control - * This cluster provides control of a barrier (garage door). - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRClusterBarrierControl : MTRGenericCluster - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRClusterBarrierControl (Availability) - -/** - * For all instance methods that take a completion (i.e. command invocations), - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Service Area * The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. @@ -7086,319 +6905,6 @@ MTR_PROVISIONALLY_AVAILABLE @end -/** - * Cluster Electrical Measurement - * Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. - */ -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRClusterElectricalMeasurement : MTRGenericCluster - -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -- (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - -@interface MTRClusterElectricalMeasurement (Availability) - -/** - * For all instance methods that take a completion (i.e. command invocations), - * the completion will be called on the provided queue. - */ -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - -@end - /** * Cluster Unit Testing * The Test Cluster is meant to validate the generated code @@ -7945,14 +7451,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use onWithTimedOffWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -@interface MTRClusterOnOffSwitchConfiguration (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - @interface MTRClusterLevelControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device @@ -7970,14 +7468,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use moveToClosestFrequencyWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -@interface MTRClusterBinaryInputBasic (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -@end - @interface MTRClusterDescriptor (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device @@ -8321,17 +7811,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentageParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use goToTiltPercentageWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -@interface MTRClusterBarrierControl (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlGoToPercentWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlStopWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use barrierControlStopWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - @interface MTRClusterPumpConfigurationAndControl (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device @@ -8603,17 +8082,6 @@ MTR_DEPRECATED("Please use MTRClusterUnitTesting", ios(16.1, 16.4), macos(13.0, - (void)logoutWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use logoutWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); @end -@interface MTRClusterElectricalMeasurement (Deprecated) - -- (nullable instancetype)initWithDevice:(MTRDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue MTR_DEPRECATED("Please use initWithDevice:endpoindID:queue:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getProfileInfoCommandWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getProfileInfoCommandWithExpectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use getMeasurementProfileCommandWithParams:expectedValues:expectedValueInterval:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -@end - @interface MTRClusterTestCluster (Deprecated) - (nullable instancetype)initWithDevice:(MTRDevice *)device diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 26d1ec95ecf1f6..fb882995a229e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -754,70 +754,6 @@ - (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params e } @end -@implementation MTRClusterOnOffSwitchConfiguration - -- (NSDictionary * _Nullable)readAttributeSwitchTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchTypeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSwitchActionsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) params:params]; -} - -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSwitchActionsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeSwitchActionsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterOnOffSwitchConfiguration (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - @implementation MTRClusterLevelControl - (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -1296,160 +1232,6 @@ - (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFre } @end -@implementation MTRClusterBinaryInputBasic - -- (NSDictionary * _Nullable)readAttributeActiveTextWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) params:params]; -} - -- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeActiveTextWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeActiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeActiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeDescriptionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) params:params]; -} - -- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeDescriptionWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeDescriptionWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeDescriptionID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeInactiveTextWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) params:params]; -} - -- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeInactiveTextWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeInactiveTextWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeInactiveTextID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeOutOfServiceWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) params:params]; -} - -- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOutOfServiceWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOutOfServiceWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeOutOfServiceID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributePolarityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePolarityID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePresentValueWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) params:params]; -} - -- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributePresentValueWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributePresentValueWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributePresentValueID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeReliabilityWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) params:params]; -} - -- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeReliabilityWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeReliabilityID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeStatusFlagsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeStatusFlagsID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeApplicationTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeApplicationTypeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBinaryInputBasicID) attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterBinaryInputBasic (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - @implementation MTRClusterPulseWidthModulation - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params @@ -12604,22 +12386,22 @@ - (void)goToTiltPercentageWithParams:(MTRWindowCoveringClusterGoToTiltPercentage } @end -@implementation MTRClusterBarrierControl +@implementation MTRClusterServiceArea -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams + params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; + using RequestType = ServiceArea::Commands::SelectAreas::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -12628,29 +12410,25 @@ - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierCont expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlStopParams + params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = BarrierControl::Commands::BarrierControlStop::Type; + using RequestType = ServiceArea::Commands::SkipArea::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -12659,380 +12437,153 @@ - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStop expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedAreasWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierMovingStateID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierSafetyStatusWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedMapsWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierSafetyStatusID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierCapabilitiesWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedAreasWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCapabilitiesID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSelectedAreasID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierOpenEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentAreaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeCurrentAreaID) params:params]; } -- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeEstimatedEndTimeWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeEstimatedEndTimeID) params:params]; } -- (void)writeAttributeBarrierOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeProgressWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeProgressID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierCloseEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeGeneratedCommandListID) params:params]; } -- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierCloseEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAcceptedCommandListID) params:params]; } -- (void)writeAttributeBarrierCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeEventListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierCommandOpenEventsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAttributeListID) params:params]; } -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierCommandOpenEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeFeatureMapID) params:params]; } -- (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandOpenEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeClusterRevisionID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierCommandCloseEventsWithParams:(MTRReadParams * _Nullable)params +@end + +@implementation MTRClusterPumpConfigurationAndControl + +- (NSDictionary * _Nullable)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; } -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierCommandCloseEventsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; } -- (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierCommandCloseEventsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierOpenPeriodWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; } -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierOpenPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; } -- (void)writeAttributeBarrierOpenPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierOpenPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierClosePeriodWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; } -- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +- (NSDictionary * _Nullable)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params { - [self writeAttributeBarrierClosePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; } -- (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierClosePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +- (NSDictionary * _Nullable)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; } -- (NSDictionary * _Nullable)readAttributeBarrierPositionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeBarrierPositionID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; } -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeGeneratedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; } -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; } -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeBarrierControlID) attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterBarrierControl (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlGoToPercentWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self barrierControlStopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -@end - -@implementation MTRClusterServiceArea - -- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRServiceAreaClusterSelectAreasParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ServiceArea::Commands::SelectAreas::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRServiceAreaClusterSkipAreaParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ServiceArea::Commands::SkipArea::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedAreasWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSupportedMapsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSelectedAreasWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSelectedAreasID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentAreaWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeCurrentAreaID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEstimatedEndTimeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeEstimatedEndTimeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeProgressWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeProgressID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterPumpConfigurationAndControl - -- (NSDictionary * _Nullable)readAttributeMaxPressureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxPressureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxSpeedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxSpeedID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxFlowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxFlowID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinConstPressureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstPressureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxConstPressureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstPressureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinCompPressureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinCompPressureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxCompPressureWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxCompPressureID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinConstSpeedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstSpeedID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxConstSpeedWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstSpeedID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinConstFlowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstFlowID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxConstFlowWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstFlowID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMinConstTempWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMinConstTempID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMaxConstTempWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeMaxConstTempID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePumpStatusWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributePumpStatusID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEffectiveOperationModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveOperationModeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEffectiveControlModeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEffectiveControlModeID) params:params]; } - (NSDictionary * _Nullable)readAttributeCapacityWithParams:(MTRReadParams * _Nullable)params @@ -20135,849 +19686,6 @@ - (void)commissionNodeWithParams:(MTRCommissionerControlClusterCommissionNodePar @end -@implementation MTRClusterElectricalMeasurement - -- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasurementTypeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcVoltageMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcVoltageMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcCurrentMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcCurrentMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcPowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcPowerMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcPowerMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcVoltageDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcCurrentDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeDcPowerDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeDcPowerDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcFrequencyWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeNeutralCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeNeutralCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTotalActivePowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalActivePowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTotalReactivePowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalReactivePowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeTotalApparentPowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeTotalApparentPowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured1stHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured3rdHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured5thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured7thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured9thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasured11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasured11thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase1stHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase3rdHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase5thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase7thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase9thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeMeasuredPhase11thHarmonicCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcFrequencyMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcFrequencyDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcFrequencyDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePowerMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePowerDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeHarmonicCurrentMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePhaseHarmonicCurrentMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeInstantaneousVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeInstantaneousLineCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousLineCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeInstantaneousActiveCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousActiveCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeInstantaneousReactiveCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousReactiveCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeInstantaneousPowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeInstantaneousPowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMinWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeReactivePowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeApparentPowerWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePowerFactorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) params:params]; -} - -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) params:params]; -} - -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeAverageRmsUnderVoltageCounterWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) params:params]; -} - -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeRmsExtremeOverVoltagePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) params:params]; -} - -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeRmsExtremeUnderVoltagePeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) params:params]; -} - -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeRmsVoltageSagPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) params:params]; -} - -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeRmsVoltageSwellPeriodWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeAcVoltageMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcVoltageDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcCurrentMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcCurrentDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcPowerMultiplierWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerMultiplierID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcPowerDivisorWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcPowerDivisorID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) params:params]; -} - -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeOverloadAlarmsMaskWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeVoltageOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeVoltageOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeCurrentOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcOverloadAlarmsMaskWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) params:params]; -} - -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeAcOverloadAlarmsMaskWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcOverloadAlarmsMaskID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary * _Nullable)readAttributeAcVoltageOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcVoltageOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcCurrentOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcCurrentOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcActivePowerOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcActivePowerOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcReactivePowerOverloadWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcReactivePowerOverloadID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltageWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltageID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePowerFactorPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseBID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeLineCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeLineCurrentPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActiveCurrentPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeReactiveCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactiveCurrentPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltagePhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltagePhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMinPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMinPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageMaxPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageMaxPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMinPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMinPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsCurrentMaxPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsCurrentMaxPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMinPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMinPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeActivePowerMaxPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeActivePowerMaxPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeReactivePowerPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeReactivePowerPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeApparentPowerPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeApparentPowerPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributePowerFactorPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributePowerFactorPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsVoltageMeasurementPeriodPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsOverVoltageCounterPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAverageRmsUnderVoltageCounterPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeOverVoltagePeriodPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsExtremeUnderVoltagePeriodPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSagPeriodPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeRmsVoltageSwellPeriodPhaseCID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeElectricalMeasurementID) attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterElectricalMeasurement (Deprecated) - -- (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -- (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self getProfileInfoCommandWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self getProfileInfoCommandWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completionHandler:completionHandler]; -} -- (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self getMeasurementProfileCommandWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -@end - @implementation MTRClusterUnitTesting - (void)testWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 05bcb8213b6df9..48e7175fa2c58b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7570,64 +7570,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBarrierControlClusterBarrierControlGoToPercentParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull percentOpen MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRBarrierControlClusterBarrierControlStopParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRServiceAreaClusterSelectAreasParams : NSObject @@ -10986,152 +10928,6 @@ MTR_PROVISIONALLY_AVAILABLE error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; @end -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull profileCount MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull maxNumberOfIntervals MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSArray * _Nonnull listOfAttributes MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -/** - * Initialize an MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull status MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull profileIntervalPeriod MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervalsDelivered MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull attributeId MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSArray * _Nonnull intervals MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs MTR_DEPRECATED("Timed invoke does not make sense for server to client commands", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - -/** - * Initialize an MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -@end - -MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull attributeId MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - -@property (nonatomic, copy) NSNumber * _Nonnull numberOfIntervals MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterTestParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 87aacfd377eb82..ce78c58b074d32 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -21613,158 +21613,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams -- (instancetype)init -{ - if (self = [super init]) { - - _percentOpen = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; - - other.percentOpen = self.percentOpen; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; - return descriptionString; -} - -@end - -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRBarrierControlClusterBarrierControlStopParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRServiceAreaClusterSelectAreasParams - (instancetype)init { @@ -31763,408 +31611,6 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Commissi @end -@implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams -- (instancetype)init -{ - if (self = [super init]) { - - _profileCount = @(0); - - _profileIntervalPeriod = @(0); - - _maxNumberOfIntervals = @(0); - - _listOfAttributes = [NSArray array]; - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams alloc] init]; - - other.profileCount = self.profileCount; - other.profileIntervalPeriod = self.profileIntervalPeriod; - other.maxNumberOfIntervals = self.maxNumberOfIntervals; - other.listOfAttributes = self.listOfAttributes; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: profileCount:%@; profileIntervalPeriod:%@; maxNumberOfIntervals:%@; listOfAttributes:%@; >", NSStringFromClass([self class]), _profileCount, _profileIntervalPeriod, _maxNumberOfIntervals, _listOfAttributes]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct -{ - { - self.profileCount = [NSNumber numberWithUnsignedChar:decodableStruct.profileCount]; - } - { - self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; - } - { - self.maxNumberOfIntervals = [NSNumber numberWithUnsignedChar:decodableStruct.maxNumberOfIntervals]; - } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.listOfAttributes.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.listOfAttributes = array_0; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - -@implementation MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams -- (instancetype)init -{ - if (self = [super init]) { - - _startTime = @(0); - - _status = @(0); - - _profileIntervalPeriod = @(0); - - _numberOfIntervalsDelivered = @(0); - - _attributeId = @(0); - - _intervals = [NSArray array]; - _timedInvokeTimeoutMs = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams alloc] init]; - - other.startTime = self.startTime; - other.status = self.status; - other.profileIntervalPeriod = self.profileIntervalPeriod; - other.numberOfIntervalsDelivered = self.numberOfIntervalsDelivered; - other.attributeId = self.attributeId; - other.intervals = self.intervals; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: startTime:%@; status:%@; profileIntervalPeriod:%@; numberOfIntervalsDelivered:%@; attributeId:%@; intervals:%@; >", NSStringFromClass([self class]), _startTime, _status, _profileIntervalPeriod, _numberOfIntervalsDelivered, _attributeId, _intervals]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct -{ - { - self.startTime = [NSNumber numberWithUnsignedInt:decodableStruct.startTime]; - } - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; - } - { - self.numberOfIntervalsDelivered = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfIntervalsDelivered]; - } - { - self.attributeId = [NSNumber numberWithUnsignedShort:decodableStruct.attributeId]; - } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.intervals.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.intervals = array_0; - } - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams -- (instancetype)init -{ - if (self = [super init]) { - - _attributeId = @(0); - - _startTime = @(0); - - _numberOfIntervals = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; - - other.attributeId = self.attributeId; - other.startTime = self.startTime; - other.numberOfIntervals = self.numberOfIntervals; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; startTime:%@; numberOfIntervals:%@; >", NSStringFromClass([self class]), _attributeId, _startTime, _numberOfIntervals]; - return descriptionString; -} - -@end - -@implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.attributeId = self.attributeId.unsignedShortValue; - } - { - encodableStruct.startTime = self.startTime.unsignedIntValue; - } - { - encodableStruct.numberOfIntervals = self.numberOfIntervals.unsignedCharValue; - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRUnitTestingClusterTestParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 91e4e865355198..1d5bc86099c258 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1420,18 +1420,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRServiceAreaClusterSelectAreasParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -2062,30 +2050,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct; - -@end - -@interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - -@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct; - -@end - -@interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRUnitTestingClusterTestParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -2367,4 +2331,4 @@ NS_ASSUME_NONNULL_BEGIN - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm index 6dc2c38f8447ef..3724ec038ef00c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm @@ -50,15 +50,6 @@ static BOOL CommandNeedsTimedInvokeInOnOffCluster(AttributeId aAttributeId) } } } -static BOOL CommandNeedsTimedInvokeInOnOffSwitchConfigurationCluster(AttributeId aAttributeId) -{ - using namespace Clusters::OnOffSwitchConfiguration; - switch (aAttributeId) { - default: { - return NO; - } - } -} static BOOL CommandNeedsTimedInvokeInLevelControlCluster(AttributeId aAttributeId) { using namespace Clusters::LevelControl; @@ -68,15 +59,6 @@ static BOOL CommandNeedsTimedInvokeInLevelControlCluster(AttributeId aAttributeI } } } -static BOOL CommandNeedsTimedInvokeInBinaryInputBasicCluster(AttributeId aAttributeId) -{ - using namespace Clusters::BinaryInputBasic; - switch (aAttributeId) { - default: { - return NO; - } - } -} static BOOL CommandNeedsTimedInvokeInPulseWidthModulationCluster(AttributeId aAttributeId) { using namespace Clusters::PulseWidthModulation; @@ -767,15 +749,6 @@ static BOOL CommandNeedsTimedInvokeInWindowCoveringCluster(AttributeId aAttribut } } } -static BOOL CommandNeedsTimedInvokeInBarrierControlCluster(AttributeId aAttributeId) -{ - using namespace Clusters::BarrierControl; - switch (aAttributeId) { - default: { - return NO; - } - } -} static BOOL CommandNeedsTimedInvokeInServiceAreaCluster(AttributeId aAttributeId) { using namespace Clusters::ServiceArea; @@ -1169,15 +1142,6 @@ static BOOL CommandNeedsTimedInvokeInCommissionerControlCluster(AttributeId aAtt } } } -static BOOL CommandNeedsTimedInvokeInElectricalMeasurementCluster(AttributeId aAttributeId) -{ - using namespace Clusters::ElectricalMeasurement; - switch (aAttributeId) { - default: { - return NO; - } - } -} static BOOL CommandNeedsTimedInvokeInUnitTestingCluster(AttributeId aAttributeId) { using namespace Clusters::UnitTesting; @@ -1215,15 +1179,9 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::OnOff::Id: { return CommandNeedsTimedInvokeInOnOffCluster(commandID); } - case Clusters::OnOffSwitchConfiguration::Id: { - return CommandNeedsTimedInvokeInOnOffSwitchConfigurationCluster(commandID); - } case Clusters::LevelControl::Id: { return CommandNeedsTimedInvokeInLevelControlCluster(commandID); } - case Clusters::BinaryInputBasic::Id: { - return CommandNeedsTimedInvokeInBinaryInputBasicCluster(commandID); - } case Clusters::PulseWidthModulation::Id: { return CommandNeedsTimedInvokeInPulseWidthModulationCluster(commandID); } @@ -1434,9 +1392,6 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::WindowCovering::Id: { return CommandNeedsTimedInvokeInWindowCoveringCluster(commandID); } - case Clusters::BarrierControl::Id: { - return CommandNeedsTimedInvokeInBarrierControlCluster(commandID); - } case Clusters::ServiceArea::Id: { return CommandNeedsTimedInvokeInServiceAreaCluster(commandID); } @@ -1563,9 +1518,6 @@ BOOL MTRCommandNeedsTimedInvoke(NSNumber * _Nonnull aClusterID, NSNumber * _Nonn case Clusters::CommissionerControl::Id: { return CommandNeedsTimedInvokeInCommissionerControlCluster(commandID); } - case Clusters::ElectricalMeasurement::Id: { - return CommandNeedsTimedInvokeInElectricalMeasurementCluster(commandID); - } case Clusters::UnitTesting::Id: { return CommandNeedsTimedInvokeInUnitTestingCluster(commandID); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 6ecc072f6b44a6..4b493a97a74df6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -70,18 +70,6 @@ static id _Nullable DecodeEventPayloadForOnOffCluster(EventId aEventId, TLV::TLV *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForOnOffSwitchConfigurationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::OnOffSwitchConfiguration; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForLevelControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::LevelControl; @@ -94,18 +82,6 @@ static id _Nullable DecodeEventPayloadForLevelControlCluster(EventId aEventId, T *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForBinaryInputBasicCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BinaryInputBasic; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForPulseWidthModulationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::PulseWidthModulation; @@ -3735,18 +3711,6 @@ static id _Nullable DecodeEventPayloadForWindowCoveringCluster(EventId aEventId, *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForBarrierControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::BarrierControl; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForServiceAreaCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::ServiceArea; @@ -4635,18 +4599,6 @@ static id _Nullable DecodeEventPayloadForCommissionerControlCluster(EventId aEve *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForElectricalMeasurementCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::ElectricalMeasurement; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForUnitTestingCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::UnitTesting; @@ -4848,15 +4800,9 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::OnOff::Id: { return DecodeEventPayloadForOnOffCluster(aPath.mEventId, aReader, aError); } - case Clusters::OnOffSwitchConfiguration::Id: { - return DecodeEventPayloadForOnOffSwitchConfigurationCluster(aPath.mEventId, aReader, aError); - } case Clusters::LevelControl::Id: { return DecodeEventPayloadForLevelControlCluster(aPath.mEventId, aReader, aError); } - case Clusters::BinaryInputBasic::Id: { - return DecodeEventPayloadForBinaryInputBasicCluster(aPath.mEventId, aReader, aError); - } case Clusters::PulseWidthModulation::Id: { return DecodeEventPayloadForPulseWidthModulationCluster(aPath.mEventId, aReader, aError); } @@ -5067,9 +5013,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::WindowCovering::Id: { return DecodeEventPayloadForWindowCoveringCluster(aPath.mEventId, aReader, aError); } - case Clusters::BarrierControl::Id: { - return DecodeEventPayloadForBarrierControlCluster(aPath.mEventId, aReader, aError); - } case Clusters::ServiceArea::Id: { return DecodeEventPayloadForServiceAreaCluster(aPath.mEventId, aReader, aError); } @@ -5196,9 +5139,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::CommissionerControl::Id: { return DecodeEventPayloadForCommissionerControlCluster(aPath.mEventId, aReader, aError); } - case Clusters::ElectricalMeasurement::Id: { - return DecodeEventPayloadForElectricalMeasurementCluster(aPath.mEventId, aReader, aError); - } case Clusters::UnitTesting::Id: { return DecodeEventPayloadForUnitTestingCluster(aPath.mEventId, aReader, aError); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 0f3dc4f7991331..4cba7d57785f10 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -3235,725 +3235,6 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute SwitchType - */ -class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationSwitchType() - : ReadAttribute("switch-type") - { - } - - ~ReadOnOffSwitchConfigurationSwitchType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSwitchTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration SwitchType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationSwitchType() - : SubscribeAttribute("switch-type") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationSwitchType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSwitchTypeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SwitchActions - */ -class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationSwitchActions() - : ReadAttribute("switch-actions") - { - } - - ~ReadOnOffSwitchConfigurationSwitchActions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { -public: - WriteOnOffSwitchConfigurationSwitchActions() - : WriteAttribute("switch-actions") - { - AddArgument("attr-name", "switch-actions"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffSwitchConfigurationSwitchActions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSwitchActionsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationSwitchActions() - : SubscribeAttribute("switch-actions") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationSwitchActions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeSwitchActionsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOnOffSwitchConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadOnOffSwitchConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOnOffSwitchConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadOnOffSwitchConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadOnOffSwitchConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadOnOffSwitchConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /*----------------------------------------------------------------------------*\ | Cluster LevelControl | 0x0008 | |------------------------------------------------------------------------------| @@ -6430,21 +5711,13 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster BinaryInputBasic | 0x000F | +| Cluster PulseWidthModulation | 0x001C | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * ActiveText | 0x0004 | -| * Description | 0x001C | -| * InactiveText | 0x002E | -| * OutOfService | 0x0051 | -| * Polarity | 0x0054 | -| * PresentValue | 0x0055 | -| * Reliability | 0x0067 | -| * StatusFlags | 0x006F | -| * ApplicationType | 0x0100 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -6455,103 +5728,64 @@ class SubscribeAttributeLevelControlClusterRevision : public SubscribeAttribute | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveText + * Attribute GeneratedCommandList */ -class ReadBinaryInputBasicActiveText : public ReadAttribute { +class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { public: - ReadBinaryInputBasicActiveText() - : ReadAttribute("active-text") + ReadPulseWidthModulationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBinaryInputBasicActiveText() + ~ReadPulseWidthModulationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic ActiveText read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBinaryInputBasicActiveText : public WriteAttribute { -public: - WriteBinaryInputBasicActiveText() - : WriteAttribute("active-text") - { - AddArgument("attr-name", "active-text"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBinaryInputBasicActiveText() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeActiveTextWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic ActiveText write Error", error); + LogNSError("PulseWidthModulation GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { +class SubscribeAttributePulseWidthModulationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicActiveText() - : SubscribeAttribute("active-text") + SubscribeAttributePulseWidthModulationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBinaryInputBasicActiveText() + ~SubscribeAttributePulseWidthModulationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -6562,10 +5796,10 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveTextWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ActiveText response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -6578,103 +5812,65 @@ class SubscribeAttributeBinaryInputBasicActiveText : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Description + * Attribute AcceptedCommandList */ -class ReadBinaryInputBasicDescription : public ReadAttribute { +class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { public: - ReadBinaryInputBasicDescription() - : ReadAttribute("description") + ReadPulseWidthModulationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBinaryInputBasicDescription() + ~ReadPulseWidthModulationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Description response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic Description read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBinaryInputBasicDescription : public WriteAttribute { -public: - WriteBinaryInputBasicDescription() - : WriteAttribute("description") - { - AddArgument("attr-name", "description"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBinaryInputBasicDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeDescriptionWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Description write Error", error); + LogNSError("PulseWidthModulation AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute { +class SubscribeAttributePulseWidthModulationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicDescription() - : SubscribeAttribute("description") + SubscribeAttributePulseWidthModulationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBinaryInputBasicDescription() + ~SubscribeAttributePulseWidthModulationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -6685,10 +5881,10 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Description response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -6701,103 +5897,65 @@ class SubscribeAttributeBinaryInputBasicDescription : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InactiveText + * Attribute EventList */ -class ReadBinaryInputBasicInactiveText : public ReadAttribute { +class ReadPulseWidthModulationEventList : public ReadAttribute { public: - ReadBinaryInputBasicInactiveText() - : ReadAttribute("inactive-text") + ReadPulseWidthModulationEventList() + : ReadAttribute("event-list") { } - ~ReadBinaryInputBasicInactiveText() + ~ReadPulseWidthModulationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInactiveTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic InactiveText read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBinaryInputBasicInactiveText : public WriteAttribute { -public: - WriteBinaryInputBasicInactiveText() - : WriteAttribute("inactive-text") - { - AddArgument("attr-name", "inactive-text"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBinaryInputBasicInactiveText() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeInactiveTextWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic InactiveText write Error", error); + LogNSError("PulseWidthModulation EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute { +class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicInactiveText() - : SubscribeAttribute("inactive-text") + SubscribeAttributePulseWidthModulationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBinaryInputBasicInactiveText() + ~SubscribeAttributePulseWidthModulationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -6808,10 +5966,10 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInactiveTextWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.InactiveText response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -6824,35 +5982,38 @@ class SubscribeAttributeBinaryInputBasicInactiveText : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OutOfService + * Attribute AttributeList */ -class ReadBinaryInputBasicOutOfService : public ReadAttribute { +class ReadPulseWidthModulationAttributeList : public ReadAttribute { public: - ReadBinaryInputBasicOutOfService() - : ReadAttribute("out-of-service") + ReadPulseWidthModulationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBinaryInputBasicOutOfService() + ~ReadPulseWidthModulationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutOfServiceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic OutOfService read Error", error); + LogNSError("PulseWidthModulation AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -6861,66 +6022,110 @@ class ReadBinaryInputBasicOutOfService : public ReadAttribute { } }; -class WriteBinaryInputBasicOutOfService : public WriteAttribute { +class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttribute { public: - WriteBinaryInputBasicOutOfService() - : WriteAttribute("out-of-service") + SubscribeAttributePulseWidthModulationAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("attr-name", "out-of-service"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBinaryInputBasicOutOfService() + ~SubscribeAttributePulseWidthModulationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOutOfServiceWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic OutOfService write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute FeatureMap + */ +class ReadPulseWidthModulationFeatureMap : public ReadAttribute { +public: + ReadPulseWidthModulationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadPulseWidthModulationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PulseWidthModulation FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute { +class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicOutOfService() - : SubscribeAttribute("out-of-service") + SubscribeAttributePulseWidthModulationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBinaryInputBasicOutOfService() + ~SubscribeAttributePulseWidthModulationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -6931,10 +6136,10 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutOfServiceWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.OutOfService response %@", [value description]); + NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -6947,35 +6152,38 @@ class SubscribeAttributeBinaryInputBasicOutOfService : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Polarity + * Attribute ClusterRevision */ -class ReadBinaryInputBasicPolarity : public ReadAttribute { +class ReadPulseWidthModulationClusterRevision : public ReadAttribute { public: - ReadBinaryInputBasicPolarity() - : ReadAttribute("polarity") + ReadPulseWidthModulationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBinaryInputBasicPolarity() + ~ReadPulseWidthModulationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePolarityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic Polarity read Error", error); + LogNSError("PulseWidthModulation ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -6984,25 +6192,25 @@ class ReadBinaryInputBasicPolarity : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { +class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicPolarity() - : SubscribeAttribute("polarity") + SubscribeAttributePulseWidthModulationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBinaryInputBasicPolarity() + ~SubscribeAttributePulseWidthModulationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7013,10 +6221,10 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePolarityWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Polarity response %@", [value description]); + NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7029,103 +6237,85 @@ class SubscribeAttributeBinaryInputBasicPolarity : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Descriptor | 0x001D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DeviceTypeList | 0x0000 | +| * ServerList | 0x0001 | +| * ClientList | 0x0002 | +| * PartsList | 0x0003 | +| * TagList | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute PresentValue + * Attribute DeviceTypeList */ -class ReadBinaryInputBasicPresentValue : public ReadAttribute { +class ReadDescriptorDeviceTypeList : public ReadAttribute { public: - ReadBinaryInputBasicPresentValue() - : ReadAttribute("present-value") + ReadDescriptorDeviceTypeList() + : ReadAttribute("device-type-list") { } - ~ReadBinaryInputBasicPresentValue() + ~ReadDescriptorDeviceTypeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePresentValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic PresentValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBinaryInputBasicPresentValue : public WriteAttribute { -public: - WriteBinaryInputBasicPresentValue() - : WriteAttribute("present-value") - { - AddArgument("attr-name", "present-value"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBinaryInputBasicPresentValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributePresentValueWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic PresentValue write Error", error); + LogNSError("Descriptor DeviceTypeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute { +class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicPresentValue() - : SubscribeAttribute("present-value") + SubscribeAttributeDescriptorDeviceTypeList() + : SubscribeAttribute("device-type-list") { } - ~SubscribeAttributeBinaryInputBasicPresentValue() + ~SubscribeAttributeDescriptorDeviceTypeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7136,10 +6326,10 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePresentValueWithParams:params + [cluster subscribeAttributeDeviceTypeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.PresentValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7153,34 +6343,34 @@ class SubscribeAttributeBinaryInputBasicPresentValue : public SubscribeAttribute }; /* - * Attribute Reliability + * Attribute ServerList */ -class ReadBinaryInputBasicReliability : public ReadAttribute { +class ReadDescriptorServerList : public ReadAttribute { public: - ReadBinaryInputBasicReliability() - : ReadAttribute("reliability") + ReadDescriptorServerList() + : ReadAttribute("server-list") { } - ~ReadBinaryInputBasicReliability() + ~ReadDescriptorServerList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReliabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.ServerList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic Reliability read Error", error); + LogNSError("Descriptor ServerList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7189,66 +6379,107 @@ class ReadBinaryInputBasicReliability : public ReadAttribute { } }; -class WriteBinaryInputBasicReliability : public WriteAttribute { +class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { public: - WriteBinaryInputBasicReliability() - : WriteAttribute("reliability") + SubscribeAttributeDescriptorServerList() + : SubscribeAttribute("server-list") { - AddArgument("attr-name", "reliability"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBinaryInputBasicReliability() + ~SubscribeAttributeDescriptorServerList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeServerListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.ServerList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeReliabilityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BinaryInputBasic Reliability write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClientList + */ +class ReadDescriptorClientList : public ReadAttribute { +public: + ReadDescriptorClientList() + : ReadAttribute("client-list") + { + } + + ~ReadDescriptorClientList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.ClientList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Descriptor ClientList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute { +class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicReliability() - : SubscribeAttribute("reliability") + SubscribeAttributeDescriptorClientList() + : SubscribeAttribute("client-list") { } - ~SubscribeAttributeBinaryInputBasicReliability() + ~SubscribeAttributeDescriptorClientList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7259,10 +6490,10 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReliabilityWithParams:params + [cluster subscribeAttributeClientListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.Reliability response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.ClientList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7276,34 +6507,34 @@ class SubscribeAttributeBinaryInputBasicReliability : public SubscribeAttribute }; /* - * Attribute StatusFlags + * Attribute PartsList */ -class ReadBinaryInputBasicStatusFlags : public ReadAttribute { +class ReadDescriptorPartsList : public ReadAttribute { public: - ReadBinaryInputBasicStatusFlags() - : ReadAttribute("status-flags") + ReadDescriptorPartsList() + : ReadAttribute("parts-list") { } - ~ReadBinaryInputBasicStatusFlags() + ~ReadDescriptorPartsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusFlagsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.PartsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic StatusFlags read Error", error); + LogNSError("Descriptor PartsList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7312,25 +6543,25 @@ class ReadBinaryInputBasicStatusFlags : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute { +class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicStatusFlags() - : SubscribeAttribute("status-flags") + SubscribeAttributeDescriptorPartsList() + : SubscribeAttribute("parts-list") { } - ~SubscribeAttributeBinaryInputBasicStatusFlags() + ~SubscribeAttributeDescriptorPartsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7341,10 +6572,10 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusFlagsWithParams:params + [cluster subscribeAttributePartsListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.StatusFlags response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.PartsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7357,35 +6588,37 @@ class SubscribeAttributeBinaryInputBasicStatusFlags : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ApplicationType + * Attribute TagList */ -class ReadBinaryInputBasicApplicationType : public ReadAttribute { +class ReadDescriptorTagList : public ReadAttribute { public: - ReadBinaryInputBasicApplicationType() - : ReadAttribute("application-type") + ReadDescriptorTagList() + : ReadAttribute("tag-list") { } - ~ReadBinaryInputBasicApplicationType() + ~ReadDescriptorTagList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTagListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.TagList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic ApplicationType read Error", error); + LogNSError("Descriptor TagList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7394,25 +6627,25 @@ class ReadBinaryInputBasicApplicationType : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttribute { +class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicApplicationType() - : SubscribeAttribute("application-type") + SubscribeAttributeDescriptorTagList() + : SubscribeAttribute("tag-list") { } - ~SubscribeAttributeBinaryInputBasicApplicationType() + ~SubscribeAttributeDescriptorTagList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7423,10 +6656,10 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationTypeWithParams:params + [cluster subscribeAttributeTagListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ApplicationType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.TagList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7439,35 +6672,37 @@ class SubscribeAttributeBinaryInputBasicApplicationType : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { +class ReadDescriptorGeneratedCommandList : public ReadAttribute { public: - ReadBinaryInputBasicGeneratedCommandList() + ReadDescriptorGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBinaryInputBasicGeneratedCommandList() + ~ReadDescriptorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic GeneratedCommandList read Error", error); + LogNSError("Descriptor GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7476,25 +6711,25 @@ class ReadBinaryInputBasicGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicGeneratedCommandList() + SubscribeAttributeDescriptorGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBinaryInputBasicGeneratedCommandList() + ~SubscribeAttributeDescriptorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7508,7 +6743,7 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7524,32 +6759,32 @@ class SubscribeAttributeBinaryInputBasicGeneratedCommandList : public SubscribeA /* * Attribute AcceptedCommandList */ -class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { +class ReadDescriptorAcceptedCommandList : public ReadAttribute { public: - ReadBinaryInputBasicAcceptedCommandList() + ReadDescriptorAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBinaryInputBasicAcceptedCommandList() + ~ReadDescriptorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic AcceptedCommandList read Error", error); + LogNSError("Descriptor AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7558,25 +6793,25 @@ class ReadBinaryInputBasicAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicAcceptedCommandList() + SubscribeAttributeDescriptorAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBinaryInputBasicAcceptedCommandList() + ~SubscribeAttributeDescriptorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7590,7 +6825,7 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7608,32 +6843,32 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt /* * Attribute EventList */ -class ReadBinaryInputBasicEventList : public ReadAttribute { +class ReadDescriptorEventList : public ReadAttribute { public: - ReadBinaryInputBasicEventList() + ReadDescriptorEventList() : ReadAttribute("event-list") { } - ~ReadBinaryInputBasicEventList() + ~ReadDescriptorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + NSLog(@"Descriptor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic EventList read Error", error); + LogNSError("Descriptor EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7642,25 +6877,25 @@ class ReadBinaryInputBasicEventList : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { +class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicEventList() + SubscribeAttributeDescriptorEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBinaryInputBasicEventList() + ~SubscribeAttributeDescriptorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7674,7 +6909,7 @@ class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + NSLog(@"Descriptor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7692,32 +6927,32 @@ class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadBinaryInputBasicAttributeList : public ReadAttribute { +class ReadDescriptorAttributeList : public ReadAttribute { public: - ReadBinaryInputBasicAttributeList() + ReadDescriptorAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBinaryInputBasicAttributeList() + ~ReadDescriptorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); + NSLog(@"Descriptor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic AttributeList read Error", error); + LogNSError("Descriptor AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7726,25 +6961,25 @@ class ReadBinaryInputBasicAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribute { +class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicAttributeList() + SubscribeAttributeDescriptorAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBinaryInputBasicAttributeList() + ~SubscribeAttributeDescriptorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7758,7 +6993,7 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.AttributeList response %@", [value description]); + NSLog(@"Descriptor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7774,32 +7009,32 @@ class SubscribeAttributeBinaryInputBasicAttributeList : public SubscribeAttribut /* * Attribute FeatureMap */ -class ReadBinaryInputBasicFeatureMap : public ReadAttribute { +class ReadDescriptorFeatureMap : public ReadAttribute { public: - ReadBinaryInputBasicFeatureMap() + ReadDescriptorFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBinaryInputBasicFeatureMap() + ~ReadDescriptorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); + NSLog(@"Descriptor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic FeatureMap read Error", error); + LogNSError("Descriptor FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7808,25 +7043,25 @@ class ReadBinaryInputBasicFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicFeatureMap() + SubscribeAttributeDescriptorFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBinaryInputBasicFeatureMap() + ~SubscribeAttributeDescriptorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7840,7 +7075,7 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.FeatureMap response %@", [value description]); + NSLog(@"Descriptor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7856,32 +7091,32 @@ class SubscribeAttributeBinaryInputBasicFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadBinaryInputBasicClusterRevision : public ReadAttribute { +class ReadDescriptorClusterRevision : public ReadAttribute { public: - ReadBinaryInputBasicClusterRevision() + ReadDescriptorClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBinaryInputBasicClusterRevision() + ~ReadDescriptorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); + NSLog(@"Descriptor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BinaryInputBasic ClusterRevision read Error", error); + LogNSError("Descriptor ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7890,25 +7125,25 @@ class ReadBinaryInputBasicClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBinaryInputBasicClusterRevision() + SubscribeAttributeDescriptorClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBinaryInputBasicClusterRevision() + ~SubscribeAttributeDescriptorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BinaryInputBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -7922,7 +7157,7 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BinaryInputBasic.ClusterRevision response %@", [value description]); + NSLog(@"Descriptor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -7935,13 +7170,13 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster PulseWidthModulation | 0x001C | +| Cluster Binding | 0x001E | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | +| * Binding | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -7952,37 +7187,39 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute Binding */ -class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { +class ReadBindingBinding : public ReadAttribute { public: - ReadPulseWidthModulationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBindingBinding() + : ReadAttribute("binding") { } - ~ReadPulseWidthModulationGeneratedCommandList() + ~ReadBindingBinding() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.Binding response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation GeneratedCommandList read Error", error); + LogNSError("Binding Binding read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -7991,25 +7228,98 @@ class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationGeneratedCommandList : public SubscribeAttribute { +class WriteBindingBinding : public WriteAttribute { public: - SubscribeAttributePulseWidthModulationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteBindingBinding() + : WriteAttribute("binding") + , mComplex(&mValue) { + AddArgument("attr-name", "binding"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePulseWidthModulationGeneratedCommandList() + ~WriteBindingBinding() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRBindingClusterTargetStruct * newElement_0; + newElement_0 = [MTRBindingClusterTargetStruct new]; + if (entry_0.node.HasValue()) { + newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; + } else { + newElement_0.node = nil; + } + if (entry_0.group.HasValue()) { + newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; + } else { + newElement_0.group = nil; + } + if (entry_0.endpoint.HasValue()) { + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; + } else { + newElement_0.endpoint = nil; + } + if (entry_0.cluster.HasValue()) { + newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; + } else { + newElement_0.cluster = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeBindingWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Binding Binding write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; +}; + +class SubscribeAttributeBindingBinding : public SubscribeAttribute { +public: + SubscribeAttributeBindingBinding() + : SubscribeAttribute("binding") + { + } + + ~SubscribeAttributeBindingBinding() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8020,10 +7330,10 @@ class SubscribeAttributePulseWidthModulationGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeBindingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + NSLog(@"Binding.Binding response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8036,38 +7346,35 @@ class SubscribeAttributePulseWidthModulationGeneratedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { +class ReadBindingGeneratedCommandList : public ReadAttribute { public: - ReadPulseWidthModulationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBindingGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPulseWidthModulationAcceptedCommandList() + ~ReadBindingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation AcceptedCommandList read Error", error); + LogNSError("Binding GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8076,25 +7383,25 @@ class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePulseWidthModulationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBindingGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePulseWidthModulationAcceptedCommandList() + ~SubscribeAttributeBindingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8105,10 +7412,10 @@ class SubscribeAttributePulseWidthModulationAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + NSLog(@"Binding.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8121,38 +7428,35 @@ class SubscribeAttributePulseWidthModulationAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadPulseWidthModulationEventList : public ReadAttribute { +class ReadBindingAcceptedCommandList : public ReadAttribute { public: - ReadPulseWidthModulationEventList() - : ReadAttribute("event-list") + ReadBindingAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPulseWidthModulationEventList() + ~ReadBindingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation EventList read Error", error); + LogNSError("Binding AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8161,25 +7465,25 @@ class ReadPulseWidthModulationEventList : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribute { +class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePulseWidthModulationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBindingAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePulseWidthModulationEventList() + ~SubscribeAttributeBindingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8190,10 +7494,10 @@ class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + NSLog(@"Binding.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8206,38 +7510,37 @@ class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute EventList */ -class ReadPulseWidthModulationAttributeList : public ReadAttribute { +class ReadBindingEventList : public ReadAttribute { public: - ReadPulseWidthModulationAttributeList() - : ReadAttribute("attribute-list") + ReadBindingEventList() + : ReadAttribute("event-list") { } - ~ReadPulseWidthModulationAttributeList() + ~ReadBindingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation AttributeList read Error", error); + LogNSError("Binding EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8246,25 +7549,25 @@ class ReadPulseWidthModulationAttributeList : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttribute { +class SubscribeAttributeBindingEventList : public SubscribeAttribute { public: - SubscribeAttributePulseWidthModulationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBindingEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePulseWidthModulationAttributeList() + ~SubscribeAttributeBindingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8275,10 +7578,10 @@ class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + NSLog(@"Binding.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8292,37 +7595,36 @@ class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttr }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AttributeList */ -class ReadPulseWidthModulationFeatureMap : public ReadAttribute { +class ReadBindingAttributeList : public ReadAttribute { public: - ReadPulseWidthModulationFeatureMap() - : ReadAttribute("feature-map") + ReadBindingAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPulseWidthModulationFeatureMap() + ~ReadBindingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation FeatureMap read Error", error); + LogNSError("Binding AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8331,25 +7633,25 @@ class ReadPulseWidthModulationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { public: - SubscribeAttributePulseWidthModulationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBindingAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePulseWidthModulationFeatureMap() + ~SubscribeAttributeBindingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8360,10 +7662,10 @@ class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8376,38 +7678,35 @@ class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute FeatureMap */ -class ReadPulseWidthModulationClusterRevision : public ReadAttribute { +class ReadBindingFeatureMap : public ReadAttribute { public: - ReadPulseWidthModulationClusterRevision() - : ReadAttribute("cluster-revision") + ReadBindingFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPulseWidthModulationClusterRevision() + ~ReadBindingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PulseWidthModulation ClusterRevision read Error", error); + LogNSError("Binding FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8416,25 +7715,25 @@ class ReadPulseWidthModulationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePulseWidthModulationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBindingFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePulseWidthModulationClusterRevision() + ~SubscribeAttributeBindingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PulseWidthModulation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PulseWidthModulation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8445,10 +7744,10 @@ class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + NSLog(@"Binding.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8461,58 +7760,35 @@ class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster Descriptor | 0x001D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * DeviceTypeList | 0x0000 | -| * ServerList | 0x0001 | -| * ClientList | 0x0002 | -| * PartsList | 0x0003 | -| * TagList | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute DeviceTypeList + * Attribute ClusterRevision */ -class ReadDescriptorDeviceTypeList : public ReadAttribute { +class ReadBindingClusterRevision : public ReadAttribute { public: - ReadDescriptorDeviceTypeList() - : ReadAttribute("device-type-list") + ReadBindingClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDescriptorDeviceTypeList() + ~ReadBindingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceTypeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor DeviceTypeList read Error", error); + LogNSError("Binding ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8521,25 +7797,25 @@ class ReadDescriptorDeviceTypeList : public ReadAttribute { } }; -class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { +class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDescriptorDeviceTypeList() - : SubscribeAttribute("device-type-list") + SubscribeAttributeBindingClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDescriptorDeviceTypeList() + ~SubscribeAttributeBindingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8550,10 +7826,10 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceTypeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.DeviceTypeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8566,199 +7842,153 @@ class SubscribeAttributeDescriptorDeviceTypeList : public SubscribeAttribute { } }; -/* - * Attribute ServerList - */ -class ReadDescriptorServerList : public ReadAttribute { -public: - ReadDescriptorServerList() - : ReadAttribute("server-list") - { - } - - ~ReadDescriptorServerList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeServerListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ServerList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Descriptor ServerList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDescriptorServerList : public SubscribeAttribute { -public: - SubscribeAttributeDescriptorServerList() - : SubscribeAttribute("server-list") - { - } - - ~SubscribeAttributeDescriptorServerList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ServerList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeServerListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ServerList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; +/*----------------------------------------------------------------------------*\ +| Cluster AccessControl | 0x001F | +|------------------------------------------------------------------------------| +| Commands: | | +| * ReviewFabricRestrictions | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Acl | 0x0000 | +| * Extension | 0x0001 | +| * SubjectsPerAccessControlEntry | 0x0002 | +| * TargetsPerAccessControlEntry | 0x0003 | +| * AccessControlEntriesPerFabric | 0x0004 | +| * CommissioningARL | 0x0005 | +| * Arl | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * AccessControlEntryChanged | 0x0000 | +| * AccessControlExtensionChanged | 0x0001 | +| * FabricRestrictionReviewUpdate | 0x0002 | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ClientList + * Command ReviewFabricRestrictions */ -class ReadDescriptorClientList : public ReadAttribute { +class AccessControlReviewFabricRestrictions : public ClusterCommand { public: - ReadDescriptorClientList() - : ReadAttribute("client-list") - { - } - - ~ReadDescriptorClientList() + AccessControlReviewFabricRestrictions() + : ClusterCommand("review-fabric-restrictions") + , mComplex_Arl(&mRequest.arl) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Arl", &mComplex_Arl); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictions::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClientListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ClientList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Descriptor ClientList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccessControlClusterReviewFabricRestrictionsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.arl) { + MTRAccessControlClusterCommissioningAccessRestrictionEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterCommissioningAccessRestrictionEntryStruct new]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.restrictions) { + MTRAccessControlClusterAccessRestrictionStruct * newElement_2; + newElement_2 = [MTRAccessControlClusterAccessRestrictionStruct new]; + newElement_2.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.type)]; + if (entry_2.id.IsNull()) { + newElement_2.id = nil; + } else { + newElement_2.id = [NSNumber numberWithUnsignedInt:entry_2.id.Value()]; + } + [array_2 addObject:newElement_2]; + } + newElement_0.restrictions = array_2; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDescriptorClientList : public SubscribeAttribute { -public: - SubscribeAttributeDescriptorClientList() - : SubscribeAttribute("client-list") - { - } - - ~SubscribeAttributeDescriptorClientList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClientList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + params.arl = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster reviewFabricRestrictionsWithParams:params completion: + ^(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClientListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ClientList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictions::Type mRequest; + TypedComplexArgument> mComplex_Arl; }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute PartsList + * Attribute Acl */ -class ReadDescriptorPartsList : public ReadAttribute { +class ReadAccessControlAcl : public ReadAttribute { public: - ReadDescriptorPartsList() - : ReadAttribute("parts-list") + ReadAccessControlAcl() + : ReadAttribute("acl") { } - ~ReadDescriptorPartsList() + ~ReadAccessControlAcl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.PartsList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeACLWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.ACL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor PartsList read Error", error); + LogNSError("AccessControl ACL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8767,109 +7997,121 @@ class ReadDescriptorPartsList : public ReadAttribute { } }; -class SubscribeAttributeDescriptorPartsList : public SubscribeAttribute { +class WriteAccessControlAcl : public WriteAttribute { public: - SubscribeAttributeDescriptorPartsList() - : SubscribeAttribute("parts-list") + WriteAccessControlAcl() + : WriteAttribute("acl") + , mComplex(&mValue) { + AddArgument("attr-name", "acl"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDescriptorPartsList() + ~WriteAccessControlAcl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::PartsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePartsListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.PartsList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; + newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; + newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; + if (entry_0.subjects.IsNull()) { + newElement_0.subjects = nil; } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + for (auto & entry_3 : entry_0.subjects.Value()) { + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; + [array_3 addObject:newElement_3]; + } + newElement_0.subjects = array_3; + } } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute TagList - */ -class ReadDescriptorTagList : public ReadAttribute { -public: - ReadDescriptorTagList() - : ReadAttribute("tag-list") - { - } - - ~ReadDescriptorTagList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + if (entry_0.targets.IsNull()) { + newElement_0.targets = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + for (auto & entry_3 : entry_0.targets.Value()) { + MTRAccessControlClusterAccessControlTargetStruct * newElement_3; + newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; + if (entry_3.cluster.IsNull()) { + newElement_3.cluster = nil; + } else { + newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; + } + if (entry_3.endpoint.IsNull()) { + newElement_3.endpoint = nil; + } else { + newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; + } + if (entry_3.deviceType.IsNull()) { + newElement_3.deviceType = nil; + } else { + newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; + } + [array_3 addObject:newElement_3]; + } + newElement_0.targets = array_3; + } + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTagListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.TagList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Descriptor TagList read Error", error); + [cluster writeAttributeACLWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl ACL write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { +class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { public: - SubscribeAttributeDescriptorTagList() - : SubscribeAttribute("tag-list") + SubscribeAttributeAccessControlAcl() + : SubscribeAttribute("acl") { } - ~SubscribeAttributeDescriptorTagList() + ~SubscribeAttributeAccessControlAcl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::TagList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -8880,10 +8122,10 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTagListWithParams:params + [cluster subscribeAttributeACLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.TagList response %@", [value description]); + NSLog(@"AccessControl.ACL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -8896,37 +8138,39 @@ class SubscribeAttributeDescriptorTagList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute Extension */ -class ReadDescriptorGeneratedCommandList : public ReadAttribute { +class ReadAccessControlExtension : public ReadAttribute { public: - ReadDescriptorGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadAccessControlExtension() + : ReadAttribute("extension") { } - ~ReadDescriptorGeneratedCommandList() + ~ReadAccessControlExtension() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeExtensionWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.Extension response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor GeneratedCommandList read Error", error); + LogNSError("AccessControl Extension read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -8935,107 +8179,79 @@ class ReadDescriptorGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDescriptorGeneratedCommandList : public SubscribeAttribute { +class WriteAccessControlExtension : public WriteAttribute { public: - SubscribeAttributeDescriptorGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteAccessControlExtension() + : WriteAttribute("extension") + , mComplex(&mValue) { + AddArgument("attr-name", "extension"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDescriptorGeneratedCommandList() + ~WriteAccessControlExtension() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; + newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadDescriptorAcceptedCommandList : public ReadAttribute { -public: - ReadDescriptorAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadDescriptorAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Descriptor AcceptedCommandList read Error", error); + [cluster writeAttributeExtensionWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("AccessControl Extension write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { public: - SubscribeAttributeDescriptorAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAccessControlExtension() + : SubscribeAttribute("extension") { } - ~SubscribeAttributeDescriptorAcceptedCommandList() + ~SubscribeAttributeAccessControlExtension() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9046,10 +8262,10 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeExtensionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.AcceptedCommandList response %@", [value description]); + NSLog(@"AccessControl.Extension response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9062,37 +8278,35 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute SubjectsPerAccessControlEntry */ -class ReadDescriptorEventList : public ReadAttribute { +class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { public: - ReadDescriptorEventList() - : ReadAttribute("event-list") + ReadAccessControlSubjectsPerAccessControlEntry() + : ReadAttribute("subjects-per-access-control-entry") { } - ~ReadDescriptorEventList() + ~ReadAccessControlSubjectsPerAccessControlEntry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor EventList read Error", error); + LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9101,25 +8315,25 @@ class ReadDescriptorEventList : public ReadAttribute { } }; -class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { +class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public SubscribeAttribute { public: - SubscribeAttributeDescriptorEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeAccessControlSubjectsPerAccessControlEntry() + : SubscribeAttribute("subjects-per-access-control-entry") { } - ~SubscribeAttributeDescriptorEventList() + ~SubscribeAttributeAccessControlSubjectsPerAccessControlEntry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9130,10 +8344,10 @@ class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSubjectsPerAccessControlEntryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9146,37 +8360,35 @@ class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute TargetsPerAccessControlEntry */ -class ReadDescriptorAttributeList : public ReadAttribute { +class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { public: - ReadDescriptorAttributeList() - : ReadAttribute("attribute-list") + ReadAccessControlTargetsPerAccessControlEntry() + : ReadAttribute("targets-per-access-control-entry") { } - ~ReadDescriptorAttributeList() + ~ReadAccessControlTargetsPerAccessControlEntry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor AttributeList read Error", error); + LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9185,25 +8397,25 @@ class ReadDescriptorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { +class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public SubscribeAttribute { public: - SubscribeAttributeDescriptorAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAccessControlTargetsPerAccessControlEntry() + : SubscribeAttribute("targets-per-access-control-entry") { } - ~SubscribeAttributeDescriptorAttributeList() + ~SubscribeAttributeAccessControlTargetsPerAccessControlEntry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9214,10 +8426,10 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeTargetsPerAccessControlEntryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9231,34 +8443,34 @@ class SubscribeAttributeDescriptorAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AccessControlEntriesPerFabric */ -class ReadDescriptorFeatureMap : public ReadAttribute { +class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { public: - ReadDescriptorFeatureMap() - : ReadAttribute("feature-map") + ReadAccessControlAccessControlEntriesPerFabric() + : ReadAttribute("access-control-entries-per-fabric") { } - ~ReadDescriptorFeatureMap() + ~ReadAccessControlAccessControlEntriesPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor FeatureMap read Error", error); + LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9267,25 +8479,25 @@ class ReadDescriptorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public SubscribeAttribute { public: - SubscribeAttributeDescriptorFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAccessControlAccessControlEntriesPerFabric() + : SubscribeAttribute("access-control-entries-per-fabric") { } - ~SubscribeAttributeDescriptorFeatureMap() + ~SubscribeAttributeAccessControlAccessControlEntriesPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9296,10 +8508,10 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAccessControlEntriesPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.FeatureMap response %@", [value description]); + NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9312,35 +8524,37 @@ class SubscribeAttributeDescriptorFeatureMap : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute CommissioningARL */ -class ReadDescriptorClusterRevision : public ReadAttribute { +class ReadAccessControlCommissioningARL : public ReadAttribute { public: - ReadDescriptorClusterRevision() - : ReadAttribute("cluster-revision") + ReadAccessControlCommissioningARL() + : ReadAttribute("commissioning-arl") { } - ~ReadDescriptorClusterRevision() + ~ReadAccessControlCommissioningARL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::CommissioningARL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCommissioningARLWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.CommissioningARL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Descriptor ClusterRevision read Error", error); + LogNSError("AccessControl CommissioningARL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9349,25 +8563,25 @@ class ReadDescriptorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAccessControlCommissioningARL : public SubscribeAttribute { public: - SubscribeAttributeDescriptorClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAccessControlCommissioningARL() + : SubscribeAttribute("commissioning-arl") { } - ~SubscribeAttributeDescriptorClusterRevision() + ~SubscribeAttributeAccessControlCommissioningARL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Descriptor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Descriptor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::CommissioningARL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9378,10 +8592,10 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCommissioningARLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Descriptor.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.CommissioningARL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9394,156 +8608,69 @@ class SubscribeAttributeDescriptorClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster Binding | 0x001E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Binding | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute Binding + * Attribute Arl */ -class ReadBindingBinding : public ReadAttribute { +class ReadAccessControlArl : public ReadAttribute { public: - ReadBindingBinding() - : ReadAttribute("binding") + ReadAccessControlArl() + : ReadAttribute("arl") { } - ~ReadBindingBinding() + ~ReadAccessControlArl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Arl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRReadParams alloc] init]; if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeBindingWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.Binding response %@", [value description]); + [cluster readAttributeARLWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.ARL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding Binding read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBindingBinding : public WriteAttribute { -public: - WriteBindingBinding() - : WriteAttribute("binding") - , mComplex(&mValue) - { - AddArgument("attr-name", "binding"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteBindingBinding() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRBindingClusterTargetStruct * newElement_0; - newElement_0 = [MTRBindingClusterTargetStruct new]; - if (entry_0.node.HasValue()) { - newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; - } else { - newElement_0.node = nil; - } - if (entry_0.group.HasValue()) { - newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; - } else { - newElement_0.group = nil; - } - if (entry_0.endpoint.HasValue()) { - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; - } else { - newElement_0.endpoint = nil; - } - if (entry_0.cluster.HasValue()) { - newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; - } else { - newElement_0.cluster = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } - - [cluster writeAttributeBindingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Binding Binding write Error", error); + LogNSError("AccessControl ARL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; }; -class SubscribeAttributeBindingBinding : public SubscribeAttribute { +class SubscribeAttributeAccessControlArl : public SubscribeAttribute { public: - SubscribeAttributeBindingBinding() - : SubscribeAttribute("binding") + SubscribeAttributeAccessControlArl() + : SubscribeAttribute("arl") { } - ~SubscribeAttributeBindingBinding() + ~SubscribeAttributeAccessControlArl() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::Binding::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Arl::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9554,10 +8681,10 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBindingWithParams:params + [cluster subscribeAttributeARLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.Binding response %@", [value description]); + NSLog(@"AccessControl.ARL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9570,35 +8697,37 @@ class SubscribeAttributeBindingBinding : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadBindingGeneratedCommandList : public ReadAttribute { +class ReadAccessControlGeneratedCommandList : public ReadAttribute { public: - ReadBindingGeneratedCommandList() + ReadAccessControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBindingGeneratedCommandList() + ~ReadAccessControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.GeneratedCommandList response %@", [value description]); + NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding GeneratedCommandList read Error", error); + LogNSError("AccessControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9607,25 +8736,25 @@ class ReadBindingGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBindingGeneratedCommandList() + SubscribeAttributeAccessControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBindingGeneratedCommandList() + ~SubscribeAttributeAccessControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9639,7 +8768,7 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.GeneratedCommandList response %@", [value description]); + NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9655,32 +8784,32 @@ class SubscribeAttributeBindingGeneratedCommandList : public SubscribeAttribute /* * Attribute AcceptedCommandList */ -class ReadBindingAcceptedCommandList : public ReadAttribute { +class ReadAccessControlAcceptedCommandList : public ReadAttribute { public: - ReadBindingAcceptedCommandList() + ReadAccessControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBindingAcceptedCommandList() + ~ReadAccessControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.AcceptedCommandList response %@", [value description]); + NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding AcceptedCommandList read Error", error); + LogNSError("AccessControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9689,25 +8818,25 @@ class ReadBindingAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBindingAcceptedCommandList() + SubscribeAttributeAccessControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBindingAcceptedCommandList() + ~SubscribeAttributeAccessControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9721,7 +8850,7 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.AcceptedCommandList response %@", [value description]); + NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9739,32 +8868,32 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadBindingEventList : public ReadAttribute { +class ReadAccessControlEventList : public ReadAttribute { public: - ReadBindingEventList() + ReadAccessControlEventList() : ReadAttribute("event-list") { } - ~ReadBindingEventList() + ~ReadAccessControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.EventList response %@", [value description]); + NSLog(@"AccessControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding EventList read Error", error); + LogNSError("AccessControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9773,25 +8902,25 @@ class ReadBindingEventList : public ReadAttribute { } }; -class SubscribeAttributeBindingEventList : public SubscribeAttribute { +class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { public: - SubscribeAttributeBindingEventList() + SubscribeAttributeAccessControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBindingEventList() + ~SubscribeAttributeAccessControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9805,7 +8934,7 @@ class SubscribeAttributeBindingEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.EventList response %@", [value description]); + NSLog(@"AccessControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9823,32 +8952,32 @@ class SubscribeAttributeBindingEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadBindingAttributeList : public ReadAttribute { +class ReadAccessControlAttributeList : public ReadAttribute { public: - ReadBindingAttributeList() + ReadAccessControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBindingAttributeList() + ~ReadAccessControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.AttributeList response %@", [value description]); + NSLog(@"AccessControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding AttributeList read Error", error); + LogNSError("AccessControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9857,25 +8986,25 @@ class ReadBindingAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { +class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBindingAttributeList() + SubscribeAttributeAccessControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBindingAttributeList() + ~SubscribeAttributeAccessControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9889,7 +9018,7 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.AttributeList response %@", [value description]); + NSLog(@"AccessControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9905,32 +9034,32 @@ class SubscribeAttributeBindingAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadBindingFeatureMap : public ReadAttribute { +class ReadAccessControlFeatureMap : public ReadAttribute { public: - ReadBindingFeatureMap() + ReadAccessControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBindingFeatureMap() + ~ReadAccessControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.FeatureMap response %@", [value description]); + NSLog(@"AccessControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding FeatureMap read Error", error); + LogNSError("AccessControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -9939,25 +9068,25 @@ class ReadBindingFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBindingFeatureMap() + SubscribeAttributeAccessControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBindingFeatureMap() + ~SubscribeAttributeAccessControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -9971,7 +9100,7 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.FeatureMap response %@", [value description]); + NSLog(@"AccessControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -9987,32 +9116,32 @@ class SubscribeAttributeBindingFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadBindingClusterRevision : public ReadAttribute { +class ReadAccessControlClusterRevision : public ReadAttribute { public: - ReadBindingClusterRevision() + ReadAccessControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBindingClusterRevision() + ~ReadAccessControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.ClusterRevision response %@", [value description]); + NSLog(@"AccessControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Binding ClusterRevision read Error", error); + LogNSError("AccessControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10021,25 +9150,25 @@ class ReadBindingClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBindingClusterRevision() + SubscribeAttributeAccessControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBindingClusterRevision() + ~SubscribeAttributeAccessControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Binding::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Binding::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10053,7 +9182,7 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Binding.ClusterRevision response %@", [value description]); + NSLog(@"AccessControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10067,19 +9196,26 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster AccessControl | 0x001F | +| Cluster Actions | 0x0025 | |------------------------------------------------------------------------------| | Commands: | | -| * ReviewFabricRestrictions | 0x00 | +| * InstantAction | 0x00 | +| * InstantActionWithTransition | 0x01 | +| * StartAction | 0x02 | +| * StartActionWithDuration | 0x03 | +| * StopAction | 0x04 | +| * PauseAction | 0x05 | +| * PauseActionWithDuration | 0x06 | +| * ResumeAction | 0x07 | +| * EnableAction | 0x08 | +| * EnableActionWithDuration | 0x09 | +| * DisableAction | 0x0A | +| * DisableActionWithDuration | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * Acl | 0x0000 | -| * Extension | 0x0001 | -| * SubjectsPerAccessControlEntry | 0x0002 | -| * TargetsPerAccessControlEntry | 0x0003 | -| * AccessControlEntriesPerFabric | 0x0004 | -| * CommissioningARL | 0x0005 | -| * Arl | 0x0006 | +| * ActionList | 0x0000 | +| * EndpointLists | 0x0001 | +| * SetupURL | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -10088,449 +9224,685 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * AccessControlEntryChanged | 0x0000 | -| * AccessControlExtensionChanged | 0x0001 | -| * FabricRestrictionReviewUpdate | 0x0002 | +| * StateChanged | 0x0000 | +| * ActionFailed | 0x0001 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command ReviewFabricRestrictions + * Command InstantAction */ -class AccessControlReviewFabricRestrictions : public ClusterCommand { +class ActionsInstantAction : public ClusterCommand { public: - AccessControlReviewFabricRestrictions() - : ClusterCommand("review-fabric-restrictions") - , mComplex_Arl(&mRequest.arl) + ActionsInstantAction() + : ClusterCommand("instant-action") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Arl", &mComplex_Arl); -#endif // MTR_ENABLE_PROVISIONAL + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccessControlClusterReviewFabricRestrictionsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterInstantActionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.arl) { - MTRAccessControlClusterCommissioningAccessRestrictionEntryStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterCommissioningAccessRestrictionEntryStruct new]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.restrictions) { - MTRAccessControlClusterAccessRestrictionStruct * newElement_2; - newElement_2 = [MTRAccessControlClusterAccessRestrictionStruct new]; - newElement_2.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.type)]; - if (entry_2.id.IsNull()) { - newElement_2.id = nil; - } else { - newElement_2.id = [NSNumber numberWithUnsignedInt:entry_2.id.Value()]; - } - [array_2 addObject:newElement_2]; - } - newElement_0.restrictions = array_2; - } - [array_0 addObject:newElement_0]; - } - params.arl = array_0; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster reviewFabricRestrictionsWithParams:params completion: - ^(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster instantActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictions::Type mRequest; - TypedComplexArgument> mComplex_Arl; + chip::app::Clusters::Actions::Commands::InstantAction::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute Acl + * Command InstantActionWithTransition */ -class ReadAccessControlAcl : public ReadAttribute { +class ActionsInstantActionWithTransition : public ClusterCommand { public: - ReadAccessControlAcl() - : ReadAttribute("acl") - { - } - - ~ReadAccessControlAcl() + ActionsInstantActionWithTransition() + : ClusterCommand("instant-action-with-transition") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster instantActionWithTransitionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster readAttributeACLWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("AccessControl ACL read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type mRequest; }; -class WriteAccessControlAcl : public WriteAttribute { +/* + * Command StartAction + */ +class ActionsStartAction : public ClusterCommand { public: - WriteAccessControlAcl() - : WriteAttribute("acl") - , mComplex(&mValue) + ActionsStartAction() + : ClusterCommand("start-action") { - AddArgument("attr-name", "acl"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } - ~WriteAccessControlAcl() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterStartActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Actions::Commands::StartAction::Type mRequest; +}; + +/* + * Command StartActionWithDuration + */ +class ActionsStartActionWithDuration : public ClusterCommand { +public: + ActionsStartActionWithDuration() + : ClusterCommand("start-action-with-duration") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRAccessControlClusterAccessControlEntryStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; - newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; - newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; - if (entry_0.subjects.IsNull()) { - newElement_0.subjects = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - for (auto & entry_3 : entry_0.subjects.Value()) { - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; - [array_3 addObject:newElement_3]; - } - newElement_0.subjects = array_3; - } - } - if (entry_0.targets.IsNull()) { - newElement_0.targets = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - for (auto & entry_3 : entry_0.targets.Value()) { - MTRAccessControlClusterAccessControlTargetStruct * newElement_3; - newElement_3 = [MTRAccessControlClusterAccessControlTargetStruct new]; - if (entry_3.cluster.IsNull()) { - newElement_3.cluster = nil; - } else { - newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; - } - if (entry_3.endpoint.IsNull()) { - newElement_3.endpoint = nil; - } else { - newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; - } - if (entry_3.deviceType.IsNull()) { - newElement_3.deviceType = nil; - } else { - newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; - } - [array_3 addObject:newElement_3]; - } - newElement_0.targets = array_3; - } - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startActionWithDurationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeACLWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl ACL write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type mRequest; }; -class SubscribeAttributeAccessControlAcl : public SubscribeAttribute { +/* + * Command StopAction + */ +class ActionsStopAction : public ClusterCommand { public: - SubscribeAttributeAccessControlAcl() - : SubscribeAttribute("acl") + ActionsStopAction() + : ClusterCommand("stop-action") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeAccessControlAcl() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterStopActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Actions::Commands::StopAction::Type mRequest; +}; + +/* + * Command PauseAction + */ +class ActionsPauseAction : public ClusterCommand { +public: + ActionsPauseAction() + : ClusterCommand("pause-action") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Acl::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterPauseActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeACLWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ACL response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Actions::Commands::PauseAction::Type mRequest; }; /* - * Attribute Extension + * Command PauseActionWithDuration */ -class ReadAccessControlExtension : public ReadAttribute { +class ActionsPauseActionWithDuration : public ClusterCommand { public: - ReadAccessControlExtension() - : ReadAttribute("extension") + ActionsPauseActionWithDuration() + : ClusterCommand("pause-action-with-duration") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ClusterCommand::AddArguments(); } - ~ReadAccessControlExtension() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseActionWithDurationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type mRequest; +}; + +/* + * Command ResumeAction + */ +class ActionsResumeAction : public ClusterCommand { +public: + ActionsResumeAction() + : ClusterCommand("resume-action") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterResumeActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster readAttributeExtensionWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.Extension response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("AccessControl Extension read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Actions::Commands::ResumeAction::Type mRequest; }; -class WriteAccessControlExtension : public WriteAttribute { +/* + * Command EnableAction + */ +class ActionsEnableAction : public ClusterCommand { public: - WriteAccessControlExtension() - : WriteAttribute("extension") - , mComplex(&mValue) + ActionsEnableAction() + : ClusterCommand("enable-action") { - AddArgument("attr-name", "extension"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } - ~WriteAccessControlExtension() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterEnableActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Actions::Commands::EnableAction::Type mRequest; +}; + +/* + * Command EnableActionWithDuration + */ +class ActionsEnableActionWithDuration : public ClusterCommand { +public: + ActionsEnableActionWithDuration() + : ClusterCommand("enable-action-with-duration") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; - newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableActionWithDurationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeExtensionWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("AccessControl Extension write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type mRequest; }; -class SubscribeAttributeAccessControlExtension : public SubscribeAttribute { +/* + * Command DisableAction + */ +class ActionsDisableAction : public ClusterCommand { public: - SubscribeAttributeAccessControlExtension() - : SubscribeAttribute("extension") + ActionsDisableAction() + : ClusterCommand("disable-action") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeAccessControlExtension() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterDisableActionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster disableActionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Actions::Commands::DisableAction::Type mRequest; +}; + +/* + * Command DisableActionWithDuration + */ +class ActionsDisableActionWithDuration : public ClusterCommand { +public: + ActionsDisableActionWithDuration() + : ClusterCommand("disable-action-with-duration") { + AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); + AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Extension::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; + if (mRequest.invokeID.HasValue()) { + params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; + } else { + params.invokeID = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster disableActionWithDurationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeExtensionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.Extension response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type mRequest; }; /* - * Attribute SubjectsPerAccessControlEntry + * Attribute ActionList */ -class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { +class ReadActionsActionList : public ReadAttribute { public: - ReadAccessControlSubjectsPerAccessControlEntry() - : ReadAttribute("subjects-per-access-control-entry") + ReadActionsActionList() + : ReadAttribute("action-list") { } - ~ReadAccessControlSubjectsPerAccessControlEntry() + ~ReadActionsActionList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSubjectsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.ActionList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl SubjectsPerAccessControlEntry read Error", error); + LogNSError("Actions ActionList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10539,25 +9911,25 @@ class ReadAccessControlSubjectsPerAccessControlEntry : public ReadAttribute { } }; -class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public SubscribeAttribute { +class SubscribeAttributeActionsActionList : public SubscribeAttribute { public: - SubscribeAttributeAccessControlSubjectsPerAccessControlEntry() - : SubscribeAttribute("subjects-per-access-control-entry") + SubscribeAttributeActionsActionList() + : SubscribeAttribute("action-list") { } - ~SubscribeAttributeAccessControlSubjectsPerAccessControlEntry() + ~SubscribeAttributeActionsActionList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::SubjectsPerAccessControlEntry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10568,10 +9940,10 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSubjectsPerAccessControlEntryWithParams:params + [cluster subscribeAttributeActionListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.SubjectsPerAccessControlEntry response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.ActionList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10585,34 +9957,34 @@ class SubscribeAttributeAccessControlSubjectsPerAccessControlEntry : public Subs }; /* - * Attribute TargetsPerAccessControlEntry + * Attribute EndpointLists */ -class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { +class ReadActionsEndpointLists : public ReadAttribute { public: - ReadAccessControlTargetsPerAccessControlEntry() - : ReadAttribute("targets-per-access-control-entry") + ReadActionsEndpointLists() + : ReadAttribute("endpoint-lists") { } - ~ReadAccessControlTargetsPerAccessControlEntry() + ~ReadActionsEndpointLists() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetsPerAccessControlEntryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.EndpointLists response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl TargetsPerAccessControlEntry read Error", error); + LogNSError("Actions EndpointLists read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10621,25 +9993,25 @@ class ReadAccessControlTargetsPerAccessControlEntry : public ReadAttribute { } }; -class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public SubscribeAttribute { +class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { public: - SubscribeAttributeAccessControlTargetsPerAccessControlEntry() - : SubscribeAttribute("targets-per-access-control-entry") + SubscribeAttributeActionsEndpointLists() + : SubscribeAttribute("endpoint-lists") { } - ~SubscribeAttributeAccessControlTargetsPerAccessControlEntry() + ~SubscribeAttributeActionsEndpointLists() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::TargetsPerAccessControlEntry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10650,10 +10022,10 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetsPerAccessControlEntryWithParams:params + [cluster subscribeAttributeEndpointListsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.TargetsPerAccessControlEntry response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.EndpointLists response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10667,34 +10039,34 @@ class SubscribeAttributeAccessControlTargetsPerAccessControlEntry : public Subsc }; /* - * Attribute AccessControlEntriesPerFabric + * Attribute SetupURL */ -class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { +class ReadActionsSetupURL : public ReadAttribute { public: - ReadAccessControlAccessControlEntriesPerFabric() - : ReadAttribute("access-control-entries-per-fabric") + ReadActionsSetupURL() + : ReadAttribute("setup-url") { } - ~ReadAccessControlAccessControlEntriesPerFabric() + ~ReadActionsSetupURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAccessControlEntriesPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.SetupURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl AccessControlEntriesPerFabric read Error", error); + LogNSError("Actions SetupURL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10703,25 +10075,25 @@ class ReadAccessControlAccessControlEntriesPerFabric : public ReadAttribute { } }; -class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public SubscribeAttribute { +class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { public: - SubscribeAttributeAccessControlAccessControlEntriesPerFabric() - : SubscribeAttribute("access-control-entries-per-fabric") + SubscribeAttributeActionsSetupURL() + : SubscribeAttribute("setup-url") { } - ~SubscribeAttributeAccessControlAccessControlEntriesPerFabric() + ~SubscribeAttributeActionsSetupURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AccessControlEntriesPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10732,10 +10104,10 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAccessControlEntriesPerFabricWithParams:params + [cluster subscribeAttributeSetupURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AccessControlEntriesPerFabric response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.SetupURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10748,37 +10120,35 @@ class SubscribeAttributeAccessControlAccessControlEntriesPerFabric : public Subs } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CommissioningARL + * Attribute GeneratedCommandList */ -class ReadAccessControlCommissioningARL : public ReadAttribute { +class ReadActionsGeneratedCommandList : public ReadAttribute { public: - ReadAccessControlCommissioningARL() - : ReadAttribute("commissioning-arl") + ReadActionsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadAccessControlCommissioningARL() + ~ReadActionsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::CommissioningARL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCommissioningARLWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.CommissioningARL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl CommissioningARL read Error", error); + LogNSError("Actions GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10787,25 +10157,25 @@ class ReadAccessControlCommissioningARL : public ReadAttribute { } }; -class SubscribeAttributeAccessControlCommissioningARL : public SubscribeAttribute { +class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccessControlCommissioningARL() - : SubscribeAttribute("commissioning-arl") + SubscribeAttributeActionsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAccessControlCommissioningARL() + ~SubscribeAttributeActionsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::CommissioningARL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10816,10 +10186,10 @@ class SubscribeAttributeAccessControlCommissioningARL : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCommissioningARLWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.CommissioningARL response %@", [value description]); + NSLog(@"Actions.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10832,42 +10202,35 @@ class SubscribeAttributeAccessControlCommissioningARL : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Arl + * Attribute AcceptedCommandList */ -class ReadAccessControlArl : public ReadAttribute { +class ReadActionsAcceptedCommandList : public ReadAttribute { public: - ReadAccessControlArl() - : ReadAttribute("arl") + ReadActionsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadAccessControlArl() + ~ReadActionsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::Arl::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeARLWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ARL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl ARL read Error", error); + LogNSError("Actions AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10876,25 +10239,25 @@ class ReadAccessControlArl : public ReadAttribute { } }; -class SubscribeAttributeAccessControlArl : public SubscribeAttribute { +class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccessControlArl() - : SubscribeAttribute("arl") + SubscribeAttributeActionsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAccessControlArl() + ~SubscribeAttributeActionsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::Arl::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10905,10 +10268,10 @@ class SubscribeAttributeAccessControlArl : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeARLWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ARL response %@", [value description]); + NSLog(@"Actions.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -10921,37 +10284,37 @@ class SubscribeAttributeAccessControlArl : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadAccessControlGeneratedCommandList : public ReadAttribute { +class ReadActionsEventList : public ReadAttribute { public: - ReadAccessControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadActionsEventList() + : ReadAttribute("event-list") { } - ~ReadAccessControlGeneratedCommandList() + ~ReadActionsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl GeneratedCommandList read Error", error); + LogNSError("Actions EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -10960,25 +10323,25 @@ class ReadAccessControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeActionsEventList : public SubscribeAttribute { public: - SubscribeAttributeAccessControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeActionsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAccessControlGeneratedCommandList() + ~SubscribeAttributeActionsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -10989,10 +10352,10 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.GeneratedCommandList response %@", [value description]); + NSLog(@"Actions.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11005,35 +10368,37 @@ class SubscribeAttributeAccessControlGeneratedCommandList : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadAccessControlAcceptedCommandList : public ReadAttribute { +class ReadActionsAttributeList : public ReadAttribute { public: - ReadAccessControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadActionsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadAccessControlAcceptedCommandList() + ~ReadActionsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl AcceptedCommandList read Error", error); + LogNSError("Actions AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -11042,25 +10407,25 @@ class ReadAccessControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAccessControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeActionsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAccessControlAcceptedCommandList() + ~SubscribeAttributeActionsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -11071,10 +10436,10 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AcceptedCommandList response %@", [value description]); + NSLog(@"Actions.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11087,37 +10452,35 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadAccessControlEventList : public ReadAttribute { +class ReadActionsFeatureMap : public ReadAttribute { public: - ReadAccessControlEventList() - : ReadAttribute("event-list") + ReadActionsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadAccessControlEventList() + ~ReadActionsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl EventList read Error", error); + LogNSError("Actions FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -11126,25 +10489,25 @@ class ReadAccessControlEventList : public ReadAttribute { } }; -class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { +class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAccessControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeActionsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAccessControlEventList() + ~SubscribeAttributeActionsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -11155,10 +10518,10 @@ class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11171,37 +10534,35 @@ class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadAccessControlAttributeList : public ReadAttribute { +class ReadActionsClusterRevision : public ReadAttribute { public: - ReadAccessControlAttributeList() - : ReadAttribute("attribute-list") + ReadActionsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadAccessControlAttributeList() + ~ReadActionsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl AttributeList read Error", error); + LogNSError("Actions ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -11210,25 +10571,25 @@ class ReadAccessControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAccessControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeActionsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAccessControlAttributeList() + ~SubscribeAttributeActionsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -11239,10 +10600,10 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11255,35 +10616,79 @@ class SubscribeAttributeAccessControlAttributeList : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster BasicInformation | 0x0028 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MfgSpecificPing | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DataModelRevision | 0x0000 | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * ProductID | 0x0004 | +| * NodeLabel | 0x0005 | +| * Location | 0x0006 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * LocalConfigDisabled | 0x0010 | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * CapabilityMinima | 0x0013 | +| * ProductAppearance | 0x0014 | +| * SpecificationVersion | 0x0015 | +| * MaxPathsPerInvoke | 0x0016 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute FeatureMap + * Attribute DataModelRevision */ -class ReadAccessControlFeatureMap : public ReadAttribute { +class ReadBasicInformationDataModelRevision : public ReadAttribute { public: - ReadAccessControlFeatureMap() - : ReadAttribute("feature-map") + ReadBasicInformationDataModelRevision() + : ReadAttribute("data-model-revision") { } - ~ReadAccessControlFeatureMap() + ~ReadBasicInformationDataModelRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl FeatureMap read Error", error); + LogNSError("BasicInformation DataModelRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -11292,25 +10697,25 @@ class ReadAccessControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttribute { public: - SubscribeAttributeAccessControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBasicInformationDataModelRevision() + : SubscribeAttribute("data-model-revision") { } - ~SubscribeAttributeAccessControlFeatureMap() + ~SubscribeAttributeBasicInformationDataModelRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -11321,10 +10726,10 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDataModelRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.FeatureMap response %@", [value description]); + NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11338,34 +10743,34 @@ class SubscribeAttributeAccessControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute VendorName */ -class ReadAccessControlClusterRevision : public ReadAttribute { +class ReadBasicInformationVendorName : public ReadAttribute { public: - ReadAccessControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadBasicInformationVendorName() + : ReadAttribute("vendor-name") { } - ~ReadAccessControlClusterRevision() + ~ReadBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccessControl ClusterRevision read Error", error); + LogNSError("BasicInformation VendorName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -11374,25 +10779,25 @@ class ReadAccessControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { public: - SubscribeAttributeAccessControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBasicInformationVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeAccessControlClusterRevision() + ~SubscribeAttributeBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccessControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccessControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -11403,10 +10808,10 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccessControl.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -11419,741 +10824,472 @@ class SubscribeAttributeAccessControlClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster Actions | 0x0025 | -|------------------------------------------------------------------------------| -| Commands: | | -| * InstantAction | 0x00 | -| * InstantActionWithTransition | 0x01 | -| * StartAction | 0x02 | -| * StartActionWithDuration | 0x03 | -| * StopAction | 0x04 | -| * PauseAction | 0x05 | -| * PauseActionWithDuration | 0x06 | -| * ResumeAction | 0x07 | -| * EnableAction | 0x08 | -| * EnableActionWithDuration | 0x09 | -| * DisableAction | 0x0A | -| * DisableActionWithDuration | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActionList | 0x0000 | -| * EndpointLists | 0x0001 | -| * SetupURL | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChanged | 0x0000 | -| * ActionFailed | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command InstantAction + * Attribute VendorID */ -class ActionsInstantAction : public ClusterCommand { +class ReadBasicInformationVendorID : public ReadAttribute { public: - ActionsInstantAction() - : ClusterCommand("instant-action") + ReadBasicInformationVendorID() + : ReadAttribute("vendor-id") + { + } + + ~ReadBasicInformationVendorID() { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterInstantActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster instantActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::InstantAction::Type mRequest; }; -/* - * Command InstantActionWithTransition - */ -class ActionsInstantActionWithTransition : public ClusterCommand { +class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { public: - ActionsInstantActionWithTransition() - : ClusterCommand("instant-action-with-transition") + SubscribeAttributeBasicInformationVendorID() + : SubscribeAttribute("vendor-id") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeBasicInformationVendorID() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster instantActionWithTransitionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeVendorIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type mRequest; }; /* - * Command StartAction + * Attribute ProductName */ -class ActionsStartAction : public ClusterCommand { +class ReadBasicInformationProductName : public ReadAttribute { public: - ActionsStartAction() - : ClusterCommand("start-action") + ReadBasicInformationProductName() + : ReadAttribute("product-name") + { + } + + ~ReadBasicInformationProductName() { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterStartActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::StartAction::Type mRequest; }; -/* - * Command StartActionWithDuration - */ -class ActionsStartActionWithDuration : public ClusterCommand { +class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute { public: - ActionsStartActionWithDuration() - : ClusterCommand("start-action-with-duration") + SubscribeAttributeBasicInformationProductName() + : SubscribeAttribute("product-name") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeBasicInformationProductName() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StartActionWithDuration::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startActionWithDurationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeProductNameWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::StartActionWithDuration::Type mRequest; }; /* - * Command StopAction + * Attribute ProductID */ -class ActionsStopAction : public ClusterCommand { +class ReadBasicInformationProductID : public ReadAttribute { public: - ActionsStopAction() - : ClusterCommand("stop-action") + ReadBasicInformationProductID() + : ReadAttribute("product-id") + { + } + + ~ReadBasicInformationProductID() { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::StopAction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterStopActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::StopAction::Type mRequest; }; -/* - * Command PauseAction - */ -class ActionsPauseAction : public ClusterCommand { +class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { public: - ActionsPauseAction() - : ClusterCommand("pause-action") + SubscribeAttributeBasicInformationProductID() + : SubscribeAttribute("product-id") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeBasicInformationProductID() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseAction::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterPauseActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeProductIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::PauseAction::Type mRequest; }; /* - * Command PauseActionWithDuration + * Attribute NodeLabel */ -class ActionsPauseActionWithDuration : public ClusterCommand { +class ReadBasicInformationNodeLabel : public ReadAttribute { public: - ActionsPauseActionWithDuration() - : ClusterCommand("pause-action-with-duration") + ReadBasicInformationNodeLabel() + : ReadAttribute("node-label") + { + } + + ~ReadBasicInformationNodeLabel() { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseActionWithDurationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type mRequest; }; -/* - * Command ResumeAction - */ -class ActionsResumeAction : public ClusterCommand { +class WriteBasicInformationNodeLabel : public WriteAttribute { public: - ActionsResumeAction() - : ClusterCommand("resume-action") + WriteBasicInformationNodeLabel() + : WriteAttribute("node-label") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "node-label"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~WriteBasicInformationNodeLabel() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::ResumeAction::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterResumeActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::Actions::Commands::ResumeAction::Type mRequest; + chip::ByteSpan mValue; }; -/* - * Command EnableAction - */ -class ActionsEnableAction : public ClusterCommand { +class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { public: - ActionsEnableAction() - : ClusterCommand("enable-action") + SubscribeAttributeBasicInformationNodeLabel() + : SubscribeAttribute("node-label") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeBasicInformationNodeLabel() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableAction::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterEnableActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enableActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNodeLabelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::EnableAction::Type mRequest; }; /* - * Command EnableActionWithDuration + * Attribute Location */ -class ActionsEnableActionWithDuration : public ClusterCommand { +class ReadBasicInformationLocation : public ReadAttribute { public: - ActionsEnableActionWithDuration() - : ClusterCommand("enable-action-with-duration") + ReadBasicInformationLocation() + : ReadAttribute("location") + { + } + + ~ReadBasicInformationLocation() { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enableActionWithDurationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Location response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation Location read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type mRequest; }; -/* - * Command DisableAction - */ -class ActionsDisableAction : public ClusterCommand { +class WriteBasicInformationLocation : public WriteAttribute { public: - ActionsDisableAction() - : ClusterCommand("disable-action") + WriteBasicInformationLocation() + : WriteAttribute("location") { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "location"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~WriteBasicInformationLocation() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableAction::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterDisableActionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster disableActionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Actions::Commands::DisableAction::Type mRequest; -}; - -/* - * Command DisableActionWithDuration - */ -class ActionsDisableActionWithDuration : public ClusterCommand { -public: - ActionsDisableActionWithDuration() - : ClusterCommand("disable-action-with-duration") - { - AddArgument("ActionID", 0, UINT16_MAX, &mRequest.actionID); - AddArgument("InvokeID", 0, UINT32_MAX, &mRequest.invokeID); - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); - ClusterCommand::AddArguments(); - } + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.actionID = [NSNumber numberWithUnsignedShort:mRequest.actionID]; - if (mRequest.invokeID.HasValue()) { - params.invokeID = [NSNumber numberWithUnsignedInt:mRequest.invokeID.Value()]; - } else { - params.invokeID = nil; - } - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster disableActionWithDurationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type mRequest; -}; - -/* - * Attribute ActionList - */ -class ReadActionsActionList : public ReadAttribute { -public: - ReadActionsActionList() - : ReadAttribute("action-list") - { - } - - ~ReadActionsActionList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActionListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ActionList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Actions ActionList read Error", error); + [cluster writeAttributeLocationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation Location write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::ByteSpan mValue; }; -class SubscribeAttributeActionsActionList : public SubscribeAttribute { +class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { public: - SubscribeAttributeActionsActionList() - : SubscribeAttribute("action-list") + SubscribeAttributeBasicInformationLocation() + : SubscribeAttribute("location") { } - ~SubscribeAttributeActionsActionList() + ~SubscribeAttributeBasicInformationLocation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ActionList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12164,10 +11300,10 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActionListWithParams:params + [cluster subscribeAttributeLocationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ActionList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Location response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12181,34 +11317,34 @@ class SubscribeAttributeActionsActionList : public SubscribeAttribute { }; /* - * Attribute EndpointLists + * Attribute HardwareVersion */ -class ReadActionsEndpointLists : public ReadAttribute { +class ReadBasicInformationHardwareVersion : public ReadAttribute { public: - ReadActionsEndpointLists() - : ReadAttribute("endpoint-lists") + ReadBasicInformationHardwareVersion() + : ReadAttribute("hardware-version") { } - ~ReadActionsEndpointLists() + ~ReadBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndpointListsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EndpointLists response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions EndpointLists read Error", error); + LogNSError("BasicInformation HardwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12217,25 +11353,25 @@ class ReadActionsEndpointLists : public ReadAttribute { } }; -class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { +class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttribute { public: - SubscribeAttributeActionsEndpointLists() - : SubscribeAttribute("endpoint-lists") + SubscribeAttributeBasicInformationHardwareVersion() + : SubscribeAttribute("hardware-version") { } - ~SubscribeAttributeActionsEndpointLists() + ~SubscribeAttributeBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EndpointLists::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12246,10 +11382,10 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndpointListsWithParams:params + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EndpointLists response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12263,34 +11399,34 @@ class SubscribeAttributeActionsEndpointLists : public SubscribeAttribute { }; /* - * Attribute SetupURL + * Attribute HardwareVersionString */ -class ReadActionsSetupURL : public ReadAttribute { +class ReadBasicInformationHardwareVersionString : public ReadAttribute { public: - ReadActionsSetupURL() - : ReadAttribute("setup-url") + ReadBasicInformationHardwareVersionString() + : ReadAttribute("hardware-version-string") { } - ~ReadActionsSetupURL() + ~ReadBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetupURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.SetupURL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions SetupURL read Error", error); + LogNSError("BasicInformation HardwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12299,25 +11435,25 @@ class ReadActionsSetupURL : public ReadAttribute { } }; -class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { +class SubscribeAttributeBasicInformationHardwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeActionsSetupURL() - : SubscribeAttribute("setup-url") + SubscribeAttributeBasicInformationHardwareVersionString() + : SubscribeAttribute("hardware-version-string") { } - ~SubscribeAttributeActionsSetupURL() + ~SubscribeAttributeBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::SetupURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12328,10 +11464,10 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetupURLWithParams:params + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.SetupURL response %@", [value description]); + NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12345,34 +11481,34 @@ class SubscribeAttributeActionsSetupURL : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute SoftwareVersion */ -class ReadActionsGeneratedCommandList : public ReadAttribute { +class ReadBasicInformationSoftwareVersion : public ReadAttribute { public: - ReadActionsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBasicInformationSoftwareVersion() + : ReadAttribute("software-version") { } - ~ReadActionsGeneratedCommandList() + ~ReadBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions GeneratedCommandList read Error", error); + LogNSError("BasicInformation SoftwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12381,25 +11517,25 @@ class ReadActionsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttribute { public: - SubscribeAttributeActionsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBasicInformationSoftwareVersion() + : SubscribeAttribute("software-version") { } - ~SubscribeAttributeActionsGeneratedCommandList() + ~SubscribeAttributeBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12410,10 +11546,10 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12427,34 +11563,34 @@ class SubscribeAttributeActionsGeneratedCommandList : public SubscribeAttribute }; /* - * Attribute AcceptedCommandList + * Attribute SoftwareVersionString */ -class ReadActionsAcceptedCommandList : public ReadAttribute { +class ReadBasicInformationSoftwareVersionString : public ReadAttribute { public: - ReadActionsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBasicInformationSoftwareVersionString() + : ReadAttribute("software-version-string") { } - ~ReadActionsAcceptedCommandList() + ~ReadBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions AcceptedCommandList read Error", error); + LogNSError("BasicInformation SoftwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12463,25 +11599,25 @@ class ReadActionsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBasicInformationSoftwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeActionsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBasicInformationSoftwareVersionString() + : SubscribeAttribute("software-version-string") { } - ~SubscribeAttributeActionsAcceptedCommandList() + ~SubscribeAttributeBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12492,10 +11628,10 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12508,37 +11644,35 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ManufacturingDate */ -class ReadActionsEventList : public ReadAttribute { +class ReadBasicInformationManufacturingDate : public ReadAttribute { public: - ReadActionsEventList() - : ReadAttribute("event-list") + ReadBasicInformationManufacturingDate() + : ReadAttribute("manufacturing-date") { } - ~ReadActionsEventList() + ~ReadBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions EventList read Error", error); + LogNSError("BasicInformation ManufacturingDate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12547,25 +11681,25 @@ class ReadActionsEventList : public ReadAttribute { } }; -class SubscribeAttributeActionsEventList : public SubscribeAttribute { +class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttribute { public: - SubscribeAttributeActionsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBasicInformationManufacturingDate() + : SubscribeAttribute("manufacturing-date") { } - ~SubscribeAttributeActionsEventList() + ~SubscribeAttributeBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12576,10 +11710,10 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.EventList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12592,37 +11726,35 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute PartNumber */ -class ReadActionsAttributeList : public ReadAttribute { +class ReadBasicInformationPartNumber : public ReadAttribute { public: - ReadActionsAttributeList() - : ReadAttribute("attribute-list") + ReadBasicInformationPartNumber() + : ReadAttribute("part-number") { } - ~ReadActionsAttributeList() + ~ReadBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions AttributeList read Error", error); + LogNSError("BasicInformation PartNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12631,25 +11763,25 @@ class ReadActionsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { +class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { public: - SubscribeAttributeActionsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBasicInformationPartNumber() + : SubscribeAttribute("part-number") { } - ~SubscribeAttributeActionsAttributeList() + ~SubscribeAttributeBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12660,10 +11792,10 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12677,34 +11809,34 @@ class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute ProductURL */ -class ReadActionsFeatureMap : public ReadAttribute { +class ReadBasicInformationProductURL : public ReadAttribute { public: - ReadActionsFeatureMap() - : ReadAttribute("feature-map") + ReadBasicInformationProductURL() + : ReadAttribute("product-url") { } - ~ReadActionsFeatureMap() + ~ReadBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions FeatureMap read Error", error); + LogNSError("BasicInformation ProductURL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12713,25 +11845,25 @@ class ReadActionsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { public: - SubscribeAttributeActionsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBasicInformationProductURL() + : SubscribeAttribute("product-url") { } - ~SubscribeAttributeActionsFeatureMap() + ~SubscribeAttributeBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12742,10 +11874,10 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12759,34 +11891,34 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute ProductLabel */ -class ReadActionsClusterRevision : public ReadAttribute { +class ReadBasicInformationProductLabel : public ReadAttribute { public: - ReadActionsClusterRevision() - : ReadAttribute("cluster-revision") + ReadBasicInformationProductLabel() + : ReadAttribute("product-label") { } - ~ReadActionsClusterRevision() + ~ReadBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions ClusterRevision read Error", error); + LogNSError("BasicInformation ProductLabel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12795,25 +11927,25 @@ class ReadActionsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute { public: - SubscribeAttributeActionsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBasicInformationProductLabel() + : SubscribeAttribute("product-label") { } - ~SubscribeAttributeActionsClusterRevision() + ~SubscribeAttributeBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -12824,10 +11956,10 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12840,79 +11972,35 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster BasicInformation | 0x0028 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MfgSpecificPing | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * DataModelRevision | 0x0000 | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * ProductID | 0x0004 | -| * NodeLabel | 0x0005 | -| * Location | 0x0006 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * LocalConfigDisabled | 0x0010 | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * CapabilityMinima | 0x0013 | -| * ProductAppearance | 0x0014 | -| * SpecificationVersion | 0x0015 | -| * MaxPathsPerInvoke | 0x0016 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute DataModelRevision + * Attribute SerialNumber */ -class ReadBasicInformationDataModelRevision : public ReadAttribute { +class ReadBasicInformationSerialNumber : public ReadAttribute { public: - ReadBasicInformationDataModelRevision() - : ReadAttribute("data-model-revision") + ReadBasicInformationSerialNumber() + : ReadAttribute("serial-number") { } - ~ReadBasicInformationDataModelRevision() + ~ReadBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation DataModelRevision read Error", error); + LogNSError("BasicInformation SerialNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -12921,21 +12009,21 @@ class ReadBasicInformationDataModelRevision : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttribute { +class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationDataModelRevision() - : SubscribeAttribute("data-model-revision") + SubscribeAttributeBasicInformationSerialNumber() + : SubscribeAttribute("serial-number") { } - ~SubscribeAttributeBasicInformationDataModelRevision() + ~SubscribeAttributeBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -12950,10 +12038,10 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDataModelRevisionWithParams:params + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -12967,34 +12055,34 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr }; /* - * Attribute VendorName + * Attribute LocalConfigDisabled */ -class ReadBasicInformationVendorName : public ReadAttribute { +class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { public: - ReadBasicInformationVendorName() - : ReadAttribute("vendor-name") + ReadBasicInformationLocalConfigDisabled() + : ReadAttribute("local-config-disabled") { } - ~ReadBasicInformationVendorName() + ~ReadBasicInformationLocalConfigDisabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorName response %@", [value description]); + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation VendorName read Error", error); + LogNSError("BasicInformation LocalConfigDisabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13003,21 +12091,62 @@ class ReadBasicInformationVendorName : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { +class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { public: - SubscribeAttributeBasicInformationVendorName() - : SubscribeAttribute("vendor-name") + WriteBasicInformationLocalConfigDisabled() + : WriteAttribute("local-config-disabled") { + AddArgument("attr-name", "local-config-disabled"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBasicInformationVendorName() + ~WriteBasicInformationLocalConfigDisabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeLocalConfigDisabledWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation LocalConfigDisabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationLocalConfigDisabled() + : SubscribeAttribute("local-config-disabled") + { + } + + ~SubscribeAttributeBasicInformationLocalConfigDisabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13032,10 +12161,10 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeLocalConfigDisabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13049,34 +12178,34 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { }; /* - * Attribute VendorID + * Attribute Reachable */ -class ReadBasicInformationVendorID : public ReadAttribute { +class ReadBasicInformationReachable : public ReadAttribute { public: - ReadBasicInformationVendorID() - : ReadAttribute("vendor-id") + ReadBasicInformationReachable() + : ReadAttribute("reachable") { } - ~ReadBasicInformationVendorID() + ~ReadBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorID response %@", [value description]); + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation VendorID read Error", error); + LogNSError("BasicInformation Reachable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13085,21 +12214,21 @@ class ReadBasicInformationVendorID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { +class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeBasicInformationReachable() + : SubscribeAttribute("reachable") { } - ~SubscribeAttributeBasicInformationVendorID() + ~SubscribeAttributeBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13114,10 +12243,10 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeReachableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorID response %@", [value description]); + NSLog(@"BasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13131,34 +12260,34 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { }; /* - * Attribute ProductName + * Attribute UniqueID */ -class ReadBasicInformationProductName : public ReadAttribute { +class ReadBasicInformationUniqueID : public ReadAttribute { public: - ReadBasicInformationProductName() - : ReadAttribute("product-name") + ReadBasicInformationUniqueID() + : ReadAttribute("unique-id") { } - ~ReadBasicInformationProductName() + ~ReadBasicInformationUniqueID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductName response %@", [value description]); + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.UniqueID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductName read Error", error); + LogNSError("BasicInformation UniqueID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13167,21 +12296,21 @@ class ReadBasicInformationProductName : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute { +class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductName() - : SubscribeAttribute("product-name") + SubscribeAttributeBasicInformationUniqueID() + : SubscribeAttribute("unique-id") { } - ~SubscribeAttributeBasicInformationProductName() + ~SubscribeAttributeBasicInformationUniqueID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13196,10 +12325,10 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductNameWithParams:params + [cluster subscribeAttributeUniqueIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductName response %@", [value description]); + NSLog(@"BasicInformation.UniqueID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13213,34 +12342,34 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute }; /* - * Attribute ProductID + * Attribute CapabilityMinima */ -class ReadBasicInformationProductID : public ReadAttribute { +class ReadBasicInformationCapabilityMinima : public ReadAttribute { public: - ReadBasicInformationProductID() - : ReadAttribute("product-id") + ReadBasicInformationCapabilityMinima() + : ReadAttribute("capability-minima") { } - ~ReadBasicInformationProductID() + ~ReadBasicInformationCapabilityMinima() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductID response %@", [value description]); + [cluster readAttributeCapabilityMinimaWithCompletion:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductID read Error", error); + LogNSError("BasicInformation CapabilityMinima read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13249,21 +12378,21 @@ class ReadBasicInformationProductID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { +class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeBasicInformationCapabilityMinima() + : SubscribeAttribute("capability-minima") { } - ~SubscribeAttributeBasicInformationProductID() + ~SubscribeAttributeBasicInformationCapabilityMinima() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13278,10 +12407,10 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeCapabilityMinimaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductID response %@", [value description]); + reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13295,98 +12424,57 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { }; /* - * Attribute NodeLabel + * Attribute ProductAppearance */ -class ReadBasicInformationNodeLabel : public ReadAttribute { +class ReadBasicInformationProductAppearance : public ReadAttribute { public: - ReadBasicInformationNodeLabel() - : ReadAttribute("node-label") + ReadBasicInformationProductAppearance() + : ReadAttribute("product-appearance") { } - ~ReadBasicInformationNodeLabel() + ~ReadBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + [cluster readAttributeProductAppearanceWithCompletion:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation NodeLabel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBasicInformationNodeLabel : public WriteAttribute { -public: - WriteBasicInformationNodeLabel() - : WriteAttribute("node-label") - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBasicInformationNodeLabel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BasicInformation NodeLabel write Error", error); + LogNSError("BasicInformation ProductAppearance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { +class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationNodeLabel() - : SubscribeAttribute("node-label") + SubscribeAttributeBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") { } - ~SubscribeAttributeBasicInformationNodeLabel() + ~SubscribeAttributeBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13401,10 +12489,10 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNodeLabelWithParams:params + [cluster subscribeAttributeProductAppearanceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13417,99 +12505,60 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Location + * Attribute SpecificationVersion */ -class ReadBasicInformationLocation : public ReadAttribute { +class ReadBasicInformationSpecificationVersion : public ReadAttribute { public: - ReadBasicInformationLocation() - : ReadAttribute("location") + ReadBasicInformationSpecificationVersion() + : ReadAttribute("specification-version") { } - ~ReadBasicInformationLocation() + ~ReadBasicInformationSpecificationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Location response %@", [value description]); + [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation Location read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBasicInformationLocation : public WriteAttribute { -public: - WriteBasicInformationLocation() - : WriteAttribute("location") - { - AddArgument("attr-name", "location"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBasicInformationLocation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLocationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BasicInformation Location write Error", error); + LogNSError("BasicInformation SpecificationVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { +class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationLocation() - : SubscribeAttribute("location") + SubscribeAttributeBasicInformationSpecificationVersion() + : SubscribeAttribute("specification-version") { } - ~SubscribeAttributeBasicInformationLocation() + ~SubscribeAttributeBasicInformationSpecificationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13524,10 +12573,10 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocationWithParams:params + [cluster subscribeAttributeSpecificationVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Location response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13540,35 +12589,38 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute HardwareVersion + * Attribute MaxPathsPerInvoke */ -class ReadBasicInformationHardwareVersion : public ReadAttribute { +class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { public: - ReadBasicInformationHardwareVersion() - : ReadAttribute("hardware-version") + ReadBasicInformationMaxPathsPerInvoke() + : ReadAttribute("max-paths-per-invoke") { } - ~ReadBasicInformationHardwareVersion() + ~ReadBasicInformationMaxPathsPerInvoke() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation HardwareVersion read Error", error); + LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13577,21 +12629,21 @@ class ReadBasicInformationHardwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttribute { +class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationHardwareVersion() - : SubscribeAttribute("hardware-version") + SubscribeAttributeBasicInformationMaxPathsPerInvoke() + : SubscribeAttribute("max-paths-per-invoke") { } - ~SubscribeAttributeBasicInformationHardwareVersion() + ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13606,10 +12658,10 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionWithParams:params + [cluster subscribeAttributeMaxPathsPerInvokeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13622,35 +12674,37 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute HardwareVersionString + * Attribute GeneratedCommandList */ -class ReadBasicInformationHardwareVersionString : public ReadAttribute { +class ReadBasicInformationGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationHardwareVersionString() - : ReadAttribute("hardware-version-string") + ReadBasicInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationHardwareVersionString() + ~ReadBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation HardwareVersionString read Error", error); + LogNSError("BasicInformation GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13659,21 +12713,21 @@ class ReadBasicInformationHardwareVersionString : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationHardwareVersionString : public SubscribeAttribute { +class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationHardwareVersionString() - : SubscribeAttribute("hardware-version-string") + SubscribeAttributeBasicInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationHardwareVersionString() + ~SubscribeAttributeBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13688,10 +12742,10 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13705,34 +12759,34 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe }; /* - * Attribute SoftwareVersion + * Attribute AcceptedCommandList */ -class ReadBasicInformationSoftwareVersion : public ReadAttribute { +class ReadBasicInformationAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationSoftwareVersion() - : ReadAttribute("software-version") + ReadBasicInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationSoftwareVersion() + ~ReadBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SoftwareVersion read Error", error); + LogNSError("BasicInformation AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13741,21 +12795,21 @@ class ReadBasicInformationSoftwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttribute { +class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSoftwareVersion() - : SubscribeAttribute("software-version") + SubscribeAttributeBasicInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationSoftwareVersion() + ~SubscribeAttributeBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13770,10 +12824,10 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13786,35 +12840,37 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SoftwareVersionString + * Attribute EventList */ -class ReadBasicInformationSoftwareVersionString : public ReadAttribute { +class ReadBasicInformationEventList : public ReadAttribute { public: - ReadBasicInformationSoftwareVersionString() - : ReadAttribute("software-version-string") + ReadBasicInformationEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationSoftwareVersionString() + ~ReadBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SoftwareVersionString read Error", error); + LogNSError("BasicInformation EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13823,21 +12879,21 @@ class ReadBasicInformationSoftwareVersionString : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSoftwareVersionString : public SubscribeAttribute { +class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSoftwareVersionString() - : SubscribeAttribute("software-version-string") + SubscribeAttributeBasicInformationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationSoftwareVersionString() + ~SubscribeAttributeBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13852,10 +12908,10 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13868,35 +12924,37 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ManufacturingDate + * Attribute AttributeList */ -class ReadBasicInformationManufacturingDate : public ReadAttribute { +class ReadBasicInformationAttributeList : public ReadAttribute { public: - ReadBasicInformationManufacturingDate() - : ReadAttribute("manufacturing-date") + ReadBasicInformationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBasicInformationManufacturingDate() + ~ReadBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ManufacturingDate read Error", error); + LogNSError("BasicInformation AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13905,21 +12963,21 @@ class ReadBasicInformationManufacturingDate : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttribute { +class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationManufacturingDate() - : SubscribeAttribute("manufacturing-date") + SubscribeAttributeBasicInformationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationManufacturingDate() + ~SubscribeAttributeBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -13934,10 +12992,10 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeManufacturingDateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -13951,34 +13009,34 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr }; /* - * Attribute PartNumber + * Attribute FeatureMap */ -class ReadBasicInformationPartNumber : public ReadAttribute { +class ReadBasicInformationFeatureMap : public ReadAttribute { public: - ReadBasicInformationPartNumber() - : ReadAttribute("part-number") + ReadBasicInformationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBasicInformationPartNumber() + ~ReadBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.PartNumber response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation PartNumber read Error", error); + LogNSError("BasicInformation FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -13987,21 +13045,21 @@ class ReadBasicInformationPartNumber : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { +class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationPartNumber() - : SubscribeAttribute("part-number") + SubscribeAttributeBasicInformationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationPartNumber() + ~SubscribeAttributeBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -14016,10 +13074,10 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartNumberWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.PartNumber response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14033,34 +13091,34 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { }; /* - * Attribute ProductURL + * Attribute ClusterRevision */ -class ReadBasicInformationProductURL : public ReadAttribute { +class ReadBasicInformationClusterRevision : public ReadAttribute { public: - ReadBasicInformationProductURL() - : ReadAttribute("product-url") + ReadBasicInformationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationProductURL() + ~ReadBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductURL response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductURL read Error", error); + LogNSError("BasicInformation ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14069,21 +13127,21 @@ class ReadBasicInformationProductURL : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { +class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductURL() - : SubscribeAttribute("product-url") + SubscribeAttributeBasicInformationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationProductURL() + ~SubscribeAttributeBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -14098,10 +13156,10 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductURLWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductURL response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14114,35 +13172,251 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster OtaSoftwareUpdateProvider | 0x0029 | +|------------------------------------------------------------------------------| +| Commands: | | +| * QueryImage | 0x00 | +| * ApplyUpdateRequest | 0x02 | +| * NotifyUpdateApplied | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ProductLabel + * Command QueryImage */ -class ReadBasicInformationProductLabel : public ReadAttribute { +class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { public: - ReadBasicInformationProductLabel() - : ReadAttribute("product-label") + OtaSoftwareUpdateProviderQueryImage() + : ClusterCommand("query-image") + , mComplex_ProtocolsSupported(&mRequest.protocolsSupported) { + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); + AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); + AddArgument("Location", &mRequest.location); + AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); + AddArgument("MetadataForProvider", &mRequest.metadataForProvider); + ClusterCommand::AddArguments(); } - ~ReadBasicInformationProductLabel() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; + params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.protocolsSupported) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + params.protocolsSupported = array_0; + } + if (mRequest.hardwareVersion.HasValue()) { + params.hardwareVersion = [NSNumber numberWithUnsignedShort:mRequest.hardwareVersion.Value()]; + } else { + params.hardwareVersion = nil; + } + if (mRequest.location.HasValue()) { + params.location = [[NSString alloc] initWithBytes:mRequest.location.Value().data() length:mRequest.location.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.location = nil; + } + if (mRequest.requestorCanConsent.HasValue()) { + params.requestorCanConsent = [NSNumber numberWithBool:mRequest.requestorCanConsent.Value()]; + } else { + params.requestorCanConsent = nil; + } + if (mRequest.metadataForProvider.HasValue()) { + params.metadataForProvider = [NSData dataWithBytes:mRequest.metadataForProvider.Value().data() length:mRequest.metadataForProvider.Value().size()]; + } else { + params.metadataForProvider = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster queryImageWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; + TypedComplexArgument> mComplex_ProtocolsSupported; +}; + +/* + * Command ApplyUpdateRequest + */ +class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { +public: + OtaSoftwareUpdateProviderApplyUpdateRequest() + : ClusterCommand("apply-update-request") { + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; + params.newVersion = [NSNumber numberWithUnsignedInt:mRequest.newVersion]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster applyUpdateRequestWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; +}; + +/* + * Command NotifyUpdateApplied + */ +class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { +public: + OtaSoftwareUpdateProviderNotifyUpdateApplied() + : ClusterCommand("notify-update-applied") + { + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; + params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster notifyUpdateAppliedWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadOtaSoftwareUpdateProviderGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductLabel read Error", error); + LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14151,25 +13425,25 @@ class ReadBasicInformationProductLabel : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductLabel() - : SubscribeAttribute("product-label") + SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationProductLabel() + ~SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14180,10 +13454,10 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductLabelWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14197,34 +13471,34 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute }; /* - * Attribute SerialNumber + * Attribute AcceptedCommandList */ -class ReadBasicInformationSerialNumber : public ReadAttribute { +class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationSerialNumber() - : ReadAttribute("serial-number") + ReadOtaSoftwareUpdateProviderAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationSerialNumber() + ~ReadOtaSoftwareUpdateProviderAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SerialNumber read Error", error); + LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14233,25 +13507,25 @@ class ReadBasicInformationSerialNumber : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSerialNumber() - : SubscribeAttribute("serial-number") + SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationSerialNumber() + ~SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14262,10 +13536,10 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSerialNumberWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14278,35 +13552,37 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute LocalConfigDisabled + * Attribute EventList */ -class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { +class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { public: - ReadBasicInformationLocalConfigDisabled() - : ReadAttribute("local-config-disabled") + ReadOtaSoftwareUpdateProviderEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationLocalConfigDisabled() + ~ReadOtaSoftwareUpdateProviderEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation LocalConfigDisabled read Error", error); + LogNSError("OTASoftwareUpdateProvider EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14315,66 +13591,109 @@ class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { } }; -class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { public: - WriteBasicInformationLocalConfigDisabled() - : WriteAttribute("local-config-disabled") + SubscribeAttributeOtaSoftwareUpdateProviderEventList() + : SubscribeAttribute("event-list") { - AddArgument("attr-name", "local-config-disabled"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBasicInformationLocalConfigDisabled() + ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeLocalConfigDisabledWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BasicInformation LocalConfigDisabled write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute AttributeList + */ +class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadOtaSoftwareUpdateProviderAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationLocalConfigDisabled() - : SubscribeAttribute("local-config-disabled") + SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationLocalConfigDisabled() + ~SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14385,10 +13704,10 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalConfigDisabledWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14402,34 +13721,34 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt }; /* - * Attribute Reachable + * Attribute FeatureMap */ -class ReadBasicInformationReachable : public ReadAttribute { +class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { public: - ReadBasicInformationReachable() - : ReadAttribute("reachable") + ReadOtaSoftwareUpdateProviderFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBasicInformationReachable() + ~ReadOtaSoftwareUpdateProviderFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Reachable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation Reachable read Error", error); + LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14438,25 +13757,25 @@ class ReadBasicInformationReachable : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationReachable() - : SubscribeAttribute("reachable") + SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationReachable() + ~SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14467,10 +13786,10 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReachableWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Reachable response %@", [value description]); + NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14484,34 +13803,34 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { }; /* - * Attribute UniqueID + * Attribute ClusterRevision */ -class ReadBasicInformationUniqueID : public ReadAttribute { +class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { public: - ReadBasicInformationUniqueID() - : ReadAttribute("unique-id") + ReadOtaSoftwareUpdateProviderClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationUniqueID() + ~ReadOtaSoftwareUpdateProviderClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.UniqueID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation UniqueID read Error", error); + LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14520,25 +13839,25 @@ class ReadBasicInformationUniqueID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationUniqueID() - : SubscribeAttribute("unique-id") + SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationUniqueID() + ~SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14549,10 +13868,10 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUniqueIDWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.UniqueID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14565,35 +13884,122 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster OtaSoftwareUpdateRequestor | 0x002A | +|------------------------------------------------------------------------------| +| Commands: | | +| * AnnounceOTAProvider | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DefaultOTAProviders | 0x0000 | +| * UpdatePossible | 0x0001 | +| * UpdateState | 0x0002 | +| * UpdateStateProgress | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateTransition | 0x0000 | +| * VersionApplied | 0x0001 | +| * DownloadError | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Command AnnounceOTAProvider + */ +class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { +public: + OtaSoftwareUpdateRequestorAnnounceOTAProvider() + : ClusterCommand("announce-otaprovider") + { + AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); + AddArgument("MetadataForNode", &mRequest.metadataForNode); + AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.providerNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeID]; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + params.announcementReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.announcementReason)]; + if (mRequest.metadataForNode.HasValue()) { + params.metadataForNode = [NSData dataWithBytes:mRequest.metadataForNode.Value().data() length:mRequest.metadataForNode.Value().size()]; + } else { + params.metadataForNode = nil; + } + params.endpoint = [NSNumber numberWithUnsignedShort:mRequest.endpoint]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster announceOTAProviderWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; +}; + /* - * Attribute CapabilityMinima + * Attribute DefaultOTAProviders */ -class ReadBasicInformationCapabilityMinima : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { public: - ReadBasicInformationCapabilityMinima() - : ReadAttribute("capability-minima") + ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() + : ReadAttribute("default-otaproviders") { } - ~ReadBasicInformationCapabilityMinima() + ~ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapabilityMinimaWithCompletion:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation CapabilityMinima read Error", error); + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14602,25 +14008,80 @@ class ReadBasicInformationCapabilityMinima : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttribute { +class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute { public: - SubscribeAttributeBasicInformationCapabilityMinima() - : SubscribeAttribute("capability-minima") + WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() + : WriteAttribute("default-otaproviders") + , mComplex(&mValue) { + AddArgument("attr-name", "default-otaproviders"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBasicInformationCapabilityMinima() + ~WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeDefaultOTAProvidersWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; +}; + +class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + : SubscribeAttribute("default-otaproviders") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14631,10 +14092,10 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapabilityMinimaWithParams:params + [cluster subscribeAttributeDefaultOTAProvidersWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14648,34 +14109,34 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri }; /* - * Attribute ProductAppearance + * Attribute UpdatePossible */ -class ReadBasicInformationProductAppearance : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { public: - ReadBasicInformationProductAppearance() - : ReadAttribute("product-appearance") + ReadOtaSoftwareUpdateRequestorUpdatePossible() + : ReadAttribute("update-possible") { } - ~ReadBasicInformationProductAppearance() + ~ReadOtaSoftwareUpdateRequestorUpdatePossible() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductAppearanceWithCompletion:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductAppearance read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14684,25 +14145,25 @@ class ReadBasicInformationProductAppearance : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductAppearance() - : SubscribeAttribute("product-appearance") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() + : SubscribeAttribute("update-possible") { } - ~SubscribeAttributeBasicInformationProductAppearance() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14713,10 +14174,10 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductAppearanceWithParams:params + [cluster subscribeAttributeUpdatePossibleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14729,37 +14190,35 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpecificationVersion + * Attribute UpdateState */ -class ReadBasicInformationSpecificationVersion : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { public: - ReadBasicInformationSpecificationVersion() - : ReadAttribute("specification-version") + ReadOtaSoftwareUpdateRequestorUpdateState() + : ReadAttribute("update-state") { } - ~ReadBasicInformationSpecificationVersion() + ~ReadOtaSoftwareUpdateRequestorUpdateState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SpecificationVersion read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14768,25 +14227,25 @@ class ReadBasicInformationSpecificationVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSpecificationVersion() - : SubscribeAttribute("specification-version") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() + : SubscribeAttribute("update-state") { } - ~SubscribeAttributeBasicInformationSpecificationVersion() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14797,10 +14256,10 @@ class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpecificationVersionWithParams:params + [cluster subscribeAttributeUpdateStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14813,38 +14272,35 @@ class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxPathsPerInvoke + * Attribute UpdateStateProgress */ -class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { public: - ReadBasicInformationMaxPathsPerInvoke() - : ReadAttribute("max-paths-per-invoke") + ReadOtaSoftwareUpdateRequestorUpdateStateProgress() + : ReadAttribute("update-state-progress") { } - ~ReadBasicInformationMaxPathsPerInvoke() + ~ReadOtaSoftwareUpdateRequestorUpdateStateProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14853,25 +14309,25 @@ class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationMaxPathsPerInvoke() - : SubscribeAttribute("max-paths-per-invoke") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() + : SubscribeAttribute("update-state-progress") { } - ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14882,10 +14338,10 @@ class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPathsPerInvokeWithParams:params + [cluster subscribeAttributeUpdateStateProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14898,37 +14354,35 @@ class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadBasicInformationGeneratedCommandList : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationGeneratedCommandList() + ReadOtaSoftwareUpdateRequestorGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationGeneratedCommandList() + ~ReadOtaSoftwareUpdateRequestorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation GeneratedCommandList read Error", error); + LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14937,25 +14391,25 @@ class ReadBasicInformationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationGeneratedCommandList() + SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationGeneratedCommandList() + ~SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14969,7 +14423,7 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14985,32 +14439,32 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA /* * Attribute AcceptedCommandList */ -class ReadBasicInformationAcceptedCommandList : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationAcceptedCommandList() + ReadOtaSoftwareUpdateRequestorAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationAcceptedCommandList() + ~ReadOtaSoftwareUpdateRequestorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation AcceptedCommandList read Error", error); + LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15019,25 +14473,25 @@ class ReadBasicInformationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationAcceptedCommandList() + SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationAcceptedCommandList() + ~SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15051,7 +14505,7 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15069,32 +14523,32 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt /* * Attribute EventList */ -class ReadBasicInformationEventList : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { public: - ReadBasicInformationEventList() + ReadOtaSoftwareUpdateRequestorEventList() : ReadAttribute("event-list") { } - ~ReadBasicInformationEventList() + ~ReadOtaSoftwareUpdateRequestorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation EventList read Error", error); + LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15103,25 +14557,25 @@ class ReadBasicInformationEventList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationEventList() + SubscribeAttributeOtaSoftwareUpdateRequestorEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationEventList() + ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15135,7 +14589,7 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15153,32 +14607,32 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadBasicInformationAttributeList : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { public: - ReadBasicInformationAttributeList() + ReadOtaSoftwareUpdateRequestorAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBasicInformationAttributeList() + ~ReadOtaSoftwareUpdateRequestorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AttributeList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation AttributeList read Error", error); + LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15187,25 +14641,25 @@ class ReadBasicInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationAttributeList() + SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationAttributeList() + ~SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15219,7 +14673,7 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AttributeList response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15235,32 +14689,32 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut /* * Attribute FeatureMap */ -class ReadBasicInformationFeatureMap : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { public: - ReadBasicInformationFeatureMap() + ReadOtaSoftwareUpdateRequestorFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBasicInformationFeatureMap() + ~ReadOtaSoftwareUpdateRequestorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation FeatureMap read Error", error); + LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15269,25 +14723,25 @@ class ReadBasicInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationFeatureMap() + SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationFeatureMap() + ~SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15301,7 +14755,7 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15317,32 +14771,32 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadBasicInformationClusterRevision : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { public: - ReadBasicInformationClusterRevision() + ReadOtaSoftwareUpdateRequestorClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationClusterRevision() + ~ReadOtaSoftwareUpdateRequestorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ClusterRevision read Error", error); + LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15351,25 +14805,25 @@ class ReadBasicInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationClusterRevision() + SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationClusterRevision() + ~SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15383,7 +14837,7 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15397,14 +14851,13 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib }; /*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateProvider | 0x0029 | +| Cluster LocalizationConfiguration | 0x002B | |------------------------------------------------------------------------------| | Commands: | | -| * QueryImage | 0x00 | -| * ApplyUpdateRequest | 0x02 | -| * NotifyUpdateApplied | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | +| * ActiveLocale | 0x0000 | +| * SupportedLocales | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -15416,231 +14869,239 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib \*----------------------------------------------------------------------------*/ /* - * Command QueryImage + * Attribute ActiveLocale */ -class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { +class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { public: - OtaSoftwareUpdateProviderQueryImage() - : ClusterCommand("query-image") - , mComplex_ProtocolsSupported(&mRequest.protocolsSupported) + ReadLocalizationConfigurationActiveLocale() + : ReadAttribute("active-locale") + { + } + + ~ReadLocalizationConfigurationActiveLocale() { - AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); - AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); - AddArgument("ProtocolsSupported", &mComplex_ProtocolsSupported); - AddArgument("HardwareVersion", 0, UINT16_MAX, &mRequest.hardwareVersion); - AddArgument("Location", &mRequest.location); - AddArgument("RequestorCanConsent", 0, 1, &mRequest.requestorCanConsent); - AddArgument("MetadataForProvider", &mRequest.metadataForProvider); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; - params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; - params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.protocolsSupported) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("LocalizationConfiguration ActiveLocale read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.protocolsSupported = array_0; - } - if (mRequest.hardwareVersion.HasValue()) { - params.hardwareVersion = [NSNumber numberWithUnsignedShort:mRequest.hardwareVersion.Value()]; - } else { - params.hardwareVersion = nil; - } - if (mRequest.location.HasValue()) { - params.location = [[NSString alloc] initWithBytes:mRequest.location.Value().data() length:mRequest.location.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.location = nil; - } - if (mRequest.requestorCanConsent.HasValue()) { - params.requestorCanConsent = [NSNumber numberWithBool:mRequest.requestorCanConsent.Value()]; - } else { - params.requestorCanConsent = nil; - } - if (mRequest.metadataForProvider.HasValue()) { - params.metadataForProvider = [NSData dataWithBytes:mRequest.metadataForProvider.Value().data() length:mRequest.metadataForProvider.Value().size()]; - } else { - params.metadataForProvider = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster queryImageWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { +public: + WriteLocalizationConfigurationActiveLocale() + : WriteAttribute("active-locale") + { + AddArgument("attr-name", "active-locale"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteLocalizationConfigurationActiveLocale() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeActiveLocaleWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; - TypedComplexArgument> mComplex_ProtocolsSupported; + chip::ByteSpan mValue; }; -/* - * Command ApplyUpdateRequest - */ -class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { +class SubscribeAttributeLocalizationConfigurationActiveLocale : public SubscribeAttribute { public: - OtaSoftwareUpdateProviderApplyUpdateRequest() - : ClusterCommand("apply-update-request") + SubscribeAttributeLocalizationConfigurationActiveLocale() + : SubscribeAttribute("active-locale") { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeLocalizationConfigurationActiveLocale() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; - params.newVersion = [NSNumber numberWithUnsignedInt:mRequest.newVersion]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster applyUpdateRequestWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeActiveLocaleWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; }; /* - * Command NotifyUpdateApplied + * Attribute SupportedLocales */ -class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { +class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { public: - OtaSoftwareUpdateProviderNotifyUpdateApplied() - : ClusterCommand("notify-update-applied") + ReadLocalizationConfigurationSupportedLocales() + : ReadAttribute("supported-locales") + { + } + + ~ReadLocalizationConfigurationSupportedLocales() { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; - params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster notifyUpdateAppliedWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("LocalizationConfiguration SupportedLocales read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; +class SubscribeAttributeLocalizationConfigurationSupportedLocales : public SubscribeAttribute { +public: + SubscribeAttributeLocalizationConfigurationSupportedLocales() + : SubscribeAttribute("supported-locales") + { + } + + ~SubscribeAttributeLocalizationConfigurationSupportedLocales() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSupportedLocalesWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* * Attribute GeneratedCommandList */ -class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { +class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderGeneratedCommandList() + ReadLocalizationConfigurationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOtaSoftwareUpdateProviderGeneratedCommandList() + ~ReadLocalizationConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15649,25 +15110,25 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + SubscribeAttributeLocalizationConfigurationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + ~SubscribeAttributeLocalizationConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15681,7 +15142,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15697,32 +15158,32 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S /* * Attribute AcceptedCommandList */ -class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { +class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderAcceptedCommandList() + ReadLocalizationConfigurationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOtaSoftwareUpdateProviderAcceptedCommandList() + ~ReadLocalizationConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15731,25 +15192,25 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + SubscribeAttributeLocalizationConfigurationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + ~SubscribeAttributeLocalizationConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15763,7 +15224,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15781,32 +15242,32 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su /* * Attribute EventList */ -class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { +class ReadLocalizationConfigurationEventList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderEventList() + ReadLocalizationConfigurationEventList() : ReadAttribute("event-list") { } - ~ReadOtaSoftwareUpdateProviderEventList() + ~ReadLocalizationConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + LogNSError("LocalizationConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15815,25 +15276,25 @@ class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderEventList() + SubscribeAttributeLocalizationConfigurationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() + ~SubscribeAttributeLocalizationConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15847,7 +15308,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15865,32 +15326,32 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt /* * Attribute AttributeList */ -class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { +class ReadLocalizationConfigurationAttributeList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderAttributeList() + ReadLocalizationConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOtaSoftwareUpdateProviderAttributeList() + ~ReadLocalizationConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + LogNSError("LocalizationConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15899,25 +15360,25 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + SubscribeAttributeLocalizationConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + ~SubscribeAttributeLocalizationConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15931,7 +15392,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15947,32 +15408,32 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib /* * Attribute FeatureMap */ -class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { +class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderFeatureMap() + ReadLocalizationConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOtaSoftwareUpdateProviderFeatureMap() + ~ReadLocalizationConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + LogNSError("LocalizationConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15981,25 +15442,25 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + SubscribeAttributeLocalizationConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + ~SubscribeAttributeLocalizationConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16013,7 +15474,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16029,32 +15490,32 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt /* * Attribute ClusterRevision */ -class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { +class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderClusterRevision() + ReadLocalizationConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOtaSoftwareUpdateProviderClusterRevision() + ~ReadLocalizationConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + LogNSError("LocalizationConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16063,25 +15524,25 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + SubscribeAttributeLocalizationConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + ~SubscribeAttributeLocalizationConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16095,7 +15556,7 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16109,16 +15570,14 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr }; /*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateRequestor | 0x002A | +| Cluster TimeFormatLocalization | 0x002C | |------------------------------------------------------------------------------| | Commands: | | -| * AnnounceOTAProvider | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * DefaultOTAProviders | 0x0000 | -| * UpdatePossible | 0x0001 | -| * UpdateState | 0x0002 | -| * UpdateStateProgress | 0x0003 | +| * HourFormat | 0x0000 | +| * ActiveCalendarType | 0x0001 | +| * SupportedCalendarTypes | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -16127,103 +15586,37 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StateTransition | 0x0000 | -| * VersionApplied | 0x0001 | -| * DownloadError | 0x0002 | \*----------------------------------------------------------------------------*/ /* - * Command AnnounceOTAProvider - */ -class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { -public: - OtaSoftwareUpdateRequestorAnnounceOTAProvider() - : ClusterCommand("announce-otaprovider") - { - AddArgument("ProviderNodeID", 0, UINT64_MAX, &mRequest.providerNodeID); - AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); - AddArgument("AnnouncementReason", 0, UINT8_MAX, &mRequest.announcementReason); - AddArgument("MetadataForNode", &mRequest.metadataForNode); - AddArgument("Endpoint", 0, UINT16_MAX, &mRequest.endpoint); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.providerNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeID]; - params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; - params.announcementReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.announcementReason)]; - if (mRequest.metadataForNode.HasValue()) { - params.metadataForNode = [NSData dataWithBytes:mRequest.metadataForNode.Value().data() length:mRequest.metadataForNode.Value().size()]; - } else { - params.metadataForNode = nil; - } - params.endpoint = [NSNumber numberWithUnsignedShort:mRequest.endpoint]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster announceOTAProviderWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; -}; - -/* - * Attribute DefaultOTAProviders + * Attribute HourFormat */ -class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { +class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() - : ReadAttribute("default-otaproviders") + ReadTimeFormatLocalizationHourFormat() + : ReadAttribute("hour-format") { } - ~ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() + ~ReadTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); + LogNSError("TimeFormatLocalization HourFormat read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16232,49 +15625,36 @@ class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { } }; -class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute { +class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { public: - WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() - : WriteAttribute("default-otaproviders") - , mComplex(&mValue) + WriteTimeFormatLocalizationHourFormat() + : WriteAttribute("hour-format") { - AddArgument("attr-name", "default-otaproviders"); - AddArgument("attr-value", &mComplex); + AddArgument("attr-name", "hour-format"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() + ~WriteTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeDefaultOTAProvidersWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeHourFormatWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); + LogNSError("TimeFormatLocalization HourFormat write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16283,29 +15663,28 @@ class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + uint8_t mValue; }; -class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() - : SubscribeAttribute("default-otaproviders") + SubscribeAttributeTimeFormatLocalizationHourFormat() + : SubscribeAttribute("hour-format") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + ~SubscribeAttributeTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16316,10 +15695,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultOTAProvidersWithParams:params + [cluster subscribeAttributeHourFormatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16333,34 +15712,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S }; /* - * Attribute UpdatePossible + * Attribute ActiveCalendarType */ -class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { +class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorUpdatePossible() - : ReadAttribute("update-possible") + ReadTimeFormatLocalizationActiveCalendarType() + : ReadAttribute("active-calendar-type") { } - ~ReadOtaSoftwareUpdateRequestorUpdatePossible() + ~ReadTimeFormatLocalizationActiveCalendarType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); + LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16369,107 +15748,66 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public SubscribeAttribute { +class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() - : SubscribeAttribute("update-possible") + WriteTimeFormatLocalizationActiveCalendarType() + : WriteAttribute("active-calendar-type") { + AddArgument("attr-name", "active-calendar-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() + ~WriteTimeFormatLocalizationActiveCalendarType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUpdatePossibleWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UpdateState - */ -class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { -public: - ReadOtaSoftwareUpdateRequestorUpdateState() - : ReadAttribute("update-state") - { - } - - ~ReadOtaSoftwareUpdateRequestorUpdateState() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); + [cluster writeAttributeActiveCalendarTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() - : SubscribeAttribute("update-state") + SubscribeAttributeTimeFormatLocalizationActiveCalendarType() + : SubscribeAttribute("active-calendar-type") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() + ~SubscribeAttributeTimeFormatLocalizationActiveCalendarType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16480,10 +15818,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpdateStateWithParams:params + [cluster subscribeAttributeActiveCalendarTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16497,34 +15835,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe }; /* - * Attribute UpdateStateProgress + * Attribute SupportedCalendarTypes */ -class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { +class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorUpdateStateProgress() - : ReadAttribute("update-state-progress") + ReadTimeFormatLocalizationSupportedCalendarTypes() + : ReadAttribute("supported-calendar-types") { } - ~ReadOtaSoftwareUpdateRequestorUpdateStateProgress() + ~ReadTimeFormatLocalizationSupportedCalendarTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); + LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16533,25 +15871,25 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() - : SubscribeAttribute("update-state-progress") + SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() + : SubscribeAttribute("supported-calendar-types") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() + ~SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16562,10 +15900,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpdateStateProgressWithParams:params + [cluster subscribeAttributeSupportedCalendarTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16581,32 +15919,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S /* * Attribute GeneratedCommandList */ -class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute { +class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorGeneratedCommandList() + ReadTimeFormatLocalizationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOtaSoftwareUpdateRequestorGeneratedCommandList() + ~ReadTimeFormatLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); + LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16615,25 +15953,25 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() + SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() + ~SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16647,7 +15985,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16663,32 +16001,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { +class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorAcceptedCommandList() + ReadTimeFormatLocalizationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOtaSoftwareUpdateRequestorAcceptedCommandList() + ~ReadTimeFormatLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); + LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16697,25 +16035,25 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() + SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() + ~SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16729,7 +16067,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16747,32 +16085,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S /* * Attribute EventList */ -class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { +class ReadTimeFormatLocalizationEventList : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorEventList() + ReadTimeFormatLocalizationEventList() : ReadAttribute("event-list") { } - ~ReadOtaSoftwareUpdateRequestorEventList() + ~ReadTimeFormatLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); + LogNSError("TimeFormatLocalization EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16781,25 +16119,25 @@ class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorEventList() + SubscribeAttributeTimeFormatLocalizationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() + ~SubscribeAttributeTimeFormatLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16813,7 +16151,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16831,32 +16169,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { +class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorAttributeList() + ReadTimeFormatLocalizationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOtaSoftwareUpdateRequestorAttributeList() + ~ReadTimeFormatLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); + LogNSError("TimeFormatLocalization AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16865,25 +16203,25 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() + SubscribeAttributeTimeFormatLocalizationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() + ~SubscribeAttributeTimeFormatLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16897,7 +16235,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16913,32 +16251,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { +class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorFeatureMap() + ReadTimeFormatLocalizationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOtaSoftwareUpdateRequestorFeatureMap() + ~ReadTimeFormatLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); + LogNSError("TimeFormatLocalization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16947,25 +16285,25 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() + SubscribeAttributeTimeFormatLocalizationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() + ~SubscribeAttributeTimeFormatLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16979,7 +16317,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16995,32 +16333,32 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { +class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorClusterRevision() + ReadTimeFormatLocalizationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOtaSoftwareUpdateRequestorClusterRevision() + ~ReadTimeFormatLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); + LogNSError("TimeFormatLocalization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17029,25 +16367,25 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() + SubscribeAttributeTimeFormatLocalizationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() + ~SubscribeAttributeTimeFormatLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17061,7 +16399,7 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17075,13 +16413,12 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster LocalizationConfiguration | 0x002B | +| Cluster UnitLocalization | 0x002D | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * ActiveLocale | 0x0000 | -| * SupportedLocales | 0x0001 | +| * TemperatureUnit | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -17093,34 +16430,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc \*----------------------------------------------------------------------------*/ /* - * Attribute ActiveLocale + * Attribute TemperatureUnit */ -class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { +class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { public: - ReadLocalizationConfigurationActiveLocale() - : ReadAttribute("active-locale") + ReadUnitLocalizationTemperatureUnit() + : ReadAttribute("temperature-unit") { } - ~ReadLocalizationConfigurationActiveLocale() + ~ReadUnitLocalizationTemperatureUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration ActiveLocale read Error", error); + LogNSError("UnitLocalization TemperatureUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17129,36 +16466,36 @@ class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { } }; -class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { +class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { public: - WriteLocalizationConfigurationActiveLocale() - : WriteAttribute("active-locale") + WriteUnitLocalizationTemperatureUnit() + : WriteAttribute("temperature-unit") { - AddArgument("attr-name", "active-locale"); - AddArgument("attr-value", &mValue); + AddArgument("attr-name", "temperature-unit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteLocalizationConfigurationActiveLocale() + ~WriteUnitLocalizationTemperatureUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeActiveLocaleWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureUnitWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + LogNSError("UnitLocalization TemperatureUnit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17167,110 +16504,28 @@ class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { } private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeLocalizationConfigurationActiveLocale : public SubscribeAttribute { -public: - SubscribeAttributeLocalizationConfigurationActiveLocale() - : SubscribeAttribute("active-locale") - { - } - - ~SubscribeAttributeLocalizationConfigurationActiveLocale() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeActiveLocaleWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SupportedLocales - */ -class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { -public: - ReadLocalizationConfigurationSupportedLocales() - : ReadAttribute("supported-locales") - { - } - - ~ReadLocalizationConfigurationSupportedLocales() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("LocalizationConfiguration SupportedLocales read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } + uint8_t mValue; }; -class SubscribeAttributeLocalizationConfigurationSupportedLocales : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationSupportedLocales() - : SubscribeAttribute("supported-locales") + SubscribeAttributeUnitLocalizationTemperatureUnit() + : SubscribeAttribute("temperature-unit") { } - ~SubscribeAttributeLocalizationConfigurationSupportedLocales() + ~SubscribeAttributeUnitLocalizationTemperatureUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17281,10 +16536,10 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedLocalesWithParams:params + [cluster subscribeAttributeTemperatureUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17300,32 +16555,32 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc /* * Attribute GeneratedCommandList */ -class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { +class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { public: - ReadLocalizationConfigurationGeneratedCommandList() + ReadUnitLocalizationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLocalizationConfigurationGeneratedCommandList() + ~ReadUnitLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); + LogNSError("UnitLocalization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17334,25 +16589,25 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationGeneratedCommandList() + SubscribeAttributeUnitLocalizationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLocalizationConfigurationGeneratedCommandList() + ~SubscribeAttributeUnitLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17366,7 +16621,7 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17382,32 +16637,32 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S /* * Attribute AcceptedCommandList */ -class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { +class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { public: - ReadLocalizationConfigurationAcceptedCommandList() + ReadUnitLocalizationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLocalizationConfigurationAcceptedCommandList() + ~ReadUnitLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); + LogNSError("UnitLocalization AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17416,25 +16671,25 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationAcceptedCommandList() + SubscribeAttributeUnitLocalizationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLocalizationConfigurationAcceptedCommandList() + ~SubscribeAttributeUnitLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17448,7 +16703,7 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17466,32 +16721,32 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su /* * Attribute EventList */ -class ReadLocalizationConfigurationEventList : public ReadAttribute { +class ReadUnitLocalizationEventList : public ReadAttribute { public: - ReadLocalizationConfigurationEventList() + ReadUnitLocalizationEventList() : ReadAttribute("event-list") { } - ~ReadLocalizationConfigurationEventList() + ~ReadUnitLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + NSLog(@"UnitLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration EventList read Error", error); + LogNSError("UnitLocalization EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17500,25 +16755,25 @@ class ReadLocalizationConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationEventList() + SubscribeAttributeUnitLocalizationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLocalizationConfigurationEventList() + ~SubscribeAttributeUnitLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17532,7 +16787,7 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + NSLog(@"UnitLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17550,32 +16805,32 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt /* * Attribute AttributeList */ -class ReadLocalizationConfigurationAttributeList : public ReadAttribute { +class ReadUnitLocalizationAttributeList : public ReadAttribute { public: - ReadLocalizationConfigurationAttributeList() + ReadUnitLocalizationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLocalizationConfigurationAttributeList() + ~ReadUnitLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + NSLog(@"UnitLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration AttributeList read Error", error); + LogNSError("UnitLocalization AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17584,25 +16839,25 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationAttributeList() + SubscribeAttributeUnitLocalizationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLocalizationConfigurationAttributeList() + ~SubscribeAttributeUnitLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17616,7 +16871,7 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + NSLog(@"UnitLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17632,32 +16887,32 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib /* * Attribute FeatureMap */ -class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { +class ReadUnitLocalizationFeatureMap : public ReadAttribute { public: - ReadLocalizationConfigurationFeatureMap() + ReadUnitLocalizationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLocalizationConfigurationFeatureMap() + ~ReadUnitLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration FeatureMap read Error", error); + LogNSError("UnitLocalization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17666,25 +16921,25 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationFeatureMap() + SubscribeAttributeUnitLocalizationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLocalizationConfigurationFeatureMap() + ~SubscribeAttributeUnitLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17698,7 +16953,7 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17714,32 +16969,32 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt /* * Attribute ClusterRevision */ -class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { +class ReadUnitLocalizationClusterRevision : public ReadAttribute { public: - ReadLocalizationConfigurationClusterRevision() + ReadUnitLocalizationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLocalizationConfigurationClusterRevision() + ~ReadUnitLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration ClusterRevision read Error", error); + LogNSError("UnitLocalization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17748,25 +17003,25 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationClusterRevision() + SubscribeAttributeUnitLocalizationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLocalizationConfigurationClusterRevision() + ~SubscribeAttributeUnitLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17780,7 +17035,7 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17794,14 +17049,12 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr }; /*----------------------------------------------------------------------------*\ -| Cluster TimeFormatLocalization | 0x002C | +| Cluster PowerSourceConfiguration | 0x002E | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * HourFormat | 0x0000 | -| * ActiveCalendarType | 0x0001 | -| * SupportedCalendarTypes | 0x0002 | +| * Sources | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -17813,102 +17066,61 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr \*----------------------------------------------------------------------------*/ /* - * Attribute HourFormat + * Attribute Sources */ -class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { +class ReadPowerSourceConfigurationSources : public ReadAttribute { public: - ReadTimeFormatLocalizationHourFormat() - : ReadAttribute("hour-format") + ReadPowerSourceConfigurationSources() + : ReadAttribute("sources") { } - ~ReadTimeFormatLocalizationHourFormat() + ~ReadPowerSourceConfigurationSources() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization HourFormat read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { -public: - WriteTimeFormatLocalizationHourFormat() - : WriteAttribute("hour-format") - { - AddArgument("attr-name", "hour-format"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeFormatLocalizationHourFormat() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeHourFormatWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization HourFormat write Error", error); + LogNSError("PowerSourceConfiguration Sources read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationHourFormat() - : SubscribeAttribute("hour-format") + SubscribeAttributePowerSourceConfigurationSources() + : SubscribeAttribute("sources") { } - ~SubscribeAttributeTimeFormatLocalizationHourFormat() + ~SubscribeAttributePowerSourceConfigurationSources() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17919,10 +17131,10 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHourFormatWithParams:params + [cluster subscribeAttributeSourcesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17936,102 +17148,61 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri }; /* - * Attribute ActiveCalendarType + * Attribute GeneratedCommandList */ -class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { +class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadTimeFormatLocalizationActiveCalendarType() - : ReadAttribute("active-calendar-type") + ReadPowerSourceConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTimeFormatLocalizationActiveCalendarType() + ~ReadPowerSourceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { -public: - WriteTimeFormatLocalizationActiveCalendarType() - : WriteAttribute("active-calendar-type") - { - AddArgument("attr-name", "active-calendar-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeFormatLocalizationActiveCalendarType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeActiveCalendarTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationActiveCalendarType() - : SubscribeAttribute("active-calendar-type") + SubscribeAttributePowerSourceConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimeFormatLocalizationActiveCalendarType() + ~SubscribeAttributePowerSourceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18042,10 +17213,10 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCalendarTypeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18059,34 +17230,34 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr }; /* - * Attribute SupportedCalendarTypes + * Attribute AcceptedCommandList */ -class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { +class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadTimeFormatLocalizationSupportedCalendarTypes() - : ReadAttribute("supported-calendar-types") + ReadPowerSourceConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTimeFormatLocalizationSupportedCalendarTypes() + ~ReadPowerSourceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); + LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18095,25 +17266,25 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() - : SubscribeAttribute("supported-calendar-types") + SubscribeAttributePowerSourceConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() + ~SubscribeAttributePowerSourceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18124,10 +17295,10 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedCalendarTypesWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18140,35 +17311,37 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceConfigurationEventList : public ReadAttribute { public: - ReadTimeFormatLocalizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadTimeFormatLocalizationGeneratedCommandList() + ~ReadPowerSourceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); + LogNSError("PowerSourceConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18177,25 +17350,25 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() + ~SubscribeAttributePowerSourceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18206,10 +17379,10 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18222,35 +17395,37 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { public: - ReadTimeFormatLocalizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTimeFormatLocalizationAcceptedCommandList() + ~ReadPowerSourceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); + LogNSError("PowerSourceConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18259,25 +17434,25 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() + ~SubscribeAttributePowerSourceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18288,10 +17463,10 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18304,37 +17479,35 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadTimeFormatLocalizationEventList : public ReadAttribute { +class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { public: - ReadTimeFormatLocalizationEventList() - : ReadAttribute("event-list") + ReadPowerSourceConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTimeFormatLocalizationEventList() + ~ReadPowerSourceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization EventList read Error", error); + LogNSError("PowerSourceConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18343,25 +17516,25 @@ class ReadTimeFormatLocalizationEventList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimeFormatLocalizationEventList() + ~SubscribeAttributePowerSourceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18372,10 +17545,10 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18388,37 +17561,35 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { +class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { public: - ReadTimeFormatLocalizationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimeFormatLocalizationAttributeList() + ~ReadPowerSourceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization AttributeList read Error", error); + LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18427,25 +17598,25 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimeFormatLocalizationAttributeList() + ~SubscribeAttributePowerSourceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18456,10 +17627,10 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18472,35 +17643,86 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt } }; +/*----------------------------------------------------------------------------*\ +| Cluster PowerSource | 0x002F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Status | 0x0000 | +| * Order | 0x0001 | +| * Description | 0x0002 | +| * WiredAssessedInputVoltage | 0x0003 | +| * WiredAssessedInputFrequency | 0x0004 | +| * WiredCurrentType | 0x0005 | +| * WiredAssessedCurrent | 0x0006 | +| * WiredNominalVoltage | 0x0007 | +| * WiredMaximumCurrent | 0x0008 | +| * WiredPresent | 0x0009 | +| * ActiveWiredFaults | 0x000A | +| * BatVoltage | 0x000B | +| * BatPercentRemaining | 0x000C | +| * BatTimeRemaining | 0x000D | +| * BatChargeLevel | 0x000E | +| * BatReplacementNeeded | 0x000F | +| * BatReplaceability | 0x0010 | +| * BatPresent | 0x0011 | +| * ActiveBatFaults | 0x0012 | +| * BatReplacementDescription | 0x0013 | +| * BatCommonDesignation | 0x0014 | +| * BatANSIDesignation | 0x0015 | +| * BatIECDesignation | 0x0016 | +| * BatApprovedChemistry | 0x0017 | +| * BatCapacity | 0x0018 | +| * BatQuantity | 0x0019 | +| * BatChargeState | 0x001A | +| * BatTimeToFullCharge | 0x001B | +| * BatFunctionalWhileCharging | 0x001C | +| * BatChargingCurrent | 0x001D | +| * ActiveBatChargeFaults | 0x001E | +| * EndpointList | 0x001F | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * WiredFaultChange | 0x0000 | +| * BatFaultChange | 0x0001 | +| * BatChargeFaultChange | 0x0002 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute FeatureMap + * Attribute Status */ -class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { +class ReadPowerSourceStatus : public ReadAttribute { public: - ReadTimeFormatLocalizationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceStatus() + : ReadAttribute("status") { } - ~ReadTimeFormatLocalizationFeatureMap() + ~ReadPowerSourceStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization FeatureMap read Error", error); + LogNSError("PowerSource Status read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18509,25 +17731,25 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceStatus() + : SubscribeAttribute("status") { } - ~SubscribeAttributeTimeFormatLocalizationFeatureMap() + ~SubscribeAttributePowerSourceStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18538,10 +17760,10 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18555,34 +17777,34 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute Order */ -class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { +class ReadPowerSourceOrder : public ReadAttribute { public: - ReadTimeFormatLocalizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceOrder() + : ReadAttribute("order") { } - ~ReadTimeFormatLocalizationClusterRevision() + ~ReadPowerSourceOrder() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Order response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization ClusterRevision read Error", error); + LogNSError("PowerSource Order read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18591,25 +17813,25 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceOrder() + : SubscribeAttribute("order") { } - ~SubscribeAttributeTimeFormatLocalizationClusterRevision() + ~SubscribeAttributePowerSourceOrder() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18620,10 +17842,10 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOrderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.Order response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18636,120 +17858,62 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster UnitLocalization | 0x002D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureUnit | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute TemperatureUnit + * Attribute Description */ -class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { +class ReadPowerSourceDescription : public ReadAttribute { public: - ReadUnitLocalizationTemperatureUnit() - : ReadAttribute("temperature-unit") + ReadPowerSourceDescription() + : ReadAttribute("description") { } - ~ReadUnitLocalizationTemperatureUnit() + ~ReadPowerSourceDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization TemperatureUnit read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { -public: - WriteUnitLocalizationTemperatureUnit() - : WriteAttribute("temperature-unit") - { - AddArgument("attr-name", "temperature-unit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteUnitLocalizationTemperatureUnit() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureUnitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UnitLocalization TemperatureUnit write Error", error); + LogNSError("PowerSource Description read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttribute { +class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationTemperatureUnit() - : SubscribeAttribute("temperature-unit") + SubscribeAttributePowerSourceDescription() + : SubscribeAttribute("description") { } - ~SubscribeAttributeUnitLocalizationTemperatureUnit() + ~SubscribeAttributePowerSourceDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18760,10 +17924,10 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureUnitWithParams:params + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18777,34 +17941,34 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib }; /* - * Attribute GeneratedCommandList + * Attribute WiredAssessedInputVoltage */ -class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { public: - ReadUnitLocalizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceWiredAssessedInputVoltage() + : ReadAttribute("wired-assessed-input-voltage") { } - ~ReadUnitLocalizationGeneratedCommandList() + ~ReadPowerSourceWiredAssessedInputVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization GeneratedCommandList read Error", error); + LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18813,25 +17977,25 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceWiredAssessedInputVoltage() + : SubscribeAttribute("wired-assessed-input-voltage") { } - ~SubscribeAttributeUnitLocalizationGeneratedCommandList() + ~SubscribeAttributePowerSourceWiredAssessedInputVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18842,10 +18006,10 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18859,34 +18023,34 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA }; /* - * Attribute AcceptedCommandList + * Attribute WiredAssessedInputFrequency */ -class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { public: - ReadUnitLocalizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceWiredAssessedInputFrequency() + : ReadAttribute("wired-assessed-input-frequency") { } - ~ReadUnitLocalizationAcceptedCommandList() + ~ReadPowerSourceWiredAssessedInputFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization AcceptedCommandList read Error", error); + LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18895,25 +18059,25 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceWiredAssessedInputFrequency() + : SubscribeAttribute("wired-assessed-input-frequency") { } - ~SubscribeAttributeUnitLocalizationAcceptedCommandList() + ~SubscribeAttributePowerSourceWiredAssessedInputFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18924,10 +18088,10 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18940,37 +18104,35 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute WiredCurrentType */ -class ReadUnitLocalizationEventList : public ReadAttribute { +class ReadPowerSourceWiredCurrentType : public ReadAttribute { public: - ReadUnitLocalizationEventList() - : ReadAttribute("event-list") + ReadPowerSourceWiredCurrentType() + : ReadAttribute("wired-current-type") { } - ~ReadUnitLocalizationEventList() + ~ReadPowerSourceWiredCurrentType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization EventList read Error", error); + LogNSError("PowerSource WiredCurrentType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18979,25 +18141,25 @@ class ReadUnitLocalizationEventList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceWiredCurrentType() + : SubscribeAttribute("wired-current-type") { } - ~SubscribeAttributeUnitLocalizationEventList() + ~SubscribeAttributePowerSourceWiredCurrentType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19008,10 +18170,10 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeWiredCurrentTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19024,37 +18186,35 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute WiredAssessedCurrent */ -class ReadUnitLocalizationAttributeList : public ReadAttribute { +class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { public: - ReadUnitLocalizationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceWiredAssessedCurrent() + : ReadAttribute("wired-assessed-current") { } - ~ReadUnitLocalizationAttributeList() + ~ReadPowerSourceWiredAssessedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization AttributeList read Error", error); + LogNSError("PowerSource WiredAssessedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19063,25 +18223,25 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceWiredAssessedCurrent() + : SubscribeAttribute("wired-assessed-current") { } - ~SubscribeAttributeUnitLocalizationAttributeList() + ~SubscribeAttributePowerSourceWiredAssessedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19092,10 +18252,10 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeWiredAssessedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19109,34 +18269,34 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut }; /* - * Attribute FeatureMap + * Attribute WiredNominalVoltage */ -class ReadUnitLocalizationFeatureMap : public ReadAttribute { +class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { public: - ReadUnitLocalizationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceWiredNominalVoltage() + : ReadAttribute("wired-nominal-voltage") { } - ~ReadUnitLocalizationFeatureMap() + ~ReadPowerSourceWiredNominalVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization FeatureMap read Error", error); + LogNSError("PowerSource WiredNominalVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19145,25 +18305,25 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceWiredNominalVoltage() + : SubscribeAttribute("wired-nominal-voltage") { } - ~SubscribeAttributeUnitLocalizationFeatureMap() + ~SubscribeAttributePowerSourceWiredNominalVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19174,10 +18334,10 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeWiredNominalVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19191,34 +18351,34 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute WiredMaximumCurrent */ -class ReadUnitLocalizationClusterRevision : public ReadAttribute { +class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { public: - ReadUnitLocalizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceWiredMaximumCurrent() + : ReadAttribute("wired-maximum-current") { } - ~ReadUnitLocalizationClusterRevision() + ~ReadPowerSourceWiredMaximumCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization ClusterRevision read Error", error); + LogNSError("PowerSource WiredMaximumCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19227,25 +18387,25 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceWiredMaximumCurrent() + : SubscribeAttribute("wired-maximum-current") { } - ~SubscribeAttributeUnitLocalizationClusterRevision() + ~SubscribeAttributePowerSourceWiredMaximumCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19256,10 +18416,10 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeWiredMaximumCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19272,52 +18432,35 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerSourceConfiguration | 0x002E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Sources | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Sources + * Attribute WiredPresent */ -class ReadPowerSourceConfigurationSources : public ReadAttribute { +class ReadPowerSourceWiredPresent : public ReadAttribute { public: - ReadPowerSourceConfigurationSources() - : ReadAttribute("sources") + ReadPowerSourceWiredPresent() + : ReadAttribute("wired-present") { } - ~ReadPowerSourceConfigurationSources() + ~ReadPowerSourceWiredPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration Sources read Error", error); + LogNSError("PowerSource WiredPresent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19326,25 +18469,25 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationSources() - : SubscribeAttribute("sources") + SubscribeAttributePowerSourceWiredPresent() + : SubscribeAttribute("wired-present") { } - ~SubscribeAttributePowerSourceConfigurationSources() + ~SubscribeAttributePowerSourceWiredPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19355,10 +18498,10 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSourcesWithParams:params + [cluster subscribeAttributeWiredPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19372,34 +18515,34 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib }; /* - * Attribute GeneratedCommandList + * Attribute ActiveWiredFaults */ -class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceActiveWiredFaults : public ReadAttribute { public: - ReadPowerSourceConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceActiveWiredFaults() + : ReadAttribute("active-wired-faults") { } - ~ReadPowerSourceConfigurationGeneratedCommandList() + ~ReadPowerSourceActiveWiredFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); + LogNSError("PowerSource ActiveWiredFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19408,25 +18551,25 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceActiveWiredFaults() + : SubscribeAttribute("active-wired-faults") { } - ~SubscribeAttributePowerSourceConfigurationGeneratedCommandList() + ~SubscribeAttributePowerSourceActiveWiredFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19437,10 +18580,10 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeActiveWiredFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19454,34 +18597,34 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su }; /* - * Attribute AcceptedCommandList + * Attribute BatVoltage */ -class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceBatVoltage : public ReadAttribute { public: - ReadPowerSourceConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceBatVoltage() + : ReadAttribute("bat-voltage") { } - ~ReadPowerSourceConfigurationAcceptedCommandList() + ~ReadPowerSourceBatVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); + LogNSError("PowerSource BatVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19490,25 +18633,25 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceBatVoltage() + : SubscribeAttribute("bat-voltage") { } - ~SubscribeAttributePowerSourceConfigurationAcceptedCommandList() + ~SubscribeAttributePowerSourceBatVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19519,10 +18662,10 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBatVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19535,37 +18678,35 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute BatPercentRemaining */ -class ReadPowerSourceConfigurationEventList : public ReadAttribute { +class ReadPowerSourceBatPercentRemaining : public ReadAttribute { public: - ReadPowerSourceConfigurationEventList() - : ReadAttribute("event-list") + ReadPowerSourceBatPercentRemaining() + : ReadAttribute("bat-percent-remaining") { } - ~ReadPowerSourceConfigurationEventList() + ~ReadPowerSourceBatPercentRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration EventList read Error", error); + LogNSError("PowerSource BatPercentRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19574,25 +18715,25 @@ class ReadPowerSourceConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceBatPercentRemaining() + : SubscribeAttribute("bat-percent-remaining") { } - ~SubscribeAttributePowerSourceConfigurationEventList() + ~SubscribeAttributePowerSourceBatPercentRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19603,10 +18744,10 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeBatPercentRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19619,37 +18760,35 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute BatTimeRemaining */ -class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { +class ReadPowerSourceBatTimeRemaining : public ReadAttribute { public: - ReadPowerSourceConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceBatTimeRemaining() + : ReadAttribute("bat-time-remaining") { } - ~ReadPowerSourceConfigurationAttributeList() + ~ReadPowerSourceBatTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration AttributeList read Error", error); + LogNSError("PowerSource BatTimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19658,25 +18797,25 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceBatTimeRemaining() + : SubscribeAttribute("bat-time-remaining") { } - ~SubscribeAttributePowerSourceConfigurationAttributeList() + ~SubscribeAttributePowerSourceBatTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19687,10 +18826,10 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeBatTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19704,34 +18843,34 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe }; /* - * Attribute FeatureMap + * Attribute BatChargeLevel */ -class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { +class ReadPowerSourceBatChargeLevel : public ReadAttribute { public: - ReadPowerSourceConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceBatChargeLevel() + : ReadAttribute("bat-charge-level") { } - ~ReadPowerSourceConfigurationFeatureMap() + ~ReadPowerSourceBatChargeLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration FeatureMap read Error", error); + LogNSError("PowerSource BatChargeLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19740,25 +18879,25 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceBatChargeLevel() + : SubscribeAttribute("bat-charge-level") { } - ~SubscribeAttributePowerSourceConfigurationFeatureMap() + ~SubscribeAttributePowerSourceBatChargeLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19769,10 +18908,10 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeBatChargeLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19786,34 +18925,34 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt }; /* - * Attribute ClusterRevision + * Attribute BatReplacementNeeded */ -class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { +class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { public: - ReadPowerSourceConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceBatReplacementNeeded() + : ReadAttribute("bat-replacement-needed") { } - ~ReadPowerSourceConfigurationClusterRevision() + ~ReadPowerSourceBatReplacementNeeded() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); + LogNSError("PowerSource BatReplacementNeeded read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19822,25 +18961,25 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceBatReplacementNeeded() + : SubscribeAttribute("bat-replacement-needed") { } - ~SubscribeAttributePowerSourceConfigurationClusterRevision() + ~SubscribeAttributePowerSourceBatReplacementNeeded() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19851,10 +18990,10 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeBatReplacementNeededWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19867,86 +19006,35 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri } }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerSource | 0x002F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Status | 0x0000 | -| * Order | 0x0001 | -| * Description | 0x0002 | -| * WiredAssessedInputVoltage | 0x0003 | -| * WiredAssessedInputFrequency | 0x0004 | -| * WiredCurrentType | 0x0005 | -| * WiredAssessedCurrent | 0x0006 | -| * WiredNominalVoltage | 0x0007 | -| * WiredMaximumCurrent | 0x0008 | -| * WiredPresent | 0x0009 | -| * ActiveWiredFaults | 0x000A | -| * BatVoltage | 0x000B | -| * BatPercentRemaining | 0x000C | -| * BatTimeRemaining | 0x000D | -| * BatChargeLevel | 0x000E | -| * BatReplacementNeeded | 0x000F | -| * BatReplaceability | 0x0010 | -| * BatPresent | 0x0011 | -| * ActiveBatFaults | 0x0012 | -| * BatReplacementDescription | 0x0013 | -| * BatCommonDesignation | 0x0014 | -| * BatANSIDesignation | 0x0015 | -| * BatIECDesignation | 0x0016 | -| * BatApprovedChemistry | 0x0017 | -| * BatCapacity | 0x0018 | -| * BatQuantity | 0x0019 | -| * BatChargeState | 0x001A | -| * BatTimeToFullCharge | 0x001B | -| * BatFunctionalWhileCharging | 0x001C | -| * BatChargingCurrent | 0x001D | -| * ActiveBatChargeFaults | 0x001E | -| * EndpointList | 0x001F | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * WiredFaultChange | 0x0000 | -| * BatFaultChange | 0x0001 | -| * BatChargeFaultChange | 0x0002 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Status + * Attribute BatReplaceability */ -class ReadPowerSourceStatus : public ReadAttribute { +class ReadPowerSourceBatReplaceability : public ReadAttribute { public: - ReadPowerSourceStatus() - : ReadAttribute("status") + ReadPowerSourceBatReplaceability() + : ReadAttribute("bat-replaceability") { } - ~ReadPowerSourceStatus() + ~ReadPowerSourceBatReplaceability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Status response %@", [value description]); + [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Status read Error", error); + LogNSError("PowerSource BatReplaceability read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19955,21 +19043,21 @@ class ReadPowerSourceStatus : public ReadAttribute { } }; -class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute { public: - SubscribeAttributePowerSourceStatus() - : SubscribeAttribute("status") + SubscribeAttributePowerSourceBatReplaceability() + : SubscribeAttribute("bat-replaceability") { } - ~SubscribeAttributePowerSourceStatus() + ~SubscribeAttributePowerSourceBatReplaceability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -19984,10 +19072,10 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusWithParams:params + [cluster subscribeAttributeBatReplaceabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Status response %@", [value description]); + NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20001,34 +19089,34 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { }; /* - * Attribute Order + * Attribute BatPresent */ -class ReadPowerSourceOrder : public ReadAttribute { +class ReadPowerSourceBatPresent : public ReadAttribute { public: - ReadPowerSourceOrder() - : ReadAttribute("order") + ReadPowerSourceBatPresent() + : ReadAttribute("bat-present") { } - ~ReadPowerSourceOrder() + ~ReadPowerSourceBatPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Order response %@", [value description]); + [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Order read Error", error); + LogNSError("PowerSource BatPresent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20037,21 +19125,21 @@ class ReadPowerSourceOrder : public ReadAttribute { } }; -class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { public: - SubscribeAttributePowerSourceOrder() - : SubscribeAttribute("order") + SubscribeAttributePowerSourceBatPresent() + : SubscribeAttribute("bat-present") { } - ~SubscribeAttributePowerSourceOrder() + ~SubscribeAttributePowerSourceBatPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20066,10 +19154,10 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOrderWithParams:params + [cluster subscribeAttributeBatPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Order response %@", [value description]); + NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20083,34 +19171,34 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { }; /* - * Attribute Description + * Attribute ActiveBatFaults */ -class ReadPowerSourceDescription : public ReadAttribute { +class ReadPowerSourceActiveBatFaults : public ReadAttribute { public: - ReadPowerSourceDescription() - : ReadAttribute("description") + ReadPowerSourceActiveBatFaults() + : ReadAttribute("active-bat-faults") { } - ~ReadPowerSourceDescription() + ~ReadPowerSourceActiveBatFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Description response %@", [value description]); + [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Description read Error", error); + LogNSError("PowerSource ActiveBatFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20119,21 +19207,21 @@ class ReadPowerSourceDescription : public ReadAttribute { } }; -class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { public: - SubscribeAttributePowerSourceDescription() - : SubscribeAttribute("description") + SubscribeAttributePowerSourceActiveBatFaults() + : SubscribeAttribute("active-bat-faults") { } - ~SubscribeAttributePowerSourceDescription() + ~SubscribeAttributePowerSourceActiveBatFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20148,10 +19236,10 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeActiveBatFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Description response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20165,34 +19253,34 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { }; /* - * Attribute WiredAssessedInputVoltage + * Attribute BatReplacementDescription */ -class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { +class ReadPowerSourceBatReplacementDescription : public ReadAttribute { public: - ReadPowerSourceWiredAssessedInputVoltage() - : ReadAttribute("wired-assessed-input-voltage") + ReadPowerSourceBatReplacementDescription() + : ReadAttribute("bat-replacement-description") { } - ~ReadPowerSourceWiredAssessedInputVoltage() + ~ReadPowerSourceBatReplacementDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); + LogNSError("PowerSource BatReplacementDescription read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20201,21 +19289,21 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedInputVoltage() - : SubscribeAttribute("wired-assessed-input-voltage") + SubscribeAttributePowerSourceBatReplacementDescription() + : SubscribeAttribute("bat-replacement-description") { } - ~SubscribeAttributePowerSourceWiredAssessedInputVoltage() + ~SubscribeAttributePowerSourceBatReplacementDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20230,10 +19318,10 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params + [cluster subscribeAttributeBatReplacementDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20247,34 +19335,34 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA }; /* - * Attribute WiredAssessedInputFrequency + * Attribute BatCommonDesignation */ -class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { +class ReadPowerSourceBatCommonDesignation : public ReadAttribute { public: - ReadPowerSourceWiredAssessedInputFrequency() - : ReadAttribute("wired-assessed-input-frequency") + ReadPowerSourceBatCommonDesignation() + : ReadAttribute("bat-common-designation") { } - ~ReadPowerSourceWiredAssessedInputFrequency() + ~ReadPowerSourceBatCommonDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); + LogNSError("PowerSource BatCommonDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20283,21 +19371,21 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedInputFrequency() - : SubscribeAttribute("wired-assessed-input-frequency") + SubscribeAttributePowerSourceBatCommonDesignation() + : SubscribeAttribute("bat-common-designation") { } - ~SubscribeAttributePowerSourceWiredAssessedInputFrequency() + ~SubscribeAttributePowerSourceBatCommonDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20312,10 +19400,10 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params + [cluster subscribeAttributeBatCommonDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20329,34 +19417,34 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib }; /* - * Attribute WiredCurrentType + * Attribute BatANSIDesignation */ -class ReadPowerSourceWiredCurrentType : public ReadAttribute { +class ReadPowerSourceBatANSIDesignation : public ReadAttribute { public: - ReadPowerSourceWiredCurrentType() - : ReadAttribute("wired-current-type") + ReadPowerSourceBatANSIDesignation() + : ReadAttribute("bat-ansidesignation") { } - ~ReadPowerSourceWiredCurrentType() + ~ReadPowerSourceBatANSIDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredCurrentType read Error", error); + LogNSError("PowerSource BatANSIDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20365,21 +19453,21 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredCurrentType() - : SubscribeAttribute("wired-current-type") + SubscribeAttributePowerSourceBatANSIDesignation() + : SubscribeAttribute("bat-ansidesignation") { } - ~SubscribeAttributePowerSourceWiredCurrentType() + ~SubscribeAttributePowerSourceBatANSIDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20394,10 +19482,10 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredCurrentTypeWithParams:params + [cluster subscribeAttributeBatANSIDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20411,34 +19499,34 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute }; /* - * Attribute WiredAssessedCurrent + * Attribute BatIECDesignation */ -class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { +class ReadPowerSourceBatIECDesignation : public ReadAttribute { public: - ReadPowerSourceWiredAssessedCurrent() - : ReadAttribute("wired-assessed-current") + ReadPowerSourceBatIECDesignation() + : ReadAttribute("bat-iecdesignation") { } - ~ReadPowerSourceWiredAssessedCurrent() + ~ReadPowerSourceBatIECDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedCurrent read Error", error); + LogNSError("PowerSource BatIECDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20447,21 +19535,21 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedCurrent() - : SubscribeAttribute("wired-assessed-current") + SubscribeAttributePowerSourceBatIECDesignation() + : SubscribeAttribute("bat-iecdesignation") { } - ~SubscribeAttributePowerSourceWiredAssessedCurrent() + ~SubscribeAttributePowerSourceBatIECDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20476,10 +19564,10 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedCurrentWithParams:params + [cluster subscribeAttributeBatIECDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20493,34 +19581,34 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib }; /* - * Attribute WiredNominalVoltage + * Attribute BatApprovedChemistry */ -class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { +class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { public: - ReadPowerSourceWiredNominalVoltage() - : ReadAttribute("wired-nominal-voltage") + ReadPowerSourceBatApprovedChemistry() + : ReadAttribute("bat-approved-chemistry") { } - ~ReadPowerSourceWiredNominalVoltage() + ~ReadPowerSourceBatApprovedChemistry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredNominalVoltage read Error", error); + LogNSError("PowerSource BatApprovedChemistry read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20529,21 +19617,21 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredNominalVoltage() - : SubscribeAttribute("wired-nominal-voltage") + SubscribeAttributePowerSourceBatApprovedChemistry() + : SubscribeAttribute("bat-approved-chemistry") { } - ~SubscribeAttributePowerSourceWiredNominalVoltage() + ~SubscribeAttributePowerSourceBatApprovedChemistry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20558,10 +19646,10 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredNominalVoltageWithParams:params + [cluster subscribeAttributeBatApprovedChemistryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20575,34 +19663,34 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu }; /* - * Attribute WiredMaximumCurrent + * Attribute BatCapacity */ -class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { +class ReadPowerSourceBatCapacity : public ReadAttribute { public: - ReadPowerSourceWiredMaximumCurrent() - : ReadAttribute("wired-maximum-current") + ReadPowerSourceBatCapacity() + : ReadAttribute("bat-capacity") { } - ~ReadPowerSourceWiredMaximumCurrent() + ~ReadPowerSourceBatCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredMaximumCurrent read Error", error); + LogNSError("PowerSource BatCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20611,21 +19699,21 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredMaximumCurrent() - : SubscribeAttribute("wired-maximum-current") + SubscribeAttributePowerSourceBatCapacity() + : SubscribeAttribute("bat-capacity") { } - ~SubscribeAttributePowerSourceWiredMaximumCurrent() + ~SubscribeAttributePowerSourceBatCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20640,10 +19728,10 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredMaximumCurrentWithParams:params + [cluster subscribeAttributeBatCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20657,34 +19745,34 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu }; /* - * Attribute WiredPresent + * Attribute BatQuantity */ -class ReadPowerSourceWiredPresent : public ReadAttribute { +class ReadPowerSourceBatQuantity : public ReadAttribute { public: - ReadPowerSourceWiredPresent() - : ReadAttribute("wired-present") + ReadPowerSourceBatQuantity() + : ReadAttribute("bat-quantity") { } - ~ReadPowerSourceWiredPresent() + ~ReadPowerSourceBatQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredPresent response %@", [value description]); + [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredPresent read Error", error); + LogNSError("PowerSource BatQuantity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20693,21 +19781,21 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredPresent() - : SubscribeAttribute("wired-present") + SubscribeAttributePowerSourceBatQuantity() + : SubscribeAttribute("bat-quantity") { } - ~SubscribeAttributePowerSourceWiredPresent() + ~SubscribeAttributePowerSourceBatQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20722,10 +19810,10 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredPresentWithParams:params + [cluster subscribeAttributeBatQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredPresent response %@", [value description]); + NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20739,34 +19827,34 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { }; /* - * Attribute ActiveWiredFaults + * Attribute BatChargeState */ -class ReadPowerSourceActiveWiredFaults : public ReadAttribute { +class ReadPowerSourceBatChargeState : public ReadAttribute { public: - ReadPowerSourceActiveWiredFaults() - : ReadAttribute("active-wired-faults") + ReadPowerSourceBatChargeState() + : ReadAttribute("bat-charge-state") { } - ~ReadPowerSourceActiveWiredFaults() + ~ReadPowerSourceBatChargeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveWiredFaults read Error", error); + LogNSError("PowerSource BatChargeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20775,21 +19863,21 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { public: - SubscribeAttributePowerSourceActiveWiredFaults() - : SubscribeAttribute("active-wired-faults") + SubscribeAttributePowerSourceBatChargeState() + : SubscribeAttribute("bat-charge-state") { } - ~SubscribeAttributePowerSourceActiveWiredFaults() + ~SubscribeAttributePowerSourceBatChargeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20804,10 +19892,10 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveWiredFaultsWithParams:params + [cluster subscribeAttributeBatChargeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20821,34 +19909,34 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute }; /* - * Attribute BatVoltage + * Attribute BatTimeToFullCharge */ -class ReadPowerSourceBatVoltage : public ReadAttribute { +class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { public: - ReadPowerSourceBatVoltage() - : ReadAttribute("bat-voltage") + ReadPowerSourceBatTimeToFullCharge() + : ReadAttribute("bat-time-to-full-charge") { } - ~ReadPowerSourceBatVoltage() + ~ReadPowerSourceBatTimeToFullCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatVoltage response %@", [value description]); + [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatVoltage read Error", error); + LogNSError("PowerSource BatTimeToFullCharge read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20857,21 +19945,21 @@ class ReadPowerSourceBatVoltage : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatVoltage() - : SubscribeAttribute("bat-voltage") + SubscribeAttributePowerSourceBatTimeToFullCharge() + : SubscribeAttribute("bat-time-to-full-charge") { } - ~SubscribeAttributePowerSourceBatVoltage() + ~SubscribeAttributePowerSourceBatTimeToFullCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20886,10 +19974,10 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatVoltageWithParams:params + [cluster subscribeAttributeBatTimeToFullChargeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatVoltage response %@", [value description]); + NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20903,34 +19991,34 @@ class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { }; /* - * Attribute BatPercentRemaining + * Attribute BatFunctionalWhileCharging */ -class ReadPowerSourceBatPercentRemaining : public ReadAttribute { +class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { public: - ReadPowerSourceBatPercentRemaining() - : ReadAttribute("bat-percent-remaining") + ReadPowerSourceBatFunctionalWhileCharging() + : ReadAttribute("bat-functional-while-charging") { } - ~ReadPowerSourceBatPercentRemaining() + ~ReadPowerSourceBatFunctionalWhileCharging() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); + [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatPercentRemaining read Error", error); + LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20939,21 +20027,21 @@ class ReadPowerSourceBatPercentRemaining : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatPercentRemaining() - : SubscribeAttribute("bat-percent-remaining") + SubscribeAttributePowerSourceBatFunctionalWhileCharging() + : SubscribeAttribute("bat-functional-while-charging") { } - ~SubscribeAttributePowerSourceBatPercentRemaining() + ~SubscribeAttributePowerSourceBatFunctionalWhileCharging() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -20968,10 +20056,10 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatPercentRemainingWithParams:params + [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); + NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20985,34 +20073,34 @@ class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribu }; /* - * Attribute BatTimeRemaining + * Attribute BatChargingCurrent */ -class ReadPowerSourceBatTimeRemaining : public ReadAttribute { +class ReadPowerSourceBatChargingCurrent : public ReadAttribute { public: - ReadPowerSourceBatTimeRemaining() - : ReadAttribute("bat-time-remaining") + ReadPowerSourceBatChargingCurrent() + : ReadAttribute("bat-charging-current") { } - ~ReadPowerSourceBatTimeRemaining() + ~ReadPowerSourceBatChargingCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); + [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatTimeRemaining read Error", error); + LogNSError("PowerSource BatChargingCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21021,21 +20109,21 @@ class ReadPowerSourceBatTimeRemaining : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatTimeRemaining() - : SubscribeAttribute("bat-time-remaining") + SubscribeAttributePowerSourceBatChargingCurrent() + : SubscribeAttribute("bat-charging-current") { } - ~SubscribeAttributePowerSourceBatTimeRemaining() + ~SubscribeAttributePowerSourceBatChargingCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21050,10 +20138,10 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatTimeRemainingWithParams:params + [cluster subscribeAttributeBatChargingCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); + NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21067,34 +20155,34 @@ class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute }; /* - * Attribute BatChargeLevel + * Attribute ActiveBatChargeFaults */ -class ReadPowerSourceBatChargeLevel : public ReadAttribute { +class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { public: - ReadPowerSourceBatChargeLevel() - : ReadAttribute("bat-charge-level") + ReadPowerSourceActiveBatChargeFaults() + : ReadAttribute("active-bat-charge-faults") { } - ~ReadPowerSourceBatChargeLevel() + ~ReadPowerSourceActiveBatChargeFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargeLevel read Error", error); + LogNSError("PowerSource ActiveBatChargeFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21103,21 +20191,21 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargeLevel() - : SubscribeAttribute("bat-charge-level") + SubscribeAttributePowerSourceActiveBatChargeFaults() + : SubscribeAttribute("active-bat-charge-faults") { } - ~SubscribeAttributePowerSourceBatChargeLevel() + ~SubscribeAttributePowerSourceActiveBatChargeFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21132,10 +20220,10 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargeLevelWithParams:params + [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21149,34 +20237,34 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { }; /* - * Attribute BatReplacementNeeded + * Attribute EndpointList */ -class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { +class ReadPowerSourceEndpointList : public ReadAttribute { public: - ReadPowerSourceBatReplacementNeeded() - : ReadAttribute("bat-replacement-needed") + ReadPowerSourceEndpointList() + : ReadAttribute("endpoint-list") { } - ~ReadPowerSourceBatReplacementNeeded() + ~ReadPowerSourceEndpointList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EndpointList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatReplacementNeeded read Error", error); + LogNSError("PowerSource EndpointList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21185,21 +20273,21 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttribute { +class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplacementNeeded() - : SubscribeAttribute("bat-replacement-needed") + SubscribeAttributePowerSourceEndpointList() + : SubscribeAttribute("endpoint-list") { } - ~SubscribeAttributePowerSourceBatReplacementNeeded() + ~SubscribeAttributePowerSourceEndpointList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21214,10 +20302,10 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplacementNeededWithParams:params + [cluster subscribeAttributeEndpointListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EndpointList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21231,34 +20319,34 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib }; /* - * Attribute BatReplaceability + * Attribute GeneratedCommandList */ -class ReadPowerSourceBatReplaceability : public ReadAttribute { +class ReadPowerSourceGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceBatReplaceability() - : ReadAttribute("bat-replaceability") + ReadPowerSourceGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceBatReplaceability() + ~ReadPowerSourceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatReplaceability read Error", error); + LogNSError("PowerSource GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21267,21 +20355,21 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute { +class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplaceability() - : SubscribeAttribute("bat-replaceability") + SubscribeAttributePowerSourceGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceBatReplaceability() + ~SubscribeAttributePowerSourceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21296,10 +20384,10 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplaceabilityWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21313,34 +20401,34 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute }; /* - * Attribute BatPresent + * Attribute AcceptedCommandList */ -class ReadPowerSourceBatPresent : public ReadAttribute { +class ReadPowerSourceAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceBatPresent() - : ReadAttribute("bat-present") + ReadPowerSourceAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceBatPresent() + ~ReadPowerSourceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPresent response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatPresent read Error", error); + LogNSError("PowerSource AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21349,21 +20437,21 @@ class ReadPowerSourceBatPresent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { +class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatPresent() - : SubscribeAttribute("bat-present") + SubscribeAttributePowerSourceAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceBatPresent() + ~SubscribeAttributePowerSourceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21378,10 +20466,10 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatPresentWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPresent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21394,35 +20482,37 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveBatFaults + * Attribute EventList */ -class ReadPowerSourceActiveBatFaults : public ReadAttribute { +class ReadPowerSourceEventList : public ReadAttribute { public: - ReadPowerSourceActiveBatFaults() - : ReadAttribute("active-bat-faults") + ReadPowerSourceEventList() + : ReadAttribute("event-list") { } - ~ReadPowerSourceActiveBatFaults() + ~ReadPowerSourceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveBatFaults read Error", error); + LogNSError("PowerSource EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21431,21 +20521,21 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { +class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceActiveBatFaults() - : SubscribeAttribute("active-bat-faults") + SubscribeAttributePowerSourceEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceActiveBatFaults() + ~SubscribeAttributePowerSourceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21460,10 +20550,10 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveBatFaultsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); + NSLog(@"PowerSource.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21476,35 +20566,37 @@ class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute BatReplacementDescription + * Attribute AttributeList */ -class ReadPowerSourceBatReplacementDescription : public ReadAttribute { +class ReadPowerSourceAttributeList : public ReadAttribute { public: - ReadPowerSourceBatReplacementDescription() - : ReadAttribute("bat-replacement-description") + ReadPowerSourceAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPowerSourceBatReplacementDescription() + ~ReadPowerSourceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatReplacementDescription read Error", error); + LogNSError("PowerSource AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21513,21 +20605,21 @@ class ReadPowerSourceBatReplacementDescription : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeAttribute { +class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplacementDescription() - : SubscribeAttribute("bat-replacement-description") + SubscribeAttributePowerSourceAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceBatReplacementDescription() + ~SubscribeAttributePowerSourceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21542,10 +20634,10 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplacementDescriptionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21559,34 +20651,34 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA }; /* - * Attribute BatCommonDesignation + * Attribute FeatureMap */ -class ReadPowerSourceBatCommonDesignation : public ReadAttribute { +class ReadPowerSourceFeatureMap : public ReadAttribute { public: - ReadPowerSourceBatCommonDesignation() - : ReadAttribute("bat-common-designation") + ReadPowerSourceFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPowerSourceBatCommonDesignation() + ~ReadPowerSourceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatCommonDesignation read Error", error); + LogNSError("PowerSource FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21595,21 +20687,21 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttribute { +class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatCommonDesignation() - : SubscribeAttribute("bat-common-designation") + SubscribeAttributePowerSourceFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceBatCommonDesignation() + ~SubscribeAttributePowerSourceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21624,10 +20716,10 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatCommonDesignationWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21641,34 +20733,34 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib }; /* - * Attribute BatANSIDesignation + * Attribute ClusterRevision */ -class ReadPowerSourceBatANSIDesignation : public ReadAttribute { +class ReadPowerSourceClusterRevision : public ReadAttribute { public: - ReadPowerSourceBatANSIDesignation() - : ReadAttribute("bat-ansidesignation") + ReadPowerSourceClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceBatANSIDesignation() + ~ReadPowerSourceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatANSIDesignation read Error", error); + LogNSError("PowerSource ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21677,21 +20769,21 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribute { +class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatANSIDesignation() - : SubscribeAttribute("bat-ansidesignation") + SubscribeAttributePowerSourceClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceBatANSIDesignation() + ~SubscribeAttributePowerSourceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -21706,10 +20798,10 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatANSIDesignationWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21722,117 +20814,292 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut } }; +/*----------------------------------------------------------------------------*\ +| Cluster GeneralCommissioning | 0x0030 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ArmFailSafe | 0x00 | +| * SetRegulatoryConfig | 0x02 | +| * CommissioningComplete | 0x04 | +| * SetTCAcknowledgements | 0x06 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Breadcrumb | 0x0000 | +| * BasicCommissioningInfo | 0x0001 | +| * RegulatoryConfig | 0x0002 | +| * LocationCapability | 0x0003 | +| * SupportsConcurrentConnection | 0x0004 | +| * TCAcceptedVersion | 0x0005 | +| * TCMinRequiredVersion | 0x0006 | +| * TCAcknowledgements | 0x0007 | +| * TCAcknowledgementsRequired | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute BatIECDesignation + * Command ArmFailSafe */ -class ReadPowerSourceBatIECDesignation : public ReadAttribute { +class GeneralCommissioningArmFailSafe : public ClusterCommand { public: - ReadPowerSourceBatIECDesignation() - : ReadAttribute("bat-iecdesignation") + GeneralCommissioningArmFailSafe() + : ClusterCommand("arm-fail-safe") { + AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } - ~ReadPowerSourceBatIECDesignation() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:mRequest.expiryLengthSeconds]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster armFailSafeWithParams:params completion: + ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; +}; + +/* + * Command SetRegulatoryConfig + */ +class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { +public: + GeneralCommissioningSetRegulatoryConfig() + : ClusterCommand("set-regulatory-config") { + AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); + AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerSource BatIECDesignation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newRegulatoryConfig = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.newRegulatoryConfig)]; + params.countryCode = [[NSString alloc] initWithBytes:mRequest.countryCode.data() length:mRequest.countryCode.size() encoding:NSUTF8StringEncoding]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setRegulatoryConfigWithParams:params completion: + ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; }; -class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute { +/* + * Command CommissioningComplete + */ +class GeneralCommissioningCommissioningComplete : public ClusterCommand { public: - SubscribeAttributePowerSourceBatIECDesignation() - : SubscribeAttribute("bat-iecdesignation") + GeneralCommissioningCommissioningComplete() + : ClusterCommand("commissioning-complete") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributePowerSourceBatIECDesignation() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster commissioningCompleteWithParams:params completion: + ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTCAcknowledgements + */ +class GeneralCommissioningSetTCAcknowledgements : public ClusterCommand { +public: + GeneralCommissioningSetTCAcknowledgements() + : ClusterCommand("set-tcacknowledgements") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TCVersion", 0, UINT16_MAX, &mRequest.TCVersion); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TCUserResponse", 0, UINT16_MAX, &mRequest.TCUserResponse); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgements::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterSetTCAcknowledgementsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.tcVersion = [NSNumber numberWithUnsignedShort:mRequest.TCVersion]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.tcUserResponse = [NSNumber numberWithUnsignedShort:mRequest.TCUserResponse]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTCAcknowledgementsWithParams:params completion: + ^(MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgementsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgementsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeBatIECDesignationWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgements::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute BatApprovedChemistry + * Attribute Breadcrumb */ -class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { +class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { public: - ReadPowerSourceBatApprovedChemistry() - : ReadAttribute("bat-approved-chemistry") + ReadGeneralCommissioningBreadcrumb() + : ReadAttribute("breadcrumb") { } - ~ReadPowerSourceBatApprovedChemistry() + ~ReadGeneralCommissioningBreadcrumb() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatApprovedChemistry read Error", error); + LogNSError("GeneralCommissioning Breadcrumb read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21841,25 +21108,66 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttribute { +class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { public: - SubscribeAttributePowerSourceBatApprovedChemistry() - : SubscribeAttribute("bat-approved-chemistry") + WriteGeneralCommissioningBreadcrumb() + : WriteAttribute("breadcrumb") { + AddArgument("attr-name", "breadcrumb"); + AddArgument("attr-value", 0, UINT64_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePowerSourceBatApprovedChemistry() + ~WriteGeneralCommissioningBreadcrumb() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedLongLong:mValue]; + + [cluster writeAttributeBreadcrumbWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GeneralCommissioning Breadcrumb write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint64_t mValue; +}; + +class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribute { +public: + SubscribeAttributeGeneralCommissioningBreadcrumb() + : SubscribeAttribute("breadcrumb") + { + } + + ~SubscribeAttributeGeneralCommissioningBreadcrumb() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21870,10 +21178,10 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatApprovedChemistryWithParams:params + [cluster subscribeAttributeBreadcrumbWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21887,34 +21195,34 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib }; /* - * Attribute BatCapacity + * Attribute BasicCommissioningInfo */ -class ReadPowerSourceBatCapacity : public ReadAttribute { +class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { public: - ReadPowerSourceBatCapacity() - : ReadAttribute("bat-capacity") + ReadGeneralCommissioningBasicCommissioningInfo() + : ReadAttribute("basic-commissioning-info") { } - ~ReadPowerSourceBatCapacity() + ~ReadGeneralCommissioningBasicCommissioningInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBasicCommissioningInfoWithCompletion:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatCapacity read Error", error); + LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21923,25 +21231,25 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatCapacity() - : SubscribeAttribute("bat-capacity") + SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() + : SubscribeAttribute("basic-commissioning-info") { } - ~SubscribeAttributePowerSourceBatCapacity() + ~SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21952,10 +21260,10 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatCapacityWithParams:params + [cluster subscribeAttributeBasicCommissioningInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCapacity response %@", [value description]); + reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21969,34 +21277,34 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { }; /* - * Attribute BatQuantity + * Attribute RegulatoryConfig */ -class ReadPowerSourceBatQuantity : public ReadAttribute { +class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { public: - ReadPowerSourceBatQuantity() - : ReadAttribute("bat-quantity") + ReadGeneralCommissioningRegulatoryConfig() + : ReadAttribute("regulatory-config") { } - ~ReadPowerSourceBatQuantity() + ~ReadGeneralCommissioningRegulatoryConfig() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatQuantity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatQuantity read Error", error); + LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22005,25 +21313,25 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatQuantity() - : SubscribeAttribute("bat-quantity") + SubscribeAttributeGeneralCommissioningRegulatoryConfig() + : SubscribeAttribute("regulatory-config") { } - ~SubscribeAttributePowerSourceBatQuantity() + ~SubscribeAttributeGeneralCommissioningRegulatoryConfig() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22034,10 +21342,10 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatQuantityWithParams:params + [cluster subscribeAttributeRegulatoryConfigWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatQuantity response %@", [value description]); + NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22051,34 +21359,34 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { }; /* - * Attribute BatChargeState + * Attribute LocationCapability */ -class ReadPowerSourceBatChargeState : public ReadAttribute { +class ReadGeneralCommissioningLocationCapability : public ReadAttribute { public: - ReadPowerSourceBatChargeState() - : ReadAttribute("bat-charge-state") + ReadGeneralCommissioningLocationCapability() + : ReadAttribute("location-capability") { } - ~ReadPowerSourceBatChargeState() + ~ReadGeneralCommissioningLocationCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargeState read Error", error); + LogNSError("GeneralCommissioning LocationCapability read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22087,25 +21395,25 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningLocationCapability : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargeState() - : SubscribeAttribute("bat-charge-state") + SubscribeAttributeGeneralCommissioningLocationCapability() + : SubscribeAttribute("location-capability") { } - ~SubscribeAttributePowerSourceBatChargeState() + ~SubscribeAttributeGeneralCommissioningLocationCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22116,10 +21424,10 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargeStateWithParams:params + [cluster subscribeAttributeLocationCapabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeState response %@", [value description]); + NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22133,34 +21441,34 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { }; /* - * Attribute BatTimeToFullCharge + * Attribute SupportsConcurrentConnection */ -class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { +class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribute { public: - ReadPowerSourceBatTimeToFullCharge() - : ReadAttribute("bat-time-to-full-charge") + ReadGeneralCommissioningSupportsConcurrentConnection() + : ReadAttribute("supports-concurrent-connection") { } - ~ReadPowerSourceBatTimeToFullCharge() + ~ReadGeneralCommissioningSupportsConcurrentConnection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatTimeToFullCharge read Error", error); + LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22169,25 +21477,25 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatTimeToFullCharge() - : SubscribeAttribute("bat-time-to-full-charge") + SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() + : SubscribeAttribute("supports-concurrent-connection") { } - ~SubscribeAttributePowerSourceBatTimeToFullCharge() + ~SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22198,10 +21506,10 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatTimeToFullChargeWithParams:params + [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22214,35 +21522,37 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatFunctionalWhileCharging + * Attribute TCAcceptedVersion */ -class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { +class ReadGeneralCommissioningTCAcceptedVersion : public ReadAttribute { public: - ReadPowerSourceBatFunctionalWhileCharging() - : ReadAttribute("bat-functional-while-charging") + ReadGeneralCommissioningTCAcceptedVersion() + : ReadAttribute("tcaccepted-version") { } - ~ReadPowerSourceBatFunctionalWhileCharging() + ~ReadGeneralCommissioningTCAcceptedVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcceptedVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTCAcceptedVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCAcceptedVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); + LogNSError("GeneralCommissioning TCAcceptedVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22251,25 +21561,25 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningTCAcceptedVersion : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatFunctionalWhileCharging() - : SubscribeAttribute("bat-functional-while-charging") + SubscribeAttributeGeneralCommissioningTCAcceptedVersion() + : SubscribeAttribute("tcaccepted-version") { } - ~SubscribeAttributePowerSourceBatFunctionalWhileCharging() + ~SubscribeAttributeGeneralCommissioningTCAcceptedVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcceptedVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22280,10 +21590,10 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params + [cluster subscribeAttributeTCAcceptedVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + NSLog(@"GeneralCommissioning.TCAcceptedVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22296,35 +21606,38 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatChargingCurrent + * Attribute TCMinRequiredVersion */ -class ReadPowerSourceBatChargingCurrent : public ReadAttribute { +class ReadGeneralCommissioningTCMinRequiredVersion : public ReadAttribute { public: - ReadPowerSourceBatChargingCurrent() - : ReadAttribute("bat-charging-current") + ReadGeneralCommissioningTCMinRequiredVersion() + : ReadAttribute("tcmin-required-version") { } - ~ReadPowerSourceBatChargingCurrent() + ~ReadGeneralCommissioningTCMinRequiredVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCMinRequiredVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTCMinRequiredVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCMinRequiredVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargingCurrent read Error", error); + LogNSError("GeneralCommissioning TCMinRequiredVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22333,25 +21646,25 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningTCMinRequiredVersion : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargingCurrent() - : SubscribeAttribute("bat-charging-current") + SubscribeAttributeGeneralCommissioningTCMinRequiredVersion() + : SubscribeAttribute("tcmin-required-version") { } - ~SubscribeAttributePowerSourceBatChargingCurrent() + ~SubscribeAttributeGeneralCommissioningTCMinRequiredVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCMinRequiredVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22362,10 +21675,10 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargingCurrentWithParams:params + [cluster subscribeAttributeTCMinRequiredVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + NSLog(@"GeneralCommissioning.TCMinRequiredVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22378,35 +21691,38 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveBatChargeFaults + * Attribute TCAcknowledgements */ -class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { +class ReadGeneralCommissioningTCAcknowledgements : public ReadAttribute { public: - ReadPowerSourceActiveBatChargeFaults() - : ReadAttribute("active-bat-charge-faults") + ReadGeneralCommissioningTCAcknowledgements() + : ReadAttribute("tcacknowledgements") { } - ~ReadPowerSourceActiveBatChargeFaults() + ~ReadGeneralCommissioningTCAcknowledgements() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgements::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTCAcknowledgementsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCAcknowledgements response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveBatChargeFaults read Error", error); + LogNSError("GeneralCommissioning TCAcknowledgements read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22415,25 +21731,25 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningTCAcknowledgements : public SubscribeAttribute { public: - SubscribeAttributePowerSourceActiveBatChargeFaults() - : SubscribeAttribute("active-bat-charge-faults") + SubscribeAttributeGeneralCommissioningTCAcknowledgements() + : SubscribeAttribute("tcacknowledgements") { } - ~SubscribeAttributePowerSourceActiveBatChargeFaults() + ~SubscribeAttributeGeneralCommissioningTCAcknowledgements() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgements::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22444,10 +21760,10 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params + [cluster subscribeAttributeTCAcknowledgementsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCAcknowledgements response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22460,35 +21776,38 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EndpointList + * Attribute TCAcknowledgementsRequired */ -class ReadPowerSourceEndpointList : public ReadAttribute { +class ReadGeneralCommissioningTCAcknowledgementsRequired : public ReadAttribute { public: - ReadPowerSourceEndpointList() - : ReadAttribute("endpoint-list") + ReadGeneralCommissioningTCAcknowledgementsRequired() + : ReadAttribute("tcacknowledgements-required") { } - ~ReadPowerSourceEndpointList() + ~ReadGeneralCommissioningTCAcknowledgementsRequired() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgementsRequired::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EndpointList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTCAcknowledgementsRequiredWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCAcknowledgementsRequired response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource EndpointList read Error", error); + LogNSError("GeneralCommissioning TCAcknowledgementsRequired read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22497,25 +21816,25 @@ class ReadPowerSourceEndpointList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired : public SubscribeAttribute { public: - SubscribeAttributePowerSourceEndpointList() - : SubscribeAttribute("endpoint-list") + SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired() + : SubscribeAttribute("tcacknowledgements-required") { } - ~SubscribeAttributePowerSourceEndpointList() + ~SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgementsRequired::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22526,10 +21845,10 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndpointListWithParams:params + [cluster subscribeAttributeTCAcknowledgementsRequiredWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EndpointList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.TCAcknowledgementsRequired response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22542,35 +21861,37 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadPowerSourceGeneratedCommandList : public ReadAttribute { +class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceGeneratedCommandList() + ReadGeneralCommissioningGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceGeneratedCommandList() + ~ReadGeneralCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource GeneratedCommandList read Error", error); + LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22579,25 +21900,25 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceGeneratedCommandList() + SubscribeAttributeGeneralCommissioningGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceGeneratedCommandList() + ~SubscribeAttributeGeneralCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; - + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22611,7 +21932,7 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22627,32 +21948,32 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib /* * Attribute AcceptedCommandList */ -class ReadPowerSourceAcceptedCommandList : public ReadAttribute { +class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceAcceptedCommandList() + ReadGeneralCommissioningAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceAcceptedCommandList() + ~ReadGeneralCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource AcceptedCommandList read Error", error); + LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22661,25 +21982,25 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceAcceptedCommandList() + SubscribeAttributeGeneralCommissioningAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceAcceptedCommandList() + ~SubscribeAttributeGeneralCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22693,7 +22014,7 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22711,32 +22032,32 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu /* * Attribute EventList */ -class ReadPowerSourceEventList : public ReadAttribute { +class ReadGeneralCommissioningEventList : public ReadAttribute { public: - ReadPowerSourceEventList() + ReadGeneralCommissioningEventList() : ReadAttribute("event-list") { } - ~ReadPowerSourceEventList() + ~ReadGeneralCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource EventList read Error", error); + LogNSError("GeneralCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22745,25 +22066,25 @@ class ReadPowerSourceEventList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceEventList() + SubscribeAttributeGeneralCommissioningEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceEventList() + ~SubscribeAttributeGeneralCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22777,7 +22098,7 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22795,32 +22116,32 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadPowerSourceAttributeList : public ReadAttribute { +class ReadGeneralCommissioningAttributeList : public ReadAttribute { public: - ReadPowerSourceAttributeList() + ReadGeneralCommissioningAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPowerSourceAttributeList() + ~ReadGeneralCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AttributeList response %@", [value description]); + NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource AttributeList read Error", error); + LogNSError("GeneralCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22829,25 +22150,25 @@ class ReadPowerSourceAttributeList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceAttributeList() + SubscribeAttributeGeneralCommissioningAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceAttributeList() + ~SubscribeAttributeGeneralCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22861,7 +22182,7 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AttributeList response %@", [value description]); + NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22877,32 +22198,32 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadPowerSourceFeatureMap : public ReadAttribute { +class ReadGeneralCommissioningFeatureMap : public ReadAttribute { public: - ReadPowerSourceFeatureMap() + ReadGeneralCommissioningFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPowerSourceFeatureMap() + ~ReadGeneralCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.FeatureMap response %@", [value description]); + NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource FeatureMap read Error", error); + LogNSError("GeneralCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22911,25 +22232,25 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceFeatureMap() + SubscribeAttributeGeneralCommissioningFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceFeatureMap() + ~SubscribeAttributeGeneralCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22943,7 +22264,7 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.FeatureMap response %@", [value description]); + NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22959,32 +22280,32 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadPowerSourceClusterRevision : public ReadAttribute { +class ReadGeneralCommissioningClusterRevision : public ReadAttribute { public: - ReadPowerSourceClusterRevision() + ReadGeneralCommissioningClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceClusterRevision() + ~ReadGeneralCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ClusterRevision read Error", error); + LogNSError("GeneralCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22993,25 +22314,25 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceClusterRevision() + SubscribeAttributeGeneralCommissioningClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceClusterRevision() + ~SubscribeAttributeGeneralCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23025,7 +22346,7 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23039,24 +22360,29 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster GeneralCommissioning | 0x0030 | +| Cluster NetworkCommissioning | 0x0031 | |------------------------------------------------------------------------------| | Commands: | | -| * ArmFailSafe | 0x00 | -| * SetRegulatoryConfig | 0x02 | -| * CommissioningComplete | 0x04 | -| * SetTCAcknowledgements | 0x06 | +| * ScanNetworks | 0x00 | +| * AddOrUpdateWiFiNetwork | 0x02 | +| * AddOrUpdateThreadNetwork | 0x03 | +| * RemoveNetwork | 0x04 | +| * ConnectNetwork | 0x06 | +| * ReorderNetwork | 0x08 | +| * QueryIdentity | 0x09 | |------------------------------------------------------------------------------| | Attributes: | | -| * Breadcrumb | 0x0000 | -| * BasicCommissioningInfo | 0x0001 | -| * RegulatoryConfig | 0x0002 | -| * LocationCapability | 0x0003 | -| * SupportsConcurrentConnection | 0x0004 | -| * TCAcceptedVersion | 0x0005 | -| * TCMinRequiredVersion | 0x0006 | -| * TCAcknowledgements | 0x0007 | -| * TCAcknowledgementsRequired | 0x0008 | +| * MaxNetworks | 0x0000 | +| * Networks | 0x0001 | +| * ScanMaxTimeSeconds | 0x0002 | +| * ConnectMaxTimeSeconds | 0x0003 | +| * InterfaceEnabled | 0x0004 | +| * LastNetworkingStatus | 0x0005 | +| * LastNetworkID | 0x0006 | +| * LastConnectErrorValue | 0x0007 | +| * SupportedWiFiBands | 0x0008 | +| * SupportedThreadFeatures | 0x0009 | +| * ThreadVersion | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -23068,330 +22394,527 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command ArmFailSafe + * Command ScanNetworks */ -class GeneralCommissioningArmFailSafe : public ClusterCommand { +class NetworkCommissioningScanNetworks : public ClusterCommand { public: - GeneralCommissioningArmFailSafe() - : ClusterCommand("arm-fail-safe") + NetworkCommissioningScanNetworks() + : ClusterCommand("scan-networks") { - AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Ssid", &mRequest.ssid); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:mRequest.expiryLengthSeconds]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + if (mRequest.ssid.HasValue()) { + if (mRequest.ssid.Value().IsNull()) { + params.ssid = nil; + } else { + params.ssid = [NSData dataWithBytes:mRequest.ssid.Value().Value().data() length:mRequest.ssid.Value().Value().size()]; + } + } else { + params.ssid = nil; + } + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster armFailSafeWithParams:params completion: - ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster scanNetworksWithParams:params completion: + ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; }; /* - * Command SetRegulatoryConfig + * Command AddOrUpdateWiFiNetwork */ -class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { +class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { public: - GeneralCommissioningSetRegulatoryConfig() - : ClusterCommand("set-regulatory-config") + NetworkCommissioningAddOrUpdateWiFiNetwork() + : ClusterCommand("add-or-update-wi-fi-network") { - AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); - AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Credentials", &mRequest.credentials); AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); +#if MTR_ENABLE_PROVISIONAL + AddArgument("NetworkIdentity", &mRequest.networkIdentity); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ClientIdentifier", &mRequest.clientIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newRegulatoryConfig = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.newRegulatoryConfig)]; - params.countryCode = [[NSString alloc] initWithBytes:mRequest.countryCode.data() length:mRequest.countryCode.size() encoding:NSUTF8StringEncoding]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + params.ssid = [NSData dataWithBytes:mRequest.ssid.data() length:mRequest.ssid.size()]; + params.credentials = [NSData dataWithBytes:mRequest.credentials.data() length:mRequest.credentials.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } +#if MTR_ENABLE_PROVISIONAL + if (mRequest.networkIdentity.HasValue()) { + params.networkIdentity = [NSData dataWithBytes:mRequest.networkIdentity.Value().data() length:mRequest.networkIdentity.Value().size()]; + } else { + params.networkIdentity = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.clientIdentifier.HasValue()) { + params.clientIdentifier = [NSData dataWithBytes:mRequest.clientIdentifier.Value().data() length:mRequest.clientIdentifier.Value().size()]; + } else { + params.clientIdentifier = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = nil; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setRegulatoryConfigWithParams:params completion: - ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addOrUpdateWiFiNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; /* - * Command CommissioningComplete + * Command AddOrUpdateThreadNetwork */ -class GeneralCommissioningCommissioningComplete : public ClusterCommand { +class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { public: - GeneralCommissioningCommissioningComplete() - : ClusterCommand("commissioning-complete") + NetworkCommissioningAddOrUpdateThreadNetwork() + : ClusterCommand("add-or-update-thread-network") { + AddArgument("OperationalDataset", &mRequest.operationalDataset); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster commissioningCompleteWithParams:params completion: - ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addOrUpdateThreadNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL /* - * Command SetTCAcknowledgements + * Command RemoveNetwork */ -class GeneralCommissioningSetTCAcknowledgements : public ClusterCommand { +class NetworkCommissioningRemoveNetwork : public ClusterCommand { public: - GeneralCommissioningSetTCAcknowledgements() - : ClusterCommand("set-tcacknowledgements") + NetworkCommissioningRemoveNetwork() + : ClusterCommand("remove-network") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TCVersion", 0, UINT16_MAX, &mRequest.TCVersion); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TCUserResponse", 0, UINT16_MAX, &mRequest.TCUserResponse); -#endif // MTR_ENABLE_PROVISIONAL + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgements::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterSetTCAcknowledgementsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.tcVersion = [NSNumber numberWithUnsignedShort:mRequest.TCVersion]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.tcUserResponse = [NSNumber numberWithUnsignedShort:mRequest.TCUserResponse]; -#endif // MTR_ENABLE_PROVISIONAL + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTCAcknowledgementsWithParams:params completion: - ^(MTRGeneralCommissioningClusterSetTCAcknowledgementsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgementsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgementsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster removeNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::GeneralCommissioning::Commands::SetTCAcknowledgements::Type mRequest; + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL +/* + * Command ConnectNetwork + */ +class NetworkCommissioningConnectNetwork : public ClusterCommand { +public: + NetworkCommissioningConnectNetwork() + : ClusterCommand("connect-network") + { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster connectNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; +}; /* - * Attribute Breadcrumb + * Command ReorderNetwork */ -class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { +class NetworkCommissioningReorderNetwork : public ClusterCommand { public: - ReadGeneralCommissioningBreadcrumb() - : ReadAttribute("breadcrumb") + NetworkCommissioningReorderNetwork() + : ClusterCommand("reorder-network") { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } - ~ReadGeneralCommissioningBreadcrumb() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + params.networkIndex = [NSNumber numberWithUnsignedChar:mRequest.networkIndex]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster reorderNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command QueryIdentity + */ +class NetworkCommissioningQueryIdentity : public ClusterCommand { +public: + NetworkCommissioningQueryIdentity() + : ClusterCommand("query-identity") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("KeyIdentifier", &mRequest.keyIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("GeneralCommissioning Breadcrumb read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.keyIdentifier = [NSData dataWithBytes:mRequest.keyIdentifier.data() length:mRequest.keyIdentifier.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster queryIdentityWithParams:params completion: + ^(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; }; -class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute MaxNetworks + */ +class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { public: - WriteGeneralCommissioningBreadcrumb() - : WriteAttribute("breadcrumb") + ReadNetworkCommissioningMaxNetworks() + : ReadAttribute("max-networks") { - AddArgument("attr-name", "breadcrumb"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteGeneralCommissioningBreadcrumb() + ~ReadNetworkCommissioningMaxNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedLongLong:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeBreadcrumbWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GeneralCommissioning Breadcrumb write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("NetworkCommissioning MaxNetworks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint64_t mValue; }; -class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningBreadcrumb() - : SubscribeAttribute("breadcrumb") + SubscribeAttributeNetworkCommissioningMaxNetworks() + : SubscribeAttribute("max-networks") { } - ~SubscribeAttributeGeneralCommissioningBreadcrumb() + ~SubscribeAttributeNetworkCommissioningMaxNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23402,10 +22925,10 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBreadcrumbWithParams:params + [cluster subscribeAttributeMaxNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); + NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23419,34 +22942,34 @@ class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribu }; /* - * Attribute BasicCommissioningInfo + * Attribute Networks */ -class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { +class ReadNetworkCommissioningNetworks : public ReadAttribute { public: - ReadGeneralCommissioningBasicCommissioningInfo() - : ReadAttribute("basic-commissioning-info") + ReadNetworkCommissioningNetworks() + : ReadAttribute("networks") { } - ~ReadGeneralCommissioningBasicCommissioningInfo() + ~ReadNetworkCommissioningNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBasicCommissioningInfoWithCompletion:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); + LogNSError("NetworkCommissioning Networks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23455,25 +22978,25 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() - : SubscribeAttribute("basic-commissioning-info") + SubscribeAttributeNetworkCommissioningNetworks() + : SubscribeAttribute("networks") { } - ~SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() + ~SubscribeAttributeNetworkCommissioningNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23484,10 +23007,10 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBasicCommissioningInfoWithParams:params + [cluster subscribeAttributeNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23501,34 +23024,34 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs }; /* - * Attribute RegulatoryConfig + * Attribute ScanMaxTimeSeconds */ -class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { +class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { public: - ReadGeneralCommissioningRegulatoryConfig() - : ReadAttribute("regulatory-config") + ReadNetworkCommissioningScanMaxTimeSeconds() + : ReadAttribute("scan-max-time-seconds") { } - ~ReadGeneralCommissioningRegulatoryConfig() + ~ReadNetworkCommissioningScanMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); + LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23537,25 +23060,25 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningRegulatoryConfig() - : SubscribeAttribute("regulatory-config") + SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() + : SubscribeAttribute("scan-max-time-seconds") { } - ~SubscribeAttributeGeneralCommissioningRegulatoryConfig() + ~SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23566,10 +23089,10 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRegulatoryConfigWithParams:params + [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23583,34 +23106,34 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA }; /* - * Attribute LocationCapability + * Attribute ConnectMaxTimeSeconds */ -class ReadGeneralCommissioningLocationCapability : public ReadAttribute { +class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { public: - ReadGeneralCommissioningLocationCapability() - : ReadAttribute("location-capability") + ReadNetworkCommissioningConnectMaxTimeSeconds() + : ReadAttribute("connect-max-time-seconds") { } - ~ReadGeneralCommissioningLocationCapability() + ~ReadNetworkCommissioningConnectMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning LocationCapability read Error", error); + LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23619,25 +23142,25 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningLocationCapability : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningLocationCapability() - : SubscribeAttribute("location-capability") + SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() + : SubscribeAttribute("connect-max-time-seconds") { } - ~SubscribeAttributeGeneralCommissioningLocationCapability() + ~SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23648,10 +23171,10 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocationCapabilityWithParams:params + [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23665,34 +23188,34 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib }; /* - * Attribute SupportsConcurrentConnection + * Attribute InterfaceEnabled */ -class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribute { +class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { public: - ReadGeneralCommissioningSupportsConcurrentConnection() - : ReadAttribute("supports-concurrent-connection") + ReadNetworkCommissioningInterfaceEnabled() + : ReadAttribute("interface-enabled") { } - ~ReadGeneralCommissioningSupportsConcurrentConnection() + ~ReadNetworkCommissioningInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); + LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23701,25 +23224,66 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut } }; -class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : public SubscribeAttribute { +class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { public: - SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() - : SubscribeAttribute("supports-concurrent-connection") + WriteNetworkCommissioningInterfaceEnabled() + : WriteAttribute("interface-enabled") + { + AddArgument("attr-name", "interface-enabled"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteNetworkCommissioningInterfaceEnabled() { } - ~SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeInterfaceEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeAttribute { +public: + SubscribeAttributeNetworkCommissioningInterfaceEnabled() + : SubscribeAttribute("interface-enabled") + { + } + + ~SubscribeAttributeNetworkCommissioningInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23730,10 +23294,10 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params + [cluster subscribeAttributeInterfaceEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23746,37 +23310,35 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TCAcceptedVersion + * Attribute LastNetworkingStatus */ -class ReadGeneralCommissioningTCAcceptedVersion : public ReadAttribute { +class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { public: - ReadGeneralCommissioningTCAcceptedVersion() - : ReadAttribute("tcaccepted-version") + ReadNetworkCommissioningLastNetworkingStatus() + : ReadAttribute("last-networking-status") { } - ~ReadGeneralCommissioningTCAcceptedVersion() + ~ReadNetworkCommissioningLastNetworkingStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcceptedVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTCAcceptedVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcceptedVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning TCAcceptedVersion read Error", error); + LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23785,25 +23347,25 @@ class ReadGeneralCommissioningTCAcceptedVersion : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningTCAcceptedVersion : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningTCAcceptedVersion() - : SubscribeAttribute("tcaccepted-version") + SubscribeAttributeNetworkCommissioningLastNetworkingStatus() + : SubscribeAttribute("last-networking-status") { } - ~SubscribeAttributeGeneralCommissioningTCAcceptedVersion() + ~SubscribeAttributeNetworkCommissioningLastNetworkingStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcceptedVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23814,10 +23376,10 @@ class SubscribeAttributeGeneralCommissioningTCAcceptedVersion : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTCAcceptedVersionWithParams:params + [cluster subscribeAttributeLastNetworkingStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcceptedVersion response %@", [value description]); + NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23830,38 +23392,35 @@ class SubscribeAttributeGeneralCommissioningTCAcceptedVersion : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TCMinRequiredVersion + * Attribute LastNetworkID */ -class ReadGeneralCommissioningTCMinRequiredVersion : public ReadAttribute { +class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { public: - ReadGeneralCommissioningTCMinRequiredVersion() - : ReadAttribute("tcmin-required-version") + ReadNetworkCommissioningLastNetworkID() + : ReadAttribute("last-network-id") { } - ~ReadGeneralCommissioningTCMinRequiredVersion() + ~ReadNetworkCommissioningLastNetworkID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCMinRequiredVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTCMinRequiredVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCMinRequiredVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning TCMinRequiredVersion read Error", error); + LogNSError("NetworkCommissioning LastNetworkID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23870,25 +23429,25 @@ class ReadGeneralCommissioningTCMinRequiredVersion : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningTCMinRequiredVersion : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningTCMinRequiredVersion() - : SubscribeAttribute("tcmin-required-version") + SubscribeAttributeNetworkCommissioningLastNetworkID() + : SubscribeAttribute("last-network-id") { } - ~SubscribeAttributeGeneralCommissioningTCMinRequiredVersion() + ~SubscribeAttributeNetworkCommissioningLastNetworkID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCMinRequiredVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23899,10 +23458,10 @@ class SubscribeAttributeGeneralCommissioningTCMinRequiredVersion : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTCMinRequiredVersionWithParams:params + [cluster subscribeAttributeLastNetworkIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCMinRequiredVersion response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23915,38 +23474,35 @@ class SubscribeAttributeGeneralCommissioningTCMinRequiredVersion : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TCAcknowledgements + * Attribute LastConnectErrorValue */ -class ReadGeneralCommissioningTCAcknowledgements : public ReadAttribute { +class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { public: - ReadGeneralCommissioningTCAcknowledgements() - : ReadAttribute("tcacknowledgements") + ReadNetworkCommissioningLastConnectErrorValue() + : ReadAttribute("last-connect-error-value") { } - ~ReadGeneralCommissioningTCAcknowledgements() + ~ReadNetworkCommissioningLastConnectErrorValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgements::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTCAcknowledgementsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcknowledgements response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning TCAcknowledgements read Error", error); + LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23955,25 +23511,25 @@ class ReadGeneralCommissioningTCAcknowledgements : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningTCAcknowledgements : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningTCAcknowledgements() - : SubscribeAttribute("tcacknowledgements") + SubscribeAttributeNetworkCommissioningLastConnectErrorValue() + : SubscribeAttribute("last-connect-error-value") { } - ~SubscribeAttributeGeneralCommissioningTCAcknowledgements() + ~SubscribeAttributeNetworkCommissioningLastConnectErrorValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgements::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23984,10 +23540,10 @@ class SubscribeAttributeGeneralCommissioningTCAcknowledgements : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTCAcknowledgementsWithParams:params + [cluster subscribeAttributeLastConnectErrorValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcknowledgements response %@", [value description]); + NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24000,38 +23556,37 @@ class SubscribeAttributeGeneralCommissioningTCAcknowledgements : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute TCAcknowledgementsRequired + * Attribute SupportedWiFiBands */ -class ReadGeneralCommissioningTCAcknowledgementsRequired : public ReadAttribute { +class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { public: - ReadGeneralCommissioningTCAcknowledgementsRequired() - : ReadAttribute("tcacknowledgements-required") + ReadNetworkCommissioningSupportedWiFiBands() + : ReadAttribute("supported-wi-fi-bands") { } - ~ReadGeneralCommissioningTCAcknowledgementsRequired() + ~ReadNetworkCommissioningSupportedWiFiBands() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgementsRequired::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTCAcknowledgementsRequiredWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcknowledgementsRequired response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWiFiBandsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning TCAcknowledgementsRequired read Error", error); + LogNSError("NetworkCommissioning SupportedWiFiBands read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24040,25 +23595,25 @@ class ReadGeneralCommissioningTCAcknowledgementsRequired : public ReadAttribute } }; -class SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired() - : SubscribeAttribute("tcacknowledgements-required") + SubscribeAttributeNetworkCommissioningSupportedWiFiBands() + : SubscribeAttribute("supported-wi-fi-bands") { } - ~SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired() + ~SubscribeAttributeNetworkCommissioningSupportedWiFiBands() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::TCAcknowledgementsRequired::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24069,10 +23624,10 @@ class SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTCAcknowledgementsRequiredWithParams:params + [cluster subscribeAttributeSupportedWiFiBandsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.TCAcknowledgementsRequired response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24086,36 +23641,37 @@ class SubscribeAttributeGeneralCommissioningTCAcknowledgementsRequired : public }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute SupportedThreadFeatures */ -class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { +class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { public: - ReadGeneralCommissioningGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadNetworkCommissioningSupportedThreadFeatures() + : ReadAttribute("supported-thread-features") { } - ~ReadGeneralCommissioningGeneratedCommandList() + ~ReadNetworkCommissioningSupportedThreadFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedThreadFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); + LogNSError("NetworkCommissioning SupportedThreadFeatures read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24124,25 +23680,25 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() + : SubscribeAttribute("supported-thread-features") { } - ~SubscribeAttributeGeneralCommissioningGeneratedCommandList() + ~SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24153,10 +23709,10 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSupportedThreadFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24169,35 +23725,38 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute ThreadVersion */ -class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { +class ReadNetworkCommissioningThreadVersion : public ReadAttribute { public: - ReadGeneralCommissioningAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadNetworkCommissioningThreadVersion() + : ReadAttribute("thread-version") { } - ~ReadGeneralCommissioningAcceptedCommandList() + ~ReadNetworkCommissioningThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); + LogNSError("NetworkCommissioning ThreadVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24206,25 +23765,25 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeNetworkCommissioningThreadVersion() + : SubscribeAttribute("thread-version") { } - ~SubscribeAttributeGeneralCommissioningAcceptedCommandList() + ~SubscribeAttributeNetworkCommissioningThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24235,10 +23794,10 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeThreadVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24251,37 +23810,37 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } }; -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadGeneralCommissioningEventList : public ReadAttribute { +class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadGeneralCommissioningEventList() - : ReadAttribute("event-list") + ReadNetworkCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadGeneralCommissioningEventList() + ~ReadNetworkCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning EventList read Error", error); + LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24290,25 +23849,25 @@ class ReadGeneralCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeNetworkCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeGeneralCommissioningEventList() + ~SubscribeAttributeNetworkCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24319,10 +23878,10 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24335,37 +23894,35 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadGeneralCommissioningAttributeList : public ReadAttribute { +class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadGeneralCommissioningAttributeList() - : ReadAttribute("attribute-list") + ReadNetworkCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadGeneralCommissioningAttributeList() + ~ReadNetworkCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning AttributeList read Error", error); + LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24374,25 +23931,25 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeNetworkCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeGeneralCommissioningAttributeList() + ~SubscribeAttributeNetworkCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24403,10 +23960,10 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24419,35 +23976,37 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadGeneralCommissioningFeatureMap : public ReadAttribute { +class ReadNetworkCommissioningEventList : public ReadAttribute { public: - ReadGeneralCommissioningFeatureMap() - : ReadAttribute("feature-map") + ReadNetworkCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadGeneralCommissioningFeatureMap() + ~ReadNetworkCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning FeatureMap read Error", error); + LogNSError("NetworkCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24456,25 +24015,25 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeNetworkCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeGeneralCommissioningFeatureMap() + ~SubscribeAttributeNetworkCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24485,10 +24044,10 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24501,35 +24060,37 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadGeneralCommissioningClusterRevision : public ReadAttribute { +class ReadNetworkCommissioningAttributeList : public ReadAttribute { public: - ReadGeneralCommissioningClusterRevision() - : ReadAttribute("cluster-revision") + ReadNetworkCommissioningAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadGeneralCommissioningClusterRevision() + ~ReadNetworkCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning ClusterRevision read Error", error); + LogNSError("NetworkCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24538,25 +24099,25 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeNetworkCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeGeneralCommissioningClusterRevision() + ~SubscribeAttributeNetworkCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24567,10 +24128,10 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24583,535 +24144,277 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster NetworkCommissioning | 0x0031 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ScanNetworks | 0x00 | -| * AddOrUpdateWiFiNetwork | 0x02 | -| * AddOrUpdateThreadNetwork | 0x03 | -| * RemoveNetwork | 0x04 | -| * ConnectNetwork | 0x06 | -| * ReorderNetwork | 0x08 | -| * QueryIdentity | 0x09 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxNetworks | 0x0000 | -| * Networks | 0x0001 | -| * ScanMaxTimeSeconds | 0x0002 | -| * ConnectMaxTimeSeconds | 0x0003 | -| * InterfaceEnabled | 0x0004 | -| * LastNetworkingStatus | 0x0005 | -| * LastNetworkID | 0x0006 | -| * LastConnectErrorValue | 0x0007 | -| * SupportedWiFiBands | 0x0008 | -| * SupportedThreadFeatures | 0x0009 | -| * ThreadVersion | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ScanNetworks + * Attribute FeatureMap */ -class NetworkCommissioningScanNetworks : public ClusterCommand { +class ReadNetworkCommissioningFeatureMap : public ReadAttribute { public: - NetworkCommissioningScanNetworks() - : ClusterCommand("scan-networks") + ReadNetworkCommissioningFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadNetworkCommissioningFeatureMap() { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.ssid.HasValue()) { - if (mRequest.ssid.Value().IsNull()) { - params.ssid = nil; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - params.ssid = [NSData dataWithBytes:mRequest.ssid.Value().Value().data() length:mRequest.ssid.Value().Value().size()]; + LogNSError("NetworkCommissioning FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - } else { - params.ssid = nil; - } - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster scanNetworksWithParams:params completion: - ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; }; -/* - * Command AddOrUpdateWiFiNetwork - */ -class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { +class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribute { public: - NetworkCommissioningAddOrUpdateWiFiNetwork() - : ClusterCommand("add-or-update-wi-fi-network") + SubscribeAttributeNetworkCommissioningFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeNetworkCommissioningFeatureMap() { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Credentials", &mRequest.credentials); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); -#if MTR_ENABLE_PROVISIONAL - AddArgument("NetworkIdentity", &mRequest.networkIdentity); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ClientIdentifier", &mRequest.clientIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PossessionNonce", &mRequest.possessionNonce); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.ssid = [NSData dataWithBytes:mRequest.ssid.data() length:mRequest.ssid.size()]; - params.credentials = [NSData dataWithBytes:mRequest.credentials.data() length:mRequest.credentials.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } -#if MTR_ENABLE_PROVISIONAL - if (mRequest.networkIdentity.HasValue()) { - params.networkIdentity = [NSData dataWithBytes:mRequest.networkIdentity.Value().data() length:mRequest.networkIdentity.Value().size()]; - } else { - params.networkIdentity = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.clientIdentifier.HasValue()) { - params.clientIdentifier = [NSData dataWithBytes:mRequest.clientIdentifier.Value().data() length:mRequest.clientIdentifier.Value().size()]; - } else { - params.clientIdentifier = nil; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.possessionNonce.HasValue()) { - params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; - } else { - params.possessionNonce = nil; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addOrUpdateWiFiNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; /* - * Command AddOrUpdateThreadNetwork + * Attribute ClusterRevision */ -class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { +class ReadNetworkCommissioningClusterRevision : public ReadAttribute { public: - NetworkCommissioningAddOrUpdateThreadNetwork() - : ClusterCommand("add-or-update-thread-network") - { - AddArgument("OperationalDataset", &mRequest.operationalDataset); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadNetworkCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addOrUpdateThreadNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; -}; - -/* - * Command RemoveNetwork - */ -class NetworkCommissioningRemoveNetwork : public ClusterCommand { -public: - NetworkCommissioningRemoveNetwork() - : ClusterCommand("remove-network") + ~ReadNetworkCommissioningClusterRevision() { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("NetworkCommissioning ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; }; -/* - * Command ConnectNetwork - */ -class NetworkCommissioningConnectNetwork : public ClusterCommand { +class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAttribute { public: - NetworkCommissioningConnectNetwork() - : ClusterCommand("connect-network") - { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeNetworkCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster connectNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; -}; - -/* - * Command ReorderNetwork - */ -class NetworkCommissioningReorderNetwork : public ClusterCommand { -public: - NetworkCommissioningReorderNetwork() - : ClusterCommand("reorder-network") + ~SubscribeAttributeNetworkCommissioningClusterRevision() { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - params.networkIndex = [NSNumber numberWithUnsignedChar:mRequest.networkIndex]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster reorderNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster DiagnosticLogs | 0x0032 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RetrieveLogsRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command QueryIdentity + * Command RetrieveLogsRequest */ -class NetworkCommissioningQueryIdentity : public ClusterCommand { +class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { public: - NetworkCommissioningQueryIdentity() - : ClusterCommand("query-identity") + DiagnosticLogsRetrieveLogsRequest() + : ClusterCommand("retrieve-logs-request") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("KeyIdentifier", &mRequest.keyIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PossessionNonce", &mRequest.possessionNonce); -#endif // MTR_ENABLE_PROVISIONAL + AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); + AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); + AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.keyIdentifier = [NSData dataWithBytes:mRequest.keyIdentifier.data() length:mRequest.keyIdentifier.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.possessionNonce.HasValue()) { - params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + params.intent = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.intent)]; + params.requestedProtocol = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestedProtocol)]; + if (mRequest.transferFileDesignator.HasValue()) { + params.transferFileDesignator = [[NSString alloc] initWithBytes:mRequest.transferFileDesignator.Value().data() length:mRequest.transferFileDesignator.Value().size() encoding:NSUTF8StringEncoding]; } else { - params.possessionNonce = nil; + params.transferFileDesignator = nil; } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster queryIdentityWithParams:params completion: - ^(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster retrieveLogsRequestWithParams:params completion: + ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxNetworks + * Attribute GeneratedCommandList */ -class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { +class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { public: - ReadNetworkCommissioningMaxNetworks() - : ReadAttribute("max-networks") + ReadDiagnosticLogsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadNetworkCommissioningMaxNetworks() + ~ReadDiagnosticLogsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning MaxNetworks read Error", error); + LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25120,25 +24423,25 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningMaxNetworks() - : SubscribeAttribute("max-networks") + SubscribeAttributeDiagnosticLogsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeNetworkCommissioningMaxNetworks() + ~SubscribeAttributeDiagnosticLogsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25149,10 +24452,10 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxNetworksWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25166,34 +24469,34 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib }; /* - * Attribute Networks + * Attribute AcceptedCommandList */ -class ReadNetworkCommissioningNetworks : public ReadAttribute { +class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { public: - ReadNetworkCommissioningNetworks() - : ReadAttribute("networks") + ReadDiagnosticLogsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadNetworkCommissioningNetworks() + ~ReadDiagnosticLogsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning Networks read Error", error); + LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25202,25 +24505,25 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningNetworks() - : SubscribeAttribute("networks") + SubscribeAttributeDiagnosticLogsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeNetworkCommissioningNetworks() + ~SubscribeAttributeDiagnosticLogsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25231,10 +24534,10 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworksWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25247,35 +24550,37 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ScanMaxTimeSeconds + * Attribute EventList */ -class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { +class ReadDiagnosticLogsEventList : public ReadAttribute { public: - ReadNetworkCommissioningScanMaxTimeSeconds() - : ReadAttribute("scan-max-time-seconds") + ReadDiagnosticLogsEventList() + : ReadAttribute("event-list") { } - ~ReadNetworkCommissioningScanMaxTimeSeconds() + ~ReadDiagnosticLogsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); + LogNSError("DiagnosticLogs EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25284,25 +24589,25 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() - : SubscribeAttribute("scan-max-time-seconds") + SubscribeAttributeDiagnosticLogsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() + ~SubscribeAttributeDiagnosticLogsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25313,10 +24618,10 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25329,35 +24634,37 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib } }; -/* - * Attribute ConnectMaxTimeSeconds +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute AttributeList */ -class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { +class ReadDiagnosticLogsAttributeList : public ReadAttribute { public: - ReadNetworkCommissioningConnectMaxTimeSeconds() - : ReadAttribute("connect-max-time-seconds") + ReadDiagnosticLogsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadNetworkCommissioningConnectMaxTimeSeconds() + ~ReadDiagnosticLogsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); + LogNSError("DiagnosticLogs AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25366,25 +24673,25 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() - : SubscribeAttribute("connect-max-time-seconds") + SubscribeAttributeDiagnosticLogsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() + ~SubscribeAttributeDiagnosticLogsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25395,10 +24702,10 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25412,102 +24719,61 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc }; /* - * Attribute InterfaceEnabled + * Attribute FeatureMap */ -class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { +class ReadDiagnosticLogsFeatureMap : public ReadAttribute { public: - ReadNetworkCommissioningInterfaceEnabled() - : ReadAttribute("interface-enabled") + ReadDiagnosticLogsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadNetworkCommissioningInterfaceEnabled() + ~ReadDiagnosticLogsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { -public: - WriteNetworkCommissioningInterfaceEnabled() - : WriteAttribute("interface-enabled") - { - AddArgument("attr-name", "interface-enabled"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteNetworkCommissioningInterfaceEnabled() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeInterfaceEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + LogNSError("DiagnosticLogs FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningInterfaceEnabled() - : SubscribeAttribute("interface-enabled") + SubscribeAttributeDiagnosticLogsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeNetworkCommissioningInterfaceEnabled() + ~SubscribeAttributeDiagnosticLogsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25518,10 +24784,10 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterfaceEnabledWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); + NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25535,34 +24801,34 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA }; /* - * Attribute LastNetworkingStatus + * Attribute ClusterRevision */ -class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { +class ReadDiagnosticLogsClusterRevision : public ReadAttribute { public: - ReadNetworkCommissioningLastNetworkingStatus() - : ReadAttribute("last-networking-status") + ReadDiagnosticLogsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadNetworkCommissioningLastNetworkingStatus() + ~ReadDiagnosticLogsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); + LogNSError("DiagnosticLogs ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25571,25 +24837,25 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningLastNetworkingStatus() - : SubscribeAttribute("last-networking-status") + SubscribeAttributeDiagnosticLogsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeNetworkCommissioningLastNetworkingStatus() + ~SubscribeAttributeDiagnosticLogsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25600,10 +24866,10 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastNetworkingStatusWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25616,201 +24882,240 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr } }; +/*----------------------------------------------------------------------------*\ +| Cluster GeneralDiagnostics | 0x0033 | +|------------------------------------------------------------------------------| +| Commands: | | +| * TestEventTrigger | 0x00 | +| * TimeSnapshot | 0x01 | +| * PayloadTestRequest | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NetworkInterfaces | 0x0000 | +| * RebootCount | 0x0001 | +| * UpTime | 0x0002 | +| * TotalOperationalHours | 0x0003 | +| * BootReason | 0x0004 | +| * ActiveHardwareFaults | 0x0005 | +| * ActiveRadioFaults | 0x0006 | +| * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * HardwareFaultChange | 0x0000 | +| * RadioFaultChange | 0x0001 | +| * NetworkFaultChange | 0x0002 | +| * BootReason | 0x0003 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LastNetworkID + * Command TestEventTrigger */ -class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { +class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { public: - ReadNetworkCommissioningLastNetworkID() - : ReadAttribute("last-network-id") - { - } - - ~ReadNetworkCommissioningLastNetworkID() + GeneralDiagnosticsTestEventTrigger() + : ClusterCommand("test-event-trigger") { + AddArgument("EnableKey", &mRequest.enableKey); + AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("NetworkCommissioning LastNetworkID read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttribute { -public: - SubscribeAttributeNetworkCommissioningLastNetworkID() - : SubscribeAttribute("last-network-id") - { - } - - ~SubscribeAttributeNetworkCommissioningLastNetworkID() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; + params.eventTrigger = [NSNumber numberWithUnsignedLongLong:mRequest.eventTrigger]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster testEventTriggerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeLastNetworkIDWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; }; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute LastConnectErrorValue + * Command TimeSnapshot */ -class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { +class GeneralDiagnosticsTimeSnapshot : public ClusterCommand { public: - ReadNetworkCommissioningLastConnectErrorValue() - : ReadAttribute("last-connect-error-value") - { - } - - ~ReadNetworkCommissioningLastConnectErrorValue() + GeneralDiagnosticsTimeSnapshot() + : ClusterCommand("time-snapshot") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster timeSnapshotWithParams:params completion: + ^(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command PayloadTestRequest + */ +class GeneralDiagnosticsPayloadTestRequest : public ClusterCommand { public: - SubscribeAttributeNetworkCommissioningLastConnectErrorValue() - : SubscribeAttribute("last-connect-error-value") - { - } - - ~SubscribeAttributeNetworkCommissioningLastConnectErrorValue() + GeneralDiagnosticsPayloadTestRequest() + : ClusterCommand("payload-test-request") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("EnableKey", &mRequest.enableKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Value", 0, UINT8_MAX, &mRequest.value); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Count", 0, UINT16_MAX, &mRequest.count); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralDiagnosticsClusterPayloadTestRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.value = [NSNumber numberWithUnsignedChar:mRequest.value]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.count = [NSNumber numberWithUnsignedShort:mRequest.count]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster payloadTestRequestWithParams:params completion: + ^(MTRGeneralDiagnosticsClusterPayloadTestResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeLastConnectErrorValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestRequest::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedWiFiBands + * Attribute NetworkInterfaces */ -class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { +class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { public: - ReadNetworkCommissioningSupportedWiFiBands() - : ReadAttribute("supported-wi-fi-bands") + ReadGeneralDiagnosticsNetworkInterfaces() + : ReadAttribute("network-interfaces") { } - ~ReadNetworkCommissioningSupportedWiFiBands() + ~ReadGeneralDiagnosticsNetworkInterfaces() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWiFiBandsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning SupportedWiFiBands read Error", error); + LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25819,25 +25124,25 @@ class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningSupportedWiFiBands() - : SubscribeAttribute("supported-wi-fi-bands") + SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() + : SubscribeAttribute("network-interfaces") { } - ~SubscribeAttributeNetworkCommissioningSupportedWiFiBands() + ~SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25848,10 +25153,10 @@ class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWiFiBandsWithParams:params + [cluster subscribeAttributeNetworkInterfacesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); + NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25864,38 +25169,35 @@ class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedThreadFeatures + * Attribute RebootCount */ -class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { +class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { public: - ReadNetworkCommissioningSupportedThreadFeatures() - : ReadAttribute("supported-thread-features") + ReadGeneralDiagnosticsRebootCount() + : ReadAttribute("reboot-count") { } - ~ReadNetworkCommissioningSupportedThreadFeatures() + ~ReadGeneralDiagnosticsRebootCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedThreadFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning SupportedThreadFeatures read Error", error); + LogNSError("GeneralDiagnostics RebootCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25904,25 +25206,25 @@ class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() - : SubscribeAttribute("supported-thread-features") + SubscribeAttributeGeneralDiagnosticsRebootCount() + : SubscribeAttribute("reboot-count") { } - ~SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() + ~SubscribeAttributeGeneralDiagnosticsRebootCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25933,10 +25235,10 @@ class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedThreadFeaturesWithParams:params + [cluster subscribeAttributeRebootCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); + NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25949,38 +25251,35 @@ class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public Sub } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ThreadVersion + * Attribute UpTime */ -class ReadNetworkCommissioningThreadVersion : public ReadAttribute { +class ReadGeneralDiagnosticsUpTime : public ReadAttribute { public: - ReadNetworkCommissioningThreadVersion() - : ReadAttribute("thread-version") + ReadGeneralDiagnosticsUpTime() + : ReadAttribute("up-time") { } - ~ReadNetworkCommissioningThreadVersion() + ~ReadGeneralDiagnosticsUpTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ThreadVersion read Error", error); + LogNSError("GeneralDiagnostics UpTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25989,25 +25288,25 @@ class ReadNetworkCommissioningThreadVersion : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningThreadVersion() - : SubscribeAttribute("thread-version") + SubscribeAttributeGeneralDiagnosticsUpTime() + : SubscribeAttribute("up-time") { } - ~SubscribeAttributeNetworkCommissioningThreadVersion() + ~SubscribeAttributeGeneralDiagnosticsUpTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26018,10 +25317,10 @@ class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadVersionWithParams:params + [cluster subscribeAttributeUpTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); + NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26034,37 +25333,35 @@ class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute TotalOperationalHours */ -class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { public: - ReadNetworkCommissioningGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadGeneralDiagnosticsTotalOperationalHours() + : ReadAttribute("total-operational-hours") { } - ~ReadNetworkCommissioningGeneratedCommandList() + ~ReadGeneralDiagnosticsTotalOperationalHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); + LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26073,25 +25370,25 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() + : SubscribeAttribute("total-operational-hours") { } - ~SubscribeAttributeNetworkCommissioningGeneratedCommandList() + ~SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26102,10 +25399,10 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTotalOperationalHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26119,34 +25416,34 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute BootReason */ -class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsBootReason : public ReadAttribute { public: - ReadNetworkCommissioningAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadGeneralDiagnosticsBootReason() + : ReadAttribute("boot-reason") { } - ~ReadNetworkCommissioningAcceptedCommandList() + ~ReadGeneralDiagnosticsBootReason() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); + LogNSError("GeneralDiagnostics BootReason read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26155,25 +25452,25 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeGeneralDiagnosticsBootReason() + : SubscribeAttribute("boot-reason") { } - ~SubscribeAttributeNetworkCommissioningAcceptedCommandList() + ~SubscribeAttributeGeneralDiagnosticsBootReason() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26184,10 +25481,10 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBootReasonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26200,37 +25497,35 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ActiveHardwareFaults */ -class ReadNetworkCommissioningEventList : public ReadAttribute { +class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { public: - ReadNetworkCommissioningEventList() - : ReadAttribute("event-list") + ReadGeneralDiagnosticsActiveHardwareFaults() + : ReadAttribute("active-hardware-faults") { } - ~ReadNetworkCommissioningEventList() + ~ReadGeneralDiagnosticsActiveHardwareFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning EventList read Error", error); + LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26239,25 +25534,25 @@ class ReadNetworkCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() + : SubscribeAttribute("active-hardware-faults") { } - ~SubscribeAttributeNetworkCommissioningEventList() + ~SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26268,10 +25563,10 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeActiveHardwareFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26284,37 +25579,35 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ActiveRadioFaults */ -class ReadNetworkCommissioningAttributeList : public ReadAttribute { +class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { public: - ReadNetworkCommissioningAttributeList() - : ReadAttribute("attribute-list") + ReadGeneralDiagnosticsActiveRadioFaults() + : ReadAttribute("active-radio-faults") { } - ~ReadNetworkCommissioningAttributeList() + ~ReadGeneralDiagnosticsActiveRadioFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning AttributeList read Error", error); + LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26323,25 +25616,25 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() + : SubscribeAttribute("active-radio-faults") { } - ~SubscribeAttributeNetworkCommissioningAttributeList() + ~SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26352,10 +25645,10 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeActiveRadioFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26369,34 +25662,34 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute ActiveNetworkFaults */ -class ReadNetworkCommissioningFeatureMap : public ReadAttribute { +class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { public: - ReadNetworkCommissioningFeatureMap() - : ReadAttribute("feature-map") + ReadGeneralDiagnosticsActiveNetworkFaults() + : ReadAttribute("active-network-faults") { } - ~ReadNetworkCommissioningFeatureMap() + ~ReadGeneralDiagnosticsActiveNetworkFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning FeatureMap read Error", error); + LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26405,25 +25698,25 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() + : SubscribeAttribute("active-network-faults") { } - ~SubscribeAttributeNetworkCommissioningFeatureMap() + ~SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26434,10 +25727,10 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeActiveNetworkFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26451,34 +25744,34 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute TestEventTriggersEnabled */ -class ReadNetworkCommissioningClusterRevision : public ReadAttribute { +class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { public: - ReadNetworkCommissioningClusterRevision() - : ReadAttribute("cluster-revision") + ReadGeneralDiagnosticsTestEventTriggersEnabled() + : ReadAttribute("test-event-triggers-enabled") { } - ~ReadNetworkCommissioningClusterRevision() + ~ReadGeneralDiagnosticsTestEventTriggersEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ClusterRevision read Error", error); + LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26487,25 +25780,25 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() + : SubscribeAttribute("test-event-triggers-enabled") { } - ~SubscribeAttributeNetworkCommissioningClusterRevision() + ~SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26516,10 +25809,10 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26532,113 +25825,35 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster DiagnosticLogs | 0x0032 | -|------------------------------------------------------------------------------| -| Commands: | | -| * RetrieveLogsRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command RetrieveLogsRequest - */ -class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { -public: - DiagnosticLogsRetrieveLogsRequest() - : ClusterCommand("retrieve-logs-request") - { - AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); - AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); - AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.intent = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.intent)]; - params.requestedProtocol = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestedProtocol)]; - if (mRequest.transferFileDesignator.HasValue()) { - params.transferFileDesignator = [[NSString alloc] initWithBytes:mRequest.transferFileDesignator.Value().data() length:mRequest.transferFileDesignator.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.transferFileDesignator = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster retrieveLogsRequestWithParams:params completion: - ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; -}; - /* * Attribute GeneratedCommandList */ -class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadDiagnosticLogsGeneratedCommandList() + ReadGeneralDiagnosticsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadDiagnosticLogsGeneratedCommandList() + ~ReadGeneralDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); + LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26647,25 +25862,25 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsGeneratedCommandList() + SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDiagnosticLogsGeneratedCommandList() + ~SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26679,7 +25894,7 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26695,32 +25910,32 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt /* * Attribute AcceptedCommandList */ -class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadDiagnosticLogsAcceptedCommandList() + ReadGeneralDiagnosticsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadDiagnosticLogsAcceptedCommandList() + ~ReadGeneralDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); + LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26729,25 +25944,25 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsAcceptedCommandList() + SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDiagnosticLogsAcceptedCommandList() + ~SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26761,7 +25976,7 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26779,32 +25994,32 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr /* * Attribute EventList */ -class ReadDiagnosticLogsEventList : public ReadAttribute { +class ReadGeneralDiagnosticsEventList : public ReadAttribute { public: - ReadDiagnosticLogsEventList() + ReadGeneralDiagnosticsEventList() : ReadAttribute("event-list") { } - ~ReadDiagnosticLogsEventList() + ~ReadGeneralDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs EventList read Error", error); + LogNSError("GeneralDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26813,25 +26028,25 @@ class ReadDiagnosticLogsEventList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsEventList() + SubscribeAttributeGeneralDiagnosticsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDiagnosticLogsEventList() + ~SubscribeAttributeGeneralDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26845,7 +26060,7 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26863,32 +26078,32 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadDiagnosticLogsAttributeList : public ReadAttribute { +class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { public: - ReadDiagnosticLogsAttributeList() + ReadGeneralDiagnosticsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadDiagnosticLogsAttributeList() + ~ReadGeneralDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs AttributeList read Error", error); + LogNSError("GeneralDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26897,25 +26112,25 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsAttributeList() + SubscribeAttributeGeneralDiagnosticsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDiagnosticLogsAttributeList() + ~SubscribeAttributeGeneralDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26929,7 +26144,7 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26945,32 +26160,32 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadDiagnosticLogsFeatureMap : public ReadAttribute { +class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { public: - ReadDiagnosticLogsFeatureMap() + ReadGeneralDiagnosticsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadDiagnosticLogsFeatureMap() + ~ReadGeneralDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs FeatureMap read Error", error); + LogNSError("GeneralDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26979,25 +26194,25 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsFeatureMap() + SubscribeAttributeGeneralDiagnosticsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDiagnosticLogsFeatureMap() + ~SubscribeAttributeGeneralDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27011,7 +26226,7 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27027,32 +26242,32 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadDiagnosticLogsClusterRevision : public ReadAttribute { +class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { public: - ReadDiagnosticLogsClusterRevision() + ReadGeneralDiagnosticsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadDiagnosticLogsClusterRevision() + ~ReadGeneralDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs ClusterRevision read Error", error); + LogNSError("GeneralDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27061,25 +26276,25 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsClusterRevision() + SubscribeAttributeGeneralDiagnosticsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDiagnosticLogsClusterRevision() + ~SubscribeAttributeGeneralDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27093,7 +26308,7 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27107,23 +26322,16 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut }; /*----------------------------------------------------------------------------*\ -| Cluster GeneralDiagnostics | 0x0033 | +| Cluster SoftwareDiagnostics | 0x0034 | |------------------------------------------------------------------------------| | Commands: | | -| * TestEventTrigger | 0x00 | -| * TimeSnapshot | 0x01 | -| * PayloadTestRequest | 0x03 | +| * ResetWatermarks | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * NetworkInterfaces | 0x0000 | -| * RebootCount | 0x0001 | -| * UpTime | 0x0002 | -| * TotalOperationalHours | 0x0003 | -| * BootReason | 0x0004 | -| * ActiveHardwareFaults | 0x0005 | -| * ActiveRadioFaults | 0x0006 | -| * ActiveNetworkFaults | 0x0007 | -| * TestEventTriggersEnabled | 0x0008 | +| * ThreadMetrics | 0x0000 | +| * CurrentHeapFree | 0x0001 | +| * CurrentHeapUsed | 0x0002 | +| * CurrentHeapHighWatermark | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -27132,214 +26340,164 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * HardwareFaultChange | 0x0000 | -| * RadioFaultChange | 0x0001 | -| * NetworkFaultChange | 0x0002 | -| * BootReason | 0x0003 | +| * SoftwareFault | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command TestEventTrigger + * Command ResetWatermarks */ -class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { +class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { public: - GeneralDiagnosticsTestEventTrigger() - : ClusterCommand("test-event-trigger") + SoftwareDiagnosticsResetWatermarks() + : ClusterCommand("reset-watermarks") { - AddArgument("EnableKey", &mRequest.enableKey); - AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; - params.eventTrigger = [NSNumber numberWithUnsignedLongLong:mRequest.eventTrigger]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster testEventTriggerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetWatermarksWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL /* - * Command TimeSnapshot + * Attribute ThreadMetrics */ -class GeneralDiagnosticsTimeSnapshot : public ClusterCommand { +class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { public: - GeneralDiagnosticsTimeSnapshot() - : ClusterCommand("time-snapshot") + ReadSoftwareDiagnosticsThreadMetrics() + : ReadAttribute("thread-metrics") + { + } + + ~ReadSoftwareDiagnosticsThreadMetrics() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster timeSnapshotWithParams:params completion: - ^(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command PayloadTestRequest - */ -class GeneralDiagnosticsPayloadTestRequest : public ClusterCommand { +class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttribute { public: - GeneralDiagnosticsPayloadTestRequest() - : ClusterCommand("payload-test-request") + SubscribeAttributeSoftwareDiagnosticsThreadMetrics() + : SubscribeAttribute("thread-metrics") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("EnableKey", &mRequest.enableKey); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Value", 0, UINT8_MAX, &mRequest.value); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Count", 0, UINT16_MAX, &mRequest.count); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeSoftwareDiagnosticsThreadMetrics() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralDiagnosticsClusterPayloadTestRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.value = [NSNumber numberWithUnsignedChar:mRequest.value]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.count = [NSNumber numberWithUnsignedShort:mRequest.count]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster payloadTestRequestWithParams:params completion: - ^(MTRGeneralDiagnosticsClusterPayloadTestResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeThreadMetricsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GeneralDiagnostics::Commands::PayloadTestRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute NetworkInterfaces + * Attribute CurrentHeapFree */ -class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { public: - ReadGeneralDiagnosticsNetworkInterfaces() - : ReadAttribute("network-interfaces") + ReadSoftwareDiagnosticsCurrentHeapFree() + : ReadAttribute("current-heap-free") { } - ~ReadGeneralDiagnosticsNetworkInterfaces() + ~ReadSoftwareDiagnosticsCurrentHeapFree() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27348,25 +26506,25 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() - : SubscribeAttribute("network-interfaces") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() + : SubscribeAttribute("current-heap-free") { } - ~SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27377,10 +26535,10 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworkInterfacesWithParams:params + [cluster subscribeAttributeCurrentHeapFreeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27394,34 +26552,34 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt }; /* - * Attribute RebootCount + * Attribute CurrentHeapUsed */ -class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { public: - ReadGeneralDiagnosticsRebootCount() - : ReadAttribute("reboot-count") + ReadSoftwareDiagnosticsCurrentHeapUsed() + : ReadAttribute("current-heap-used") { } - ~ReadGeneralDiagnosticsRebootCount() + ~ReadSoftwareDiagnosticsCurrentHeapUsed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics RebootCount read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27430,25 +26588,25 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsRebootCount() - : SubscribeAttribute("reboot-count") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() + : SubscribeAttribute("current-heap-used") { } - ~SubscribeAttributeGeneralDiagnosticsRebootCount() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27459,10 +26617,10 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRebootCountWithParams:params + [cluster subscribeAttributeCurrentHeapUsedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27476,34 +26634,34 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut }; /* - * Attribute UpTime + * Attribute CurrentHeapHighWatermark */ -class ReadGeneralDiagnosticsUpTime : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { public: - ReadGeneralDiagnosticsUpTime() - : ReadAttribute("up-time") + ReadSoftwareDiagnosticsCurrentHeapHighWatermark() + : ReadAttribute("current-heap-high-watermark") { } - ~ReadGeneralDiagnosticsUpTime() + ~ReadSoftwareDiagnosticsCurrentHeapHighWatermark() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics UpTime read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27512,25 +26670,25 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsUpTime() - : SubscribeAttribute("up-time") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() + : SubscribeAttribute("current-heap-high-watermark") { } - ~SubscribeAttributeGeneralDiagnosticsUpTime() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27541,10 +26699,10 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpTimeWithParams:params + [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27558,34 +26716,34 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { }; /* - * Attribute TotalOperationalHours + * Attribute GeneratedCommandList */ -class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { +class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadGeneralDiagnosticsTotalOperationalHours() - : ReadAttribute("total-operational-hours") + ReadSoftwareDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadGeneralDiagnosticsTotalOperationalHours() + ~ReadSoftwareDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); + LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27594,25 +26752,25 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() - : SubscribeAttribute("total-operational-hours") + SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() + ~SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27623,10 +26781,10 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalOperationalHoursWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27640,34 +26798,34 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri }; /* - * Attribute BootReason + * Attribute AcceptedCommandList */ -class ReadGeneralDiagnosticsBootReason : public ReadAttribute { +class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadGeneralDiagnosticsBootReason() - : ReadAttribute("boot-reason") + ReadSoftwareDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadGeneralDiagnosticsBootReason() + ~ReadSoftwareDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics BootReason read Error", error); + LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27676,25 +26834,25 @@ class ReadGeneralDiagnosticsBootReason : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsBootReason() - : SubscribeAttribute("boot-reason") + SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeGeneralDiagnosticsBootReason() + ~SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27705,10 +26863,10 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBootReasonWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27721,35 +26879,37 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveHardwareFaults + * Attribute EventList */ -class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { +class ReadSoftwareDiagnosticsEventList : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveHardwareFaults() - : ReadAttribute("active-hardware-faults") + ReadSoftwareDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadGeneralDiagnosticsActiveHardwareFaults() + ~ReadSoftwareDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); + LogNSError("SoftwareDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27758,25 +26918,25 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() - : SubscribeAttribute("active-hardware-faults") + SubscribeAttributeSoftwareDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() + ~SubscribeAttributeSoftwareDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27787,10 +26947,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveHardwareFaultsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27803,35 +26963,37 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveRadioFaults + * Attribute AttributeList */ -class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { +class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveRadioFaults() - : ReadAttribute("active-radio-faults") + ReadSoftwareDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadGeneralDiagnosticsActiveRadioFaults() + ~ReadSoftwareDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); + LogNSError("SoftwareDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27840,25 +27002,25 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() - : SubscribeAttribute("active-radio-faults") + SubscribeAttributeSoftwareDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() + ~SubscribeAttributeSoftwareDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27869,10 +27031,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveRadioFaultsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27886,34 +27048,34 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt }; /* - * Attribute ActiveNetworkFaults + * Attribute FeatureMap */ -class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { +class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveNetworkFaults() - : ReadAttribute("active-network-faults") + ReadSoftwareDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadGeneralDiagnosticsActiveNetworkFaults() + ~ReadSoftwareDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); + LogNSError("SoftwareDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27922,25 +27084,25 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() - : SubscribeAttribute("active-network-faults") + SubscribeAttributeSoftwareDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() + ~SubscribeAttributeSoftwareDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27951,10 +27113,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveNetworkFaultsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27968,34 +27130,34 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe }; /* - * Attribute TestEventTriggersEnabled + * Attribute ClusterRevision */ -class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { +class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { public: - ReadGeneralDiagnosticsTestEventTriggersEnabled() - : ReadAttribute("test-event-triggers-enabled") + ReadSoftwareDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadGeneralDiagnosticsTestEventTriggersEnabled() + ~ReadSoftwareDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28004,25 +27166,25 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() - : SubscribeAttribute("test-event-triggers-enabled") + SubscribeAttributeSoftwareDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() + ~SubscribeAttributeSoftwareDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28033,10 +27195,10 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28049,35 +27211,161 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster ThreadNetworkDiagnostics | 0x0035 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Channel | 0x0000 | +| * RoutingRole | 0x0001 | +| * NetworkName | 0x0002 | +| * PanId | 0x0003 | +| * ExtendedPanId | 0x0004 | +| * MeshLocalPrefix | 0x0005 | +| * OverrunCount | 0x0006 | +| * NeighborTable | 0x0007 | +| * RouteTable | 0x0008 | +| * PartitionId | 0x0009 | +| * Weighting | 0x000A | +| * DataVersion | 0x000B | +| * StableDataVersion | 0x000C | +| * LeaderRouterId | 0x000D | +| * DetachedRoleCount | 0x000E | +| * ChildRoleCount | 0x000F | +| * RouterRoleCount | 0x0010 | +| * LeaderRoleCount | 0x0011 | +| * AttachAttemptCount | 0x0012 | +| * PartitionIdChangeCount | 0x0013 | +| * BetterPartitionAttachAttemptCount | 0x0014 | +| * ParentChangeCount | 0x0015 | +| * TxTotalCount | 0x0016 | +| * TxUnicastCount | 0x0017 | +| * TxBroadcastCount | 0x0018 | +| * TxAckRequestedCount | 0x0019 | +| * TxAckedCount | 0x001A | +| * TxNoAckRequestedCount | 0x001B | +| * TxDataCount | 0x001C | +| * TxDataPollCount | 0x001D | +| * TxBeaconCount | 0x001E | +| * TxBeaconRequestCount | 0x001F | +| * TxOtherCount | 0x0020 | +| * TxRetryCount | 0x0021 | +| * TxDirectMaxRetryExpiryCount | 0x0022 | +| * TxIndirectMaxRetryExpiryCount | 0x0023 | +| * TxErrCcaCount | 0x0024 | +| * TxErrAbortCount | 0x0025 | +| * TxErrBusyChannelCount | 0x0026 | +| * RxTotalCount | 0x0027 | +| * RxUnicastCount | 0x0028 | +| * RxBroadcastCount | 0x0029 | +| * RxDataCount | 0x002A | +| * RxDataPollCount | 0x002B | +| * RxBeaconCount | 0x002C | +| * RxBeaconRequestCount | 0x002D | +| * RxOtherCount | 0x002E | +| * RxAddressFilteredCount | 0x002F | +| * RxDestAddrFilteredCount | 0x0030 | +| * RxDuplicatedCount | 0x0031 | +| * RxErrNoFrameCount | 0x0032 | +| * RxErrUnknownNeighborCount | 0x0033 | +| * RxErrInvalidSrcAddrCount | 0x0034 | +| * RxErrSecCount | 0x0035 | +| * RxErrFcsCount | 0x0036 | +| * RxErrOtherCount | 0x0037 | +| * ActiveTimestamp | 0x0038 | +| * PendingTimestamp | 0x0039 | +| * Delay | 0x003A | +| * SecurityPolicy | 0x003B | +| * ChannelPage0Mask | 0x003C | +| * OperationalDatasetComponents | 0x003D | +| * ActiveNetworkFaultsList | 0x003E | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ConnectionStatus | 0x0000 | +| * NetworkFaultChange | 0x0001 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Command ResetCounts */ -class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { +class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { public: - ReadGeneralDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ThreadNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") { + ClusterCommand::AddArguments(); } - ~ReadGeneralDiagnosticsGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resetCountsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute Channel + */ +class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { +public: + ReadThreadNetworkDiagnosticsChannel() + : ReadAttribute("channel") + { + } + + ~ReadThreadNetworkDiagnosticsChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics Channel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28086,25 +27374,25 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadNetworkDiagnosticsChannel() + : SubscribeAttribute("channel") { } - ~SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28115,10 +27403,10 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28132,34 +27420,34 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib }; /* - * Attribute AcceptedCommandList + * Attribute RoutingRole */ -class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { public: - ReadGeneralDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadNetworkDiagnosticsRoutingRole() + : ReadAttribute("routing-role") { } - ~ReadGeneralDiagnosticsAcceptedCommandList() + ~ReadThreadNetworkDiagnosticsRoutingRole() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28168,25 +27456,25 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() + : SubscribeAttribute("routing-role") { } - ~SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28197,10 +27485,10 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeRoutingRoleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28213,37 +27501,35 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute NetworkName */ -class ReadGeneralDiagnosticsEventList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { public: - ReadGeneralDiagnosticsEventList() - : ReadAttribute("event-list") + ReadThreadNetworkDiagnosticsNetworkName() + : ReadAttribute("network-name") { } - ~ReadGeneralDiagnosticsEventList() + ~ReadThreadNetworkDiagnosticsNetworkName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics EventList read Error", error); + LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28252,25 +27538,25 @@ class ReadGeneralDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadNetworkDiagnosticsNetworkName() + : SubscribeAttribute("network-name") { } - ~SubscribeAttributeGeneralDiagnosticsEventList() + ~SubscribeAttributeThreadNetworkDiagnosticsNetworkName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28281,10 +27567,10 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeNetworkNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28297,37 +27583,35 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute PanId */ -class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { public: - ReadGeneralDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadThreadNetworkDiagnosticsPanId() + : ReadAttribute("pan-id") { } - ~ReadGeneralDiagnosticsAttributeList() + ~ReadThreadNetworkDiagnosticsPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics PanId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28336,25 +27620,25 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsPanId() + : SubscribeAttribute("pan-id") { } - ~SubscribeAttributeGeneralDiagnosticsAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28365,10 +27649,10 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28382,34 +27666,34 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib }; /* - * Attribute FeatureMap + * Attribute ExtendedPanId */ -class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { public: - ReadGeneralDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsExtendedPanId() + : ReadAttribute("extended-pan-id") { } - ~ReadGeneralDiagnosticsFeatureMap() + ~ReadThreadNetworkDiagnosticsExtendedPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28418,25 +27702,25 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() + : SubscribeAttribute("extended-pan-id") { } - ~SubscribeAttributeGeneralDiagnosticsFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28447,10 +27731,10 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeExtendedPanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28464,34 +27748,34 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute }; /* - * Attribute ClusterRevision + * Attribute MeshLocalPrefix */ -class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { public: - ReadGeneralDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsMeshLocalPrefix() + : ReadAttribute("mesh-local-prefix") { } - ~ReadGeneralDiagnosticsClusterRevision() + ~ReadThreadNetworkDiagnosticsMeshLocalPrefix() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28500,25 +27784,25 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() + : SubscribeAttribute("mesh-local-prefix") { } - ~SubscribeAttributeGeneralDiagnosticsClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28529,10 +27813,10 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMeshLocalPrefixWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28545,101 +27829,35 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr } }; -/*----------------------------------------------------------------------------*\ -| Cluster SoftwareDiagnostics | 0x0034 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetWatermarks | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ThreadMetrics | 0x0000 | -| * CurrentHeapFree | 0x0001 | -| * CurrentHeapUsed | 0x0002 | -| * CurrentHeapHighWatermark | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SoftwareFault | 0x0000 | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetWatermarks - */ -class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { -public: - SoftwareDiagnosticsResetWatermarks() - : ClusterCommand("reset-watermarks") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetWatermarksWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute ThreadMetrics + * Attribute OverrunCount */ -class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { +class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsThreadMetrics() - : ReadAttribute("thread-metrics") + ReadThreadNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadSoftwareDiagnosticsThreadMetrics() + ~ReadThreadNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); + LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28648,25 +27866,25 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsThreadMetrics() - : SubscribeAttribute("thread-metrics") + SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeSoftwareDiagnosticsThreadMetrics() + ~SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28677,10 +27895,10 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadMetricsWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28694,34 +27912,34 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri }; /* - * Attribute CurrentHeapFree + * Attribute NeighborTable */ -class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { +class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapFree() - : ReadAttribute("current-heap-free") + ReadThreadNetworkDiagnosticsNeighborTable() + : ReadAttribute("neighbor-table") { } - ~ReadSoftwareDiagnosticsCurrentHeapFree() + ~ReadThreadNetworkDiagnosticsNeighborTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); + LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28730,25 +27948,25 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() - : SubscribeAttribute("current-heap-free") + SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() + : SubscribeAttribute("neighbor-table") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() + ~SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28759,10 +27977,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapFreeWithParams:params + [cluster subscribeAttributeNeighborTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28776,34 +27994,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt }; /* - * Attribute CurrentHeapUsed + * Attribute RouteTable */ -class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapUsed() - : ReadAttribute("current-heap-used") + ReadThreadNetworkDiagnosticsRouteTable() + : ReadAttribute("route-table") { } - ~ReadSoftwareDiagnosticsCurrentHeapUsed() + ~ReadThreadNetworkDiagnosticsRouteTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); + LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28812,25 +28030,25 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() - : SubscribeAttribute("current-heap-used") + SubscribeAttributeThreadNetworkDiagnosticsRouteTable() + : SubscribeAttribute("route-table") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() + ~SubscribeAttributeThreadNetworkDiagnosticsRouteTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28841,10 +28059,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapUsedWithParams:params + [cluster subscribeAttributeRouteTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28858,34 +28076,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt }; /* - * Attribute CurrentHeapHighWatermark + * Attribute PartitionId */ -class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapHighWatermark() - : ReadAttribute("current-heap-high-watermark") + ReadThreadNetworkDiagnosticsPartitionId() + : ReadAttribute("partition-id") { } - ~ReadSoftwareDiagnosticsCurrentHeapHighWatermark() + ~ReadThreadNetworkDiagnosticsPartitionId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); + LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28894,25 +28112,25 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() - : SubscribeAttribute("current-heap-high-watermark") + SubscribeAttributeThreadNetworkDiagnosticsPartitionId() + : SubscribeAttribute("partition-id") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() + ~SubscribeAttributeThreadNetworkDiagnosticsPartitionId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28923,10 +28141,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params + [cluster subscribeAttributePartitionIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28940,34 +28158,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub }; /* - * Attribute GeneratedCommandList + * Attribute Weighting */ -class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { public: - ReadSoftwareDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThreadNetworkDiagnosticsWeighting() + : ReadAttribute("weighting") { } - ~ReadSoftwareDiagnosticsGeneratedCommandList() + ~ReadThreadNetworkDiagnosticsWeighting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28976,25 +28194,25 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadNetworkDiagnosticsWeighting() + : SubscribeAttribute("weighting") { } - ~SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsWeighting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29005,10 +28223,10 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWeightingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29022,34 +28240,34 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute DataVersion */ -class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { public: - ReadSoftwareDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadNetworkDiagnosticsDataVersion() + : ReadAttribute("data-version") { } - ~ReadSoftwareDiagnosticsAcceptedCommandList() + ~ReadThreadNetworkDiagnosticsDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29058,25 +28276,25 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadNetworkDiagnosticsDataVersion() + : SubscribeAttribute("data-version") { } - ~SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29087,10 +28305,10 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29103,37 +28321,35 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute StableDataVersion */ -class ReadSoftwareDiagnosticsEventList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { public: - ReadSoftwareDiagnosticsEventList() - : ReadAttribute("event-list") + ReadThreadNetworkDiagnosticsStableDataVersion() + : ReadAttribute("stable-data-version") { } - ~ReadSoftwareDiagnosticsEventList() + ~ReadThreadNetworkDiagnosticsStableDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics EventList read Error", error); + LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29142,25 +28358,25 @@ class ReadSoftwareDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() + : SubscribeAttribute("stable-data-version") { } - ~SubscribeAttributeSoftwareDiagnosticsEventList() + ~SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29171,10 +28387,10 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeStableDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29187,37 +28403,35 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute LeaderRouterId */ -class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { public: - ReadSoftwareDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadThreadNetworkDiagnosticsLeaderRouterId() + : ReadAttribute("leader-router-id") { } - ~ReadSoftwareDiagnosticsAttributeList() + ~ReadThreadNetworkDiagnosticsLeaderRouterId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29226,25 +28440,25 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() + : SubscribeAttribute("leader-router-id") { } - ~SubscribeAttributeSoftwareDiagnosticsAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29255,10 +28469,10 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeLeaderRouterIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29272,34 +28486,34 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute DetachedRoleCount */ -class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsDetachedRoleCount() + : ReadAttribute("detached-role-count") { } - ~ReadSoftwareDiagnosticsFeatureMap() + ~ReadThreadNetworkDiagnosticsDetachedRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29308,25 +28522,25 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() + : SubscribeAttribute("detached-role-count") { } - ~SubscribeAttributeSoftwareDiagnosticsFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29337,10 +28551,10 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDetachedRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29354,34 +28568,34 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute ChildRoleCount */ -class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsChildRoleCount() + : ReadAttribute("child-role-count") { } - ~ReadSoftwareDiagnosticsClusterRevision() + ~ReadThreadNetworkDiagnosticsChildRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29390,25 +28604,25 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() + : SubscribeAttribute("child-role-count") { } - ~SubscribeAttributeSoftwareDiagnosticsClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29419,10 +28633,10 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeChildRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29435,161 +28649,35 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster ThreadNetworkDiagnostics | 0x0035 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Channel | 0x0000 | -| * RoutingRole | 0x0001 | -| * NetworkName | 0x0002 | -| * PanId | 0x0003 | -| * ExtendedPanId | 0x0004 | -| * MeshLocalPrefix | 0x0005 | -| * OverrunCount | 0x0006 | -| * NeighborTable | 0x0007 | -| * RouteTable | 0x0008 | -| * PartitionId | 0x0009 | -| * Weighting | 0x000A | -| * DataVersion | 0x000B | -| * StableDataVersion | 0x000C | -| * LeaderRouterId | 0x000D | -| * DetachedRoleCount | 0x000E | -| * ChildRoleCount | 0x000F | -| * RouterRoleCount | 0x0010 | -| * LeaderRoleCount | 0x0011 | -| * AttachAttemptCount | 0x0012 | -| * PartitionIdChangeCount | 0x0013 | -| * BetterPartitionAttachAttemptCount | 0x0014 | -| * ParentChangeCount | 0x0015 | -| * TxTotalCount | 0x0016 | -| * TxUnicastCount | 0x0017 | -| * TxBroadcastCount | 0x0018 | -| * TxAckRequestedCount | 0x0019 | -| * TxAckedCount | 0x001A | -| * TxNoAckRequestedCount | 0x001B | -| * TxDataCount | 0x001C | -| * TxDataPollCount | 0x001D | -| * TxBeaconCount | 0x001E | -| * TxBeaconRequestCount | 0x001F | -| * TxOtherCount | 0x0020 | -| * TxRetryCount | 0x0021 | -| * TxDirectMaxRetryExpiryCount | 0x0022 | -| * TxIndirectMaxRetryExpiryCount | 0x0023 | -| * TxErrCcaCount | 0x0024 | -| * TxErrAbortCount | 0x0025 | -| * TxErrBusyChannelCount | 0x0026 | -| * RxTotalCount | 0x0027 | -| * RxUnicastCount | 0x0028 | -| * RxBroadcastCount | 0x0029 | -| * RxDataCount | 0x002A | -| * RxDataPollCount | 0x002B | -| * RxBeaconCount | 0x002C | -| * RxBeaconRequestCount | 0x002D | -| * RxOtherCount | 0x002E | -| * RxAddressFilteredCount | 0x002F | -| * RxDestAddrFilteredCount | 0x0030 | -| * RxDuplicatedCount | 0x0031 | -| * RxErrNoFrameCount | 0x0032 | -| * RxErrUnknownNeighborCount | 0x0033 | -| * RxErrInvalidSrcAddrCount | 0x0034 | -| * RxErrSecCount | 0x0035 | -| * RxErrFcsCount | 0x0036 | -| * RxErrOtherCount | 0x0037 | -| * ActiveTimestamp | 0x0038 | -| * PendingTimestamp | 0x0039 | -| * Delay | 0x003A | -| * SecurityPolicy | 0x003B | -| * ChannelPage0Mask | 0x003C | -| * OperationalDatasetComponents | 0x003D | -| * ActiveNetworkFaultsList | 0x003E | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * ConnectionStatus | 0x0000 | -| * NetworkFaultChange | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetCounts - */ -class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { -public: - ThreadNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetCountsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute Channel + * Attribute RouterRoleCount */ -class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChannel() - : ReadAttribute("channel") + ReadThreadNetworkDiagnosticsRouterRoleCount() + : ReadAttribute("router-role-count") { } - ~ReadThreadNetworkDiagnosticsChannel() + ~ReadThreadNetworkDiagnosticsRouterRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Channel read Error", error); + LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29598,21 +28686,21 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChannel() - : SubscribeAttribute("channel") + SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() + : SubscribeAttribute("router-role-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChannel() + ~SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -29627,10 +28715,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelWithParams:params + [cluster subscribeAttributeRouterRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29644,34 +28732,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib }; /* - * Attribute RoutingRole + * Attribute LeaderRoleCount */ -class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { +class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRoutingRole() - : ReadAttribute("routing-role") + ReadThreadNetworkDiagnosticsLeaderRoleCount() + : ReadAttribute("leader-role-count") { } - ~ReadThreadNetworkDiagnosticsRoutingRole() + ~ReadThreadNetworkDiagnosticsLeaderRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); + LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29680,21 +28768,21 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() - : SubscribeAttribute("routing-role") + SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() + : SubscribeAttribute("leader-role-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() + ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -29709,10 +28797,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRoutingRoleWithParams:params + [cluster subscribeAttributeLeaderRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29726,34 +28814,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt }; /* - * Attribute NetworkName + * Attribute AttachAttemptCount */ -class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsNetworkName() - : ReadAttribute("network-name") + ReadThreadNetworkDiagnosticsAttachAttemptCount() + : ReadAttribute("attach-attempt-count") { } - ~ReadThreadNetworkDiagnosticsNetworkName() + ~ReadThreadNetworkDiagnosticsAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); + LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29762,21 +28850,21 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsNetworkName() - : SubscribeAttribute("network-name") + SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() + : SubscribeAttribute("attach-attempt-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsNetworkName() + ~SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -29791,10 +28879,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworkNameWithParams:params + [cluster subscribeAttributeAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29808,34 +28896,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt }; /* - * Attribute PanId + * Attribute PartitionIdChangeCount */ -class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPanId() - : ReadAttribute("pan-id") + ReadThreadNetworkDiagnosticsPartitionIdChangeCount() + : ReadAttribute("partition-id-change-count") { } - ~ReadThreadNetworkDiagnosticsPanId() + ~ReadThreadNetworkDiagnosticsPartitionIdChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PanId read Error", error); + LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29844,21 +28932,21 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPanId() - : SubscribeAttribute("pan-id") + SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() + : SubscribeAttribute("partition-id-change-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPanId() + ~SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -29873,10 +28961,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePanIdWithParams:params + [cluster subscribeAttributePartitionIdChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29890,34 +28978,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut }; /* - * Attribute ExtendedPanId + * Attribute BetterPartitionAttachAttemptCount */ -class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsExtendedPanId() - : ReadAttribute("extended-pan-id") + ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + : ReadAttribute("better-partition-attach-attempt-count") { } - ~ReadThreadNetworkDiagnosticsExtendedPanId() + ~ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); + LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29926,21 +29014,21 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() - : SubscribeAttribute("extended-pan-id") + SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + : SubscribeAttribute("better-partition-attach-attempt-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() + ~SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -29955,10 +29043,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExtendedPanIdWithParams:params + [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29972,34 +29060,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe }; /* - * Attribute MeshLocalPrefix + * Attribute ParentChangeCount */ -class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { +class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsMeshLocalPrefix() - : ReadAttribute("mesh-local-prefix") + ReadThreadNetworkDiagnosticsParentChangeCount() + : ReadAttribute("parent-change-count") { } - ~ReadThreadNetworkDiagnosticsMeshLocalPrefix() + ~ReadThreadNetworkDiagnosticsParentChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); + LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30008,21 +29096,21 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() - : SubscribeAttribute("mesh-local-prefix") + SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() + : SubscribeAttribute("parent-change-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() + ~SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30037,10 +29125,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeshLocalPrefixWithParams:params + [cluster subscribeAttributeParentChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30054,34 +29142,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri }; /* - * Attribute OverrunCount + * Attribute TxTotalCount */ -class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadThreadNetworkDiagnosticsTxTotalCount() + : ReadAttribute("tx-total-count") { } - ~ReadThreadNetworkDiagnosticsOverrunCount() + ~ReadThreadNetworkDiagnosticsTxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30090,21 +29178,21 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() + : SubscribeAttribute("tx-total-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30119,10 +29207,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeTxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30136,34 +29224,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA }; /* - * Attribute NeighborTable + * Attribute TxUnicastCount */ -class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsNeighborTable() - : ReadAttribute("neighbor-table") + ReadThreadNetworkDiagnosticsTxUnicastCount() + : ReadAttribute("tx-unicast-count") { } - ~ReadThreadNetworkDiagnosticsNeighborTable() + ~ReadThreadNetworkDiagnosticsTxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); + LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30172,21 +29260,21 @@ class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() - : SubscribeAttribute("neighbor-table") + SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() + : SubscribeAttribute("tx-unicast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() + ~SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30201,10 +29289,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNeighborTableWithParams:params + [cluster subscribeAttributeTxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30218,34 +29306,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe }; /* - * Attribute RouteTable + * Attribute TxBroadcastCount */ -class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRouteTable() - : ReadAttribute("route-table") + ReadThreadNetworkDiagnosticsTxBroadcastCount() + : ReadAttribute("tx-broadcast-count") { } - ~ReadThreadNetworkDiagnosticsRouteTable() + ~ReadThreadNetworkDiagnosticsTxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30254,21 +29342,21 @@ class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRouteTable() - : SubscribeAttribute("route-table") + SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() + : SubscribeAttribute("tx-broadcast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRouteTable() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30283,10 +29371,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRouteTableWithParams:params + [cluster subscribeAttributeTxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30300,34 +29388,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt }; /* - * Attribute PartitionId + * Attribute TxAckRequestedCount */ -class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPartitionId() - : ReadAttribute("partition-id") + ReadThreadNetworkDiagnosticsTxAckRequestedCount() + : ReadAttribute("tx-ack-requested-count") { } - ~ReadThreadNetworkDiagnosticsPartitionId() + ~ReadThreadNetworkDiagnosticsTxAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); + LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30336,21 +29424,21 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPartitionId() - : SubscribeAttribute("partition-id") + SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() + : SubscribeAttribute("tx-ack-requested-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPartitionId() + ~SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30365,10 +29453,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartitionIdWithParams:params + [cluster subscribeAttributeTxAckRequestedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30382,34 +29470,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt }; /* - * Attribute Weighting + * Attribute TxAckedCount */ -class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsWeighting() - : ReadAttribute("weighting") + ReadThreadNetworkDiagnosticsTxAckedCount() + : ReadAttribute("tx-acked-count") { } - ~ReadThreadNetworkDiagnosticsWeighting() + ~ReadThreadNetworkDiagnosticsTxAckedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); + LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30418,21 +29506,21 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsWeighting() - : SubscribeAttribute("weighting") + SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() + : SubscribeAttribute("tx-acked-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsWeighting() + ~SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30447,10 +29535,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWeightingWithParams:params + [cluster subscribeAttributeTxAckedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30464,34 +29552,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr }; /* - * Attribute DataVersion + * Attribute TxNoAckRequestedCount */ -class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDataVersion() - : ReadAttribute("data-version") + ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() + : ReadAttribute("tx-no-ack-requested-count") { } - ~ReadThreadNetworkDiagnosticsDataVersion() + ~ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); + LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30500,21 +29588,21 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDataVersion() - : SubscribeAttribute("data-version") + SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() + : SubscribeAttribute("tx-no-ack-requested-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDataVersion() + ~SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30529,10 +29617,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDataVersionWithParams:params + [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30546,34 +29634,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt }; /* - * Attribute StableDataVersion + * Attribute TxDataCount */ -class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsStableDataVersion() - : ReadAttribute("stable-data-version") + ReadThreadNetworkDiagnosticsTxDataCount() + : ReadAttribute("tx-data-count") { } - ~ReadThreadNetworkDiagnosticsStableDataVersion() + ~ReadThreadNetworkDiagnosticsTxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30582,21 +29670,21 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() - : SubscribeAttribute("stable-data-version") + SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() + : SubscribeAttribute("tx-data-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30611,10 +29699,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStableDataVersionWithParams:params + [cluster subscribeAttributeTxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30628,34 +29716,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc }; /* - * Attribute LeaderRouterId + * Attribute TxDataPollCount */ -class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsLeaderRouterId() - : ReadAttribute("leader-router-id") + ReadThreadNetworkDiagnosticsTxDataPollCount() + : ReadAttribute("tx-data-poll-count") { } - ~ReadThreadNetworkDiagnosticsLeaderRouterId() + ~ReadThreadNetworkDiagnosticsTxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30664,21 +29752,21 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() - : SubscribeAttribute("leader-router-id") + SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() + : SubscribeAttribute("tx-data-poll-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30693,10 +29781,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLeaderRouterIdWithParams:params + [cluster subscribeAttributeTxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30710,34 +29798,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib }; /* - * Attribute DetachedRoleCount + * Attribute TxBeaconCount */ -class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDetachedRoleCount() - : ReadAttribute("detached-role-count") + ReadThreadNetworkDiagnosticsTxBeaconCount() + : ReadAttribute("tx-beacon-count") { } - ~ReadThreadNetworkDiagnosticsDetachedRoleCount() + ~ReadThreadNetworkDiagnosticsTxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30746,21 +29834,21 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() - : SubscribeAttribute("detached-role-count") + SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() + : SubscribeAttribute("tx-beacon-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30775,10 +29863,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDetachedRoleCountWithParams:params + [cluster subscribeAttributeTxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30792,34 +29880,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc }; /* - * Attribute ChildRoleCount + * Attribute TxBeaconRequestCount */ -class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChildRoleCount() - : ReadAttribute("child-role-count") + ReadThreadNetworkDiagnosticsTxBeaconRequestCount() + : ReadAttribute("tx-beacon-request-count") { } - ~ReadThreadNetworkDiagnosticsChildRoleCount() + ~ReadThreadNetworkDiagnosticsTxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30828,21 +29916,21 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() - : SubscribeAttribute("child-role-count") + SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() + : SubscribeAttribute("tx-beacon-request-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30857,10 +29945,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChildRoleCountWithParams:params + [cluster subscribeAttributeTxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30874,34 +29962,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib }; /* - * Attribute RouterRoleCount + * Attribute TxOtherCount */ -class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRouterRoleCount() - : ReadAttribute("router-role-count") + ReadThreadNetworkDiagnosticsTxOtherCount() + : ReadAttribute("tx-other-count") { } - ~ReadThreadNetworkDiagnosticsRouterRoleCount() + ~ReadThreadNetworkDiagnosticsTxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30910,21 +29998,21 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() - : SubscribeAttribute("router-role-count") + SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() + : SubscribeAttribute("tx-other-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30939,10 +30027,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRouterRoleCountWithParams:params + [cluster subscribeAttributeTxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30956,34 +30044,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri }; /* - * Attribute LeaderRoleCount + * Attribute TxRetryCount */ -class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsLeaderRoleCount() - : ReadAttribute("leader-role-count") + ReadThreadNetworkDiagnosticsTxRetryCount() + : ReadAttribute("tx-retry-count") { } - ~ReadThreadNetworkDiagnosticsLeaderRoleCount() + ~ReadThreadNetworkDiagnosticsTxRetryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30992,21 +30080,21 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() - : SubscribeAttribute("leader-role-count") + SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() + : SubscribeAttribute("tx-retry-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31021,10 +30109,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLeaderRoleCountWithParams:params + [cluster subscribeAttributeTxRetryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31038,34 +30126,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri }; /* - * Attribute AttachAttemptCount + * Attribute TxDirectMaxRetryExpiryCount */ -class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAttachAttemptCount() - : ReadAttribute("attach-attempt-count") + ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + : ReadAttribute("tx-direct-max-retry-expiry-count") { } - ~ReadThreadNetworkDiagnosticsAttachAttemptCount() + ~ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31074,21 +30162,21 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() - : SubscribeAttribute("attach-attempt-count") + SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + : SubscribeAttribute("tx-direct-max-retry-expiry-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31103,10 +30191,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttachAttemptCountWithParams:params + [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31120,34 +30208,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs }; /* - * Attribute PartitionIdChangeCount + * Attribute TxIndirectMaxRetryExpiryCount */ -class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPartitionIdChangeCount() - : ReadAttribute("partition-id-change-count") + ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + : ReadAttribute("tx-indirect-max-retry-expiry-count") { } - ~ReadThreadNetworkDiagnosticsPartitionIdChangeCount() + ~ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31156,21 +30244,21 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() - : SubscribeAttribute("partition-id-change-count") + SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + : SubscribeAttribute("tx-indirect-max-retry-expiry-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31185,10 +30273,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartitionIdChangeCountWithParams:params + [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31202,34 +30290,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public }; /* - * Attribute BetterPartitionAttachAttemptCount + * Attribute TxErrCcaCount */ -class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() - : ReadAttribute("better-partition-attach-attempt-count") + ReadThreadNetworkDiagnosticsTxErrCcaCount() + : ReadAttribute("tx-err-cca-count") { } - ~ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + ~ReadThreadNetworkDiagnosticsTxErrCcaCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31238,21 +30326,21 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea } }; -class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() - : SubscribeAttribute("better-partition-attach-attempt-count") + SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() + : SubscribeAttribute("tx-err-cca-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31267,10 +30355,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params + [cluster subscribeAttributeTxErrCcaCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31284,34 +30372,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun }; /* - * Attribute ParentChangeCount + * Attribute TxErrAbortCount */ -class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsParentChangeCount() - : ReadAttribute("parent-change-count") + ReadThreadNetworkDiagnosticsTxErrAbortCount() + : ReadAttribute("tx-err-abort-count") { } - ~ReadThreadNetworkDiagnosticsParentChangeCount() + ~ReadThreadNetworkDiagnosticsTxErrAbortCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31320,21 +30408,21 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() - : SubscribeAttribute("parent-change-count") + SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() + : SubscribeAttribute("tx-err-abort-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31349,10 +30437,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeParentChangeCountWithParams:params + [cluster subscribeAttributeTxErrAbortCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31366,34 +30454,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc }; /* - * Attribute TxTotalCount + * Attribute TxErrBusyChannelCount */ -class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxTotalCount() - : ReadAttribute("tx-total-count") + ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() + : ReadAttribute("tx-err-busy-channel-count") { } - ~ReadThreadNetworkDiagnosticsTxTotalCount() + ~ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31402,21 +30490,21 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() - : SubscribeAttribute("tx-total-count") + SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() + : SubscribeAttribute("tx-err-busy-channel-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31431,10 +30519,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxTotalCountWithParams:params + [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31448,34 +30536,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA }; /* - * Attribute TxUnicastCount + * Attribute RxTotalCount */ -class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxUnicastCount() - : ReadAttribute("tx-unicast-count") + ReadThreadNetworkDiagnosticsRxTotalCount() + : ReadAttribute("rx-total-count") { } - ~ReadThreadNetworkDiagnosticsTxUnicastCount() + ~ReadThreadNetworkDiagnosticsRxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31484,21 +30572,21 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() - : SubscribeAttribute("tx-unicast-count") + SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() + : SubscribeAttribute("rx-total-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31513,10 +30601,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxUnicastCountWithParams:params + [cluster subscribeAttributeRxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31530,34 +30618,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib }; /* - * Attribute TxBroadcastCount + * Attribute RxUnicastCount */ -class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBroadcastCount() - : ReadAttribute("tx-broadcast-count") + ReadThreadNetworkDiagnosticsRxUnicastCount() + : ReadAttribute("rx-unicast-count") { } - ~ReadThreadNetworkDiagnosticsTxBroadcastCount() + ~ReadThreadNetworkDiagnosticsRxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31566,21 +30654,21 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() - : SubscribeAttribute("tx-broadcast-count") + SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() + : SubscribeAttribute("rx-unicast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31595,10 +30683,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBroadcastCountWithParams:params + [cluster subscribeAttributeRxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31612,34 +30700,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr }; /* - * Attribute TxAckRequestedCount + * Attribute RxBroadcastCount */ -class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxAckRequestedCount() - : ReadAttribute("tx-ack-requested-count") + ReadThreadNetworkDiagnosticsRxBroadcastCount() + : ReadAttribute("rx-broadcast-count") { } - ~ReadThreadNetworkDiagnosticsTxAckRequestedCount() + ~ReadThreadNetworkDiagnosticsRxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31648,21 +30736,21 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() - : SubscribeAttribute("tx-ack-requested-count") + SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() + : SubscribeAttribute("rx-broadcast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31677,10 +30765,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxAckRequestedCountWithParams:params + [cluster subscribeAttributeRxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31694,34 +30782,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub }; /* - * Attribute TxAckedCount + * Attribute RxDataCount */ -class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxAckedCount() - : ReadAttribute("tx-acked-count") + ReadThreadNetworkDiagnosticsRxDataCount() + : ReadAttribute("rx-data-count") { } - ~ReadThreadNetworkDiagnosticsTxAckedCount() + ~ReadThreadNetworkDiagnosticsRxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31730,21 +30818,21 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() - : SubscribeAttribute("tx-acked-count") + SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() + : SubscribeAttribute("rx-data-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31759,10 +30847,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxAckedCountWithParams:params + [cluster subscribeAttributeRxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31776,34 +30864,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA }; /* - * Attribute TxNoAckRequestedCount + * Attribute RxDataPollCount */ -class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() - : ReadAttribute("tx-no-ack-requested-count") + ReadThreadNetworkDiagnosticsRxDataPollCount() + : ReadAttribute("rx-data-poll-count") { } - ~ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() + ~ReadThreadNetworkDiagnosticsRxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31812,21 +30900,21 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() - : SubscribeAttribute("tx-no-ack-requested-count") + SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() + : SubscribeAttribute("rx-data-poll-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31841,10 +30929,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params + [cluster subscribeAttributeRxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31858,34 +30946,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S }; /* - * Attribute TxDataCount + * Attribute RxBeaconCount */ -class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDataCount() - : ReadAttribute("tx-data-count") + ReadThreadNetworkDiagnosticsRxBeaconCount() + : ReadAttribute("rx-beacon-count") { } - ~ReadThreadNetworkDiagnosticsTxDataCount() + ~ReadThreadNetworkDiagnosticsRxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31894,21 +30982,21 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() - : SubscribeAttribute("tx-data-count") + SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() + : SubscribeAttribute("rx-beacon-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31923,10 +31011,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDataCountWithParams:params + [cluster subscribeAttributeRxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31940,34 +31028,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt }; /* - * Attribute TxDataPollCount + * Attribute RxBeaconRequestCount */ -class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDataPollCount() - : ReadAttribute("tx-data-poll-count") + ReadThreadNetworkDiagnosticsRxBeaconRequestCount() + : ReadAttribute("rx-beacon-request-count") { } - ~ReadThreadNetworkDiagnosticsTxDataPollCount() + ~ReadThreadNetworkDiagnosticsRxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31976,21 +31064,21 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() - : SubscribeAttribute("tx-data-poll-count") + SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() + : SubscribeAttribute("rx-beacon-request-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32005,10 +31093,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDataPollCountWithParams:params + [cluster subscribeAttributeRxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32022,34 +31110,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri }; /* - * Attribute TxBeaconCount + * Attribute RxOtherCount */ -class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBeaconCount() - : ReadAttribute("tx-beacon-count") + ReadThreadNetworkDiagnosticsRxOtherCount() + : ReadAttribute("rx-other-count") { } - ~ReadThreadNetworkDiagnosticsTxBeaconCount() + ~ReadThreadNetworkDiagnosticsRxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32058,21 +31146,21 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() - : SubscribeAttribute("tx-beacon-count") + SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() + : SubscribeAttribute("rx-other-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32087,10 +31175,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBeaconCountWithParams:params + [cluster subscribeAttributeRxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32104,34 +31192,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe }; /* - * Attribute TxBeaconRequestCount + * Attribute RxAddressFilteredCount */ -class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBeaconRequestCount() - : ReadAttribute("tx-beacon-request-count") + ReadThreadNetworkDiagnosticsRxAddressFilteredCount() + : ReadAttribute("rx-address-filtered-count") { } - ~ReadThreadNetworkDiagnosticsTxBeaconRequestCount() + ~ReadThreadNetworkDiagnosticsRxAddressFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32140,21 +31228,21 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() - : SubscribeAttribute("tx-beacon-request-count") + SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() + : SubscribeAttribute("rx-address-filtered-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32169,10 +31257,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBeaconRequestCountWithParams:params + [cluster subscribeAttributeRxAddressFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32186,34 +31274,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su }; /* - * Attribute TxOtherCount + * Attribute RxDestAddrFilteredCount */ -class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxOtherCount() - : ReadAttribute("tx-other-count") + ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() + : ReadAttribute("rx-dest-addr-filtered-count") { } - ~ReadThreadNetworkDiagnosticsTxOtherCount() + ~ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32222,21 +31310,21 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() - : SubscribeAttribute("tx-other-count") + SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() + : SubscribeAttribute("rx-dest-addr-filtered-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32251,10 +31339,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxOtherCountWithParams:params + [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32268,34 +31356,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA }; /* - * Attribute TxRetryCount + * Attribute RxDuplicatedCount */ -class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxRetryCount() - : ReadAttribute("tx-retry-count") + ReadThreadNetworkDiagnosticsRxDuplicatedCount() + : ReadAttribute("rx-duplicated-count") { } - ~ReadThreadNetworkDiagnosticsTxRetryCount() + ~ReadThreadNetworkDiagnosticsRxDuplicatedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32304,21 +31392,21 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() - : SubscribeAttribute("tx-retry-count") + SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() + : SubscribeAttribute("rx-duplicated-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32333,10 +31421,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxRetryCountWithParams:params + [cluster subscribeAttributeRxDuplicatedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32350,34 +31438,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA }; /* - * Attribute TxDirectMaxRetryExpiryCount + * Attribute RxErrNoFrameCount */ -class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() - : ReadAttribute("tx-direct-max-retry-expiry-count") + ReadThreadNetworkDiagnosticsRxErrNoFrameCount() + : ReadAttribute("rx-err-no-frame-count") { } - ~ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + ~ReadThreadNetworkDiagnosticsRxErrNoFrameCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32386,21 +31474,21 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() - : SubscribeAttribute("tx-direct-max-retry-expiry-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() + : SubscribeAttribute("rx-err-no-frame-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32415,10 +31503,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params + [cluster subscribeAttributeRxErrNoFrameCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32432,34 +31520,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu }; /* - * Attribute TxIndirectMaxRetryExpiryCount + * Attribute RxErrUnknownNeighborCount */ -class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() - : ReadAttribute("tx-indirect-max-retry-expiry-count") + ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + : ReadAttribute("rx-err-unknown-neighbor-count") { } - ~ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + ~ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32468,21 +31556,21 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() - : SubscribeAttribute("tx-indirect-max-retry-expiry-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + : SubscribeAttribute("rx-err-unknown-neighbor-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32497,10 +31585,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params + [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32514,34 +31602,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : }; /* - * Attribute TxErrCcaCount + * Attribute RxErrInvalidSrcAddrCount */ -class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrCcaCount() - : ReadAttribute("tx-err-cca-count") + ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + : ReadAttribute("rx-err-invalid-src-addr-count") { } - ~ReadThreadNetworkDiagnosticsTxErrCcaCount() + ~ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32550,21 +31638,21 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() - : SubscribeAttribute("tx-err-cca-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + : SubscribeAttribute("rx-err-invalid-src-addr-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32579,10 +31667,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrCcaCountWithParams:params + [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32596,34 +31684,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe }; /* - * Attribute TxErrAbortCount + * Attribute RxErrSecCount */ -class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrAbortCount() - : ReadAttribute("tx-err-abort-count") + ReadThreadNetworkDiagnosticsRxErrSecCount() + : ReadAttribute("rx-err-sec-count") { } - ~ReadThreadNetworkDiagnosticsTxErrAbortCount() + ~ReadThreadNetworkDiagnosticsRxErrSecCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32632,21 +31720,21 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() - : SubscribeAttribute("tx-err-abort-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() + : SubscribeAttribute("rx-err-sec-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32661,10 +31749,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrAbortCountWithParams:params + [cluster subscribeAttributeRxErrSecCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32678,34 +31766,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri }; /* - * Attribute TxErrBusyChannelCount + * Attribute RxErrFcsCount */ -class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() - : ReadAttribute("tx-err-busy-channel-count") + ReadThreadNetworkDiagnosticsRxErrFcsCount() + : ReadAttribute("rx-err-fcs-count") { } - ~ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() + ~ReadThreadNetworkDiagnosticsRxErrFcsCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32714,21 +31802,21 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() - : SubscribeAttribute("tx-err-busy-channel-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() + : SubscribeAttribute("rx-err-fcs-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32743,10 +31831,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params + [cluster subscribeAttributeRxErrFcsCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32760,34 +31848,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S }; /* - * Attribute RxTotalCount + * Attribute RxErrOtherCount */ -class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxTotalCount() - : ReadAttribute("rx-total-count") + ReadThreadNetworkDiagnosticsRxErrOtherCount() + : ReadAttribute("rx-err-other-count") { } - ~ReadThreadNetworkDiagnosticsRxTotalCount() + ~ReadThreadNetworkDiagnosticsRxErrOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32796,21 +31884,21 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() - : SubscribeAttribute("rx-total-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() + : SubscribeAttribute("rx-err-other-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32825,10 +31913,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxTotalCountWithParams:params + [cluster subscribeAttributeRxErrOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32842,34 +31930,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA }; /* - * Attribute RxUnicastCount + * Attribute ActiveTimestamp */ -class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxUnicastCount() - : ReadAttribute("rx-unicast-count") + ReadThreadNetworkDiagnosticsActiveTimestamp() + : ReadAttribute("active-timestamp") { } - ~ReadThreadNetworkDiagnosticsRxUnicastCount() + ~ReadThreadNetworkDiagnosticsActiveTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32878,21 +31966,21 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() - : SubscribeAttribute("rx-unicast-count") + SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() + : SubscribeAttribute("active-timestamp") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32907,10 +31995,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxUnicastCountWithParams:params + [cluster subscribeAttributeActiveTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32924,34 +32012,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib }; /* - * Attribute RxBroadcastCount + * Attribute PendingTimestamp */ -class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBroadcastCount() - : ReadAttribute("rx-broadcast-count") + ReadThreadNetworkDiagnosticsPendingTimestamp() + : ReadAttribute("pending-timestamp") { } - ~ReadThreadNetworkDiagnosticsRxBroadcastCount() + ~ReadThreadNetworkDiagnosticsPendingTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32960,21 +32048,21 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() - : SubscribeAttribute("rx-broadcast-count") + SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() + : SubscribeAttribute("pending-timestamp") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32989,10 +32077,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBroadcastCountWithParams:params + [cluster subscribeAttributePendingTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33006,34 +32094,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr }; /* - * Attribute RxDataCount + * Attribute Delay */ -class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDataCount() - : ReadAttribute("rx-data-count") + ReadThreadNetworkDiagnosticsDelay() + : ReadAttribute("delay") { } - ~ReadThreadNetworkDiagnosticsRxDataCount() + ~ReadThreadNetworkDiagnosticsDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); + LogNSError("ThreadNetworkDiagnostics Delay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33042,21 +32130,21 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() - : SubscribeAttribute("rx-data-count") + SubscribeAttributeThreadNetworkDiagnosticsDelay() + : SubscribeAttribute("delay") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() + ~SubscribeAttributeThreadNetworkDiagnosticsDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33071,10 +32159,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDataCountWithParams:params + [cluster subscribeAttributeDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33088,34 +32176,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt }; /* - * Attribute RxDataPollCount + * Attribute SecurityPolicy */ -class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDataPollCount() - : ReadAttribute("rx-data-poll-count") + ReadThreadNetworkDiagnosticsSecurityPolicy() + : ReadAttribute("security-policy") { } - ~ReadThreadNetworkDiagnosticsRxDataPollCount() + ~ReadThreadNetworkDiagnosticsSecurityPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + [cluster readAttributeSecurityPolicyWithCompletion:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); + LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33124,21 +32212,21 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() - : SubscribeAttribute("rx-data-poll-count") + SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() + : SubscribeAttribute("security-policy") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() + ~SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33153,10 +32241,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDataPollCountWithParams:params + [cluster subscribeAttributeSecurityPolicyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33170,34 +32258,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri }; /* - * Attribute RxBeaconCount + * Attribute ChannelPage0Mask */ -class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBeaconCount() - : ReadAttribute("rx-beacon-count") + ReadThreadNetworkDiagnosticsChannelPage0Mask() + : ReadAttribute("channel-page0mask") { } - ~ReadThreadNetworkDiagnosticsRxBeaconCount() + ~ReadThreadNetworkDiagnosticsChannelPage0Mask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33206,21 +32294,21 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() - : SubscribeAttribute("rx-beacon-count") + SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() + : SubscribeAttribute("channel-page0mask") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() + ~SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33235,10 +32323,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBeaconCountWithParams:params + [cluster subscribeAttributeChannelPage0MaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33252,34 +32340,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe }; /* - * Attribute RxBeaconRequestCount + * Attribute OperationalDatasetComponents */ -class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBeaconRequestCount() - : ReadAttribute("rx-beacon-request-count") + ReadThreadNetworkDiagnosticsOperationalDatasetComponents() + : ReadAttribute("operational-dataset-components") { } - ~ReadThreadNetworkDiagnosticsRxBeaconRequestCount() + ~ReadThreadNetworkDiagnosticsOperationalDatasetComponents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + [cluster readAttributeOperationalDatasetComponentsWithCompletion:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); + LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33288,21 +32376,21 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() - : SubscribeAttribute("rx-beacon-request-count") + SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() + : SubscribeAttribute("operational-dataset-components") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() + ~SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33317,10 +32405,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBeaconRequestCountWithParams:params + [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + reportHandler:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33334,34 +32422,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su }; /* - * Attribute RxOtherCount + * Attribute ActiveNetworkFaultsList */ -class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxOtherCount() - : ReadAttribute("rx-other-count") + ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() + : ReadAttribute("active-network-faults-list") { } - ~ReadThreadNetworkDiagnosticsRxOtherCount() + ~ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33370,21 +32458,21 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() - : SubscribeAttribute("rx-other-count") + SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() + : SubscribeAttribute("active-network-faults-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() + ~SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33399,10 +32487,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxOtherCountWithParams:params + [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33416,34 +32504,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA }; /* - * Attribute RxAddressFilteredCount + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxAddressFilteredCount() - : ReadAttribute("rx-address-filtered-count") + ReadThreadNetworkDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDiagnosticsRxAddressFilteredCount() + ~ReadThreadNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); + LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33452,21 +32540,21 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() - : SubscribeAttribute("rx-address-filtered-count") + SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() + ~SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33481,10 +32569,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxAddressFilteredCountWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33498,34 +32586,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public }; /* - * Attribute RxDestAddrFilteredCount + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() - : ReadAttribute("rx-dest-addr-filtered-count") + ReadThreadNetworkDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() + ~ReadThreadNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); + LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33534,21 +32622,21 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() - : SubscribeAttribute("rx-dest-addr-filtered-count") + SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() + ~SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33563,10 +32651,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33579,35 +32667,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RxDuplicatedCount + * Attribute EventList */ -class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDuplicatedCount() - : ReadAttribute("rx-duplicated-count") + ReadThreadNetworkDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDiagnosticsRxDuplicatedCount() + ~ReadThreadNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33616,21 +32706,21 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() - : SubscribeAttribute("rx-duplicated-count") + SubscribeAttributeThreadNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33645,10 +32735,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDuplicatedCountWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33661,35 +32751,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute RxErrNoFrameCount + * Attribute AttributeList */ -class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrNoFrameCount() - : ReadAttribute("rx-err-no-frame-count") + ReadThreadNetworkDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadNetworkDiagnosticsRxErrNoFrameCount() + ~ReadThreadNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); + LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33698,21 +32790,21 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() - : SubscribeAttribute("rx-err-no-frame-count") + SubscribeAttributeThreadNetworkDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() + ~SubscribeAttributeThreadNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33727,10 +32819,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrNoFrameCountWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33744,34 +32836,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc }; /* - * Attribute RxErrUnknownNeighborCount + * Attribute FeatureMap */ -class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() - : ReadAttribute("rx-err-unknown-neighbor-count") + ReadThreadNetworkDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + ~ReadThreadNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); + LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33780,21 +32872,21 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() - : SubscribeAttribute("rx-err-unknown-neighbor-count") + SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + ~SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33809,10 +32901,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33826,34 +32918,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ }; /* - * Attribute RxErrInvalidSrcAddrCount + * Attribute ClusterRevision */ -class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() - : ReadAttribute("rx-err-invalid-src-addr-count") + ReadThreadNetworkDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + ~ReadThreadNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33862,21 +32954,21 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() - : SubscribeAttribute("rx-err-invalid-src-addr-count") + SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + ~SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -33891,10 +32983,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33907,35 +32999,112 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi } }; +/*----------------------------------------------------------------------------*\ +| Cluster WiFiNetworkDiagnostics | 0x0036 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Bssid | 0x0000 | +| * SecurityType | 0x0001 | +| * WiFiVersion | 0x0002 | +| * ChannelNumber | 0x0003 | +| * Rssi | 0x0004 | +| * BeaconLostCount | 0x0005 | +| * BeaconRxCount | 0x0006 | +| * PacketMulticastRxCount | 0x0007 | +| * PacketMulticastTxCount | 0x0008 | +| * PacketUnicastRxCount | 0x0009 | +| * PacketUnicastTxCount | 0x000A | +| * CurrentMaxRate | 0x000B | +| * OverrunCount | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Disconnection | 0x0000 | +| * AssociationFailure | 0x0001 | +| * ConnectionStatus | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetCounts + */ +class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { +public: + WiFiNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resetCountsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + /* - * Attribute RxErrSecCount + * Attribute Bssid */ -class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrSecCount() - : ReadAttribute("rx-err-sec-count") + ReadWiFiNetworkDiagnosticsBssid() + : ReadAttribute("bssid") { } - ~ReadThreadNetworkDiagnosticsRxErrSecCount() + ~ReadWiFiNetworkDiagnosticsBssid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); + LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33944,25 +33113,25 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() - : SubscribeAttribute("rx-err-sec-count") + SubscribeAttributeWiFiNetworkDiagnosticsBssid() + : SubscribeAttribute("bssid") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsBssid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33973,10 +33142,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrSecCountWithParams:params + [cluster subscribeAttributeBSSIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33990,34 +33159,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe }; /* - * Attribute RxErrFcsCount + * Attribute SecurityType */ -class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrFcsCount() - : ReadAttribute("rx-err-fcs-count") + ReadWiFiNetworkDiagnosticsSecurityType() + : ReadAttribute("security-type") { } - ~ReadThreadNetworkDiagnosticsRxErrFcsCount() + ~ReadWiFiNetworkDiagnosticsSecurityType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); + LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34026,25 +33195,25 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() - : SubscribeAttribute("rx-err-fcs-count") + SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() + : SubscribeAttribute("security-type") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34055,10 +33224,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrFcsCountWithParams:params + [cluster subscribeAttributeSecurityTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34072,34 +33241,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe }; /* - * Attribute RxErrOtherCount + * Attribute WiFiVersion */ -class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrOtherCount() - : ReadAttribute("rx-err-other-count") + ReadWiFiNetworkDiagnosticsWiFiVersion() + : ReadAttribute("wi-fi-version") { } - ~ReadThreadNetworkDiagnosticsRxErrOtherCount() + ~ReadWiFiNetworkDiagnosticsWiFiVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); + LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34108,25 +33277,25 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() - : SubscribeAttribute("rx-err-other-count") + SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() + : SubscribeAttribute("wi-fi-version") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34137,10 +33306,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrOtherCountWithParams:params + [cluster subscribeAttributeWiFiVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34154,34 +33323,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri }; /* - * Attribute ActiveTimestamp + * Attribute ChannelNumber */ -class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsActiveTimestamp() - : ReadAttribute("active-timestamp") + ReadWiFiNetworkDiagnosticsChannelNumber() + : ReadAttribute("channel-number") { } - ~ReadThreadNetworkDiagnosticsActiveTimestamp() + ~ReadWiFiNetworkDiagnosticsChannelNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); + LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34190,25 +33359,25 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() - : SubscribeAttribute("active-timestamp") + SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() + : SubscribeAttribute("channel-number") { } - ~SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() + ~SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34219,10 +33388,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveTimestampWithParams:params + [cluster subscribeAttributeChannelNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34236,34 +33405,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri }; /* - * Attribute PendingTimestamp + * Attribute Rssi */ -class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPendingTimestamp() - : ReadAttribute("pending-timestamp") + ReadWiFiNetworkDiagnosticsRssi() + : ReadAttribute("rssi") { } - ~ReadThreadNetworkDiagnosticsPendingTimestamp() + ~ReadWiFiNetworkDiagnosticsRssi() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); + LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34272,25 +33441,25 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() - : SubscribeAttribute("pending-timestamp") + SubscribeAttributeWiFiNetworkDiagnosticsRssi() + : SubscribeAttribute("rssi") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() + ~SubscribeAttributeWiFiNetworkDiagnosticsRssi() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34301,10 +33470,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePendingTimestampWithParams:params + [cluster subscribeAttributeRSSIWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34318,34 +33487,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr }; /* - * Attribute Delay + * Attribute BeaconLostCount */ -class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDelay() - : ReadAttribute("delay") + ReadWiFiNetworkDiagnosticsBeaconLostCount() + : ReadAttribute("beacon-lost-count") { } - ~ReadThreadNetworkDiagnosticsDelay() + ~ReadWiFiNetworkDiagnosticsBeaconLostCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Delay read Error", error); + LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34354,25 +33523,25 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDelay() - : SubscribeAttribute("delay") + SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() + : SubscribeAttribute("beacon-lost-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDelay() + ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34383,10 +33552,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDelayWithParams:params + [cluster subscribeAttributeBeaconLostCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34400,34 +33569,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut }; /* - * Attribute SecurityPolicy + * Attribute BeaconRxCount */ -class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsSecurityPolicy() - : ReadAttribute("security-policy") + ReadWiFiNetworkDiagnosticsBeaconRxCount() + : ReadAttribute("beacon-rx-count") { } - ~ReadThreadNetworkDiagnosticsSecurityPolicy() + ~ReadWiFiNetworkDiagnosticsBeaconRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityPolicyWithCompletion:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); + LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34436,25 +33605,25 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() - : SubscribeAttribute("security-policy") + SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() + : SubscribeAttribute("beacon-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() + ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34465,10 +33634,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSecurityPolicyWithParams:params + [cluster subscribeAttributeBeaconRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34482,34 +33651,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib }; /* - * Attribute ChannelPage0Mask + * Attribute PacketMulticastRxCount */ -class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChannelPage0Mask() - : ReadAttribute("channel-page0mask") + ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() + : ReadAttribute("packet-multicast-rx-count") { } - ~ReadThreadNetworkDiagnosticsChannelPage0Mask() + ~ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34518,25 +33687,25 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() - : SubscribeAttribute("channel-page0mask") + SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() + : SubscribeAttribute("packet-multicast-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34547,10 +33716,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelPage0MaskWithParams:params + [cluster subscribeAttributePacketMulticastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34564,34 +33733,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr }; /* - * Attribute OperationalDatasetComponents + * Attribute PacketMulticastTxCount */ -class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsOperationalDatasetComponents() - : ReadAttribute("operational-dataset-components") + ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() + : ReadAttribute("packet-multicast-tx-count") { } - ~ReadThreadNetworkDiagnosticsOperationalDatasetComponents() + ~ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalDatasetComponentsWithCompletion:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34600,25 +33769,25 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr } }; -class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() - : SubscribeAttribute("operational-dataset-components") + SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() + : SubscribeAttribute("packet-multicast-tx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34629,10 +33798,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params + [cluster subscribeAttributePacketMulticastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34646,34 +33815,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p }; /* - * Attribute ActiveNetworkFaultsList + * Attribute PacketUnicastRxCount */ -class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() - : ReadAttribute("active-network-faults-list") + ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() + : ReadAttribute("packet-unicast-rx-count") { } - ~ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() + ~ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34682,25 +33851,25 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() - : SubscribeAttribute("active-network-faults-list") + SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() + : SubscribeAttribute("packet-unicast-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34711,10 +33880,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params + [cluster subscribeAttributePacketUnicastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34728,34 +33897,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public }; /* - * Attribute GeneratedCommandList + * Attribute PacketUnicastTxCount */ -class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() + : ReadAttribute("packet-unicast-tx-count") { } - ~ReadThreadNetworkDiagnosticsGeneratedCommandList() + ~ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34764,25 +33933,25 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() + : SubscribeAttribute("packet-unicast-tx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34793,10 +33962,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePacketUnicastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34810,34 +33979,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su }; /* - * Attribute AcceptedCommandList + * Attribute CurrentMaxRate */ -class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWiFiNetworkDiagnosticsCurrentMaxRate() + : ReadAttribute("current-max-rate") { } - ~ReadThreadNetworkDiagnosticsAcceptedCommandList() + ~ReadWiFiNetworkDiagnosticsCurrentMaxRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34846,25 +34015,25 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() + : SubscribeAttribute("current-max-rate") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34875,10 +34044,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentMaxRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34891,37 +34060,35 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute OverrunCount */ -class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsEventList() - : ReadAttribute("event-list") + ReadWiFiNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadThreadNetworkDiagnosticsEventList() + ~ReadWiFiNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics EventList read Error", error); + LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34930,25 +34097,25 @@ class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsEventList() + ~SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34959,10 +34126,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34975,37 +34142,35 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadWiFiNetworkDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDiagnosticsAttributeList() + ~ReadWiFiNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); + LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35014,25 +34179,25 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAttributeList() + ~SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35043,10 +34208,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35060,34 +34225,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadWiFiNetworkDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDiagnosticsFeatureMap() + ~ReadWiFiNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); + LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35096,25 +34261,25 @@ class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() + ~SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35125,10 +34290,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35141,35 +34306,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAtt } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadWiFiNetworkDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDiagnosticsClusterRevision() + ~ReadWiFiNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); + LogNSError("WiFiNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35178,25 +34345,25 @@ class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWiFiNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() + ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35207,10 +34374,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35223,112 +34390,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public Subscri } }; -/*----------------------------------------------------------------------------*\ -| Cluster WiFiNetworkDiagnostics | 0x0036 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Bssid | 0x0000 | -| * SecurityType | 0x0001 | -| * WiFiVersion | 0x0002 | -| * ChannelNumber | 0x0003 | -| * Rssi | 0x0004 | -| * BeaconLostCount | 0x0005 | -| * BeaconRxCount | 0x0006 | -| * PacketMulticastRxCount | 0x0007 | -| * PacketMulticastTxCount | 0x0008 | -| * PacketUnicastRxCount | 0x0009 | -| * PacketUnicastTxCount | 0x000A | -| * CurrentMaxRate | 0x000B | -| * OverrunCount | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Disconnection | 0x0000 | -| * AssociationFailure | 0x0001 | -| * ConnectionStatus | 0x0002 | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetCounts - */ -class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { -public: - WiFiNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetCountsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute Bssid + * Attribute AttributeList */ -class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBssid() - : ReadAttribute("bssid") + ReadWiFiNetworkDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWiFiNetworkDiagnosticsBssid() + ~ReadWiFiNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); + LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35337,21 +34429,21 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBssid() - : SubscribeAttribute("bssid") + SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBssid() + ~SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -35366,10 +34458,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBSSIDWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35383,34 +34475,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute }; /* - * Attribute SecurityType + * Attribute FeatureMap */ -class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsSecurityType() - : ReadAttribute("security-type") + ReadWiFiNetworkDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWiFiNetworkDiagnosticsSecurityType() + ~ReadWiFiNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); + LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35419,21 +34511,21 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() - : SubscribeAttribute("security-type") + SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() + ~SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -35448,10 +34540,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSecurityTypeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35465,34 +34557,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt }; /* - * Attribute WiFiVersion + * Attribute ClusterRevision */ -class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsWiFiVersion() - : ReadAttribute("wi-fi-version") + ReadWiFiNetworkDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWiFiNetworkDiagnosticsWiFiVersion() + ~ReadWiFiNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); + LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35501,21 +34593,21 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() - : SubscribeAttribute("wi-fi-version") + SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() + ~SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -35530,10 +34622,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiFiVersionWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35546,117 +34638,105 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr } }; +/*----------------------------------------------------------------------------*\ +| Cluster EthernetNetworkDiagnostics | 0x0037 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PHYRate | 0x0000 | +| * FullDuplex | 0x0001 | +| * PacketRxCount | 0x0002 | +| * PacketTxCount | 0x0003 | +| * TxErrCount | 0x0004 | +| * CollisionCount | 0x0005 | +| * OverrunCount | 0x0006 | +| * CarrierDetect | 0x0007 | +| * TimeSinceReset | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ChannelNumber + * Command ResetCounts */ -class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { +class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { public: - ReadWiFiNetworkDiagnosticsChannelNumber() - : ReadAttribute("channel-number") - { - } - - ~ReadWiFiNetworkDiagnosticsChannelNumber() + EthernetNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAttribute { -public: - SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() - : SubscribeAttribute("channel-number") - { - } - - ~SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resetCountsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeChannelNumberWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute Rssi + * Attribute PHYRate */ -class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsRssi() - : ReadAttribute("rssi") + ReadEthernetNetworkDiagnosticsPHYRate() + : ReadAttribute("phyrate") { } - ~ReadWiFiNetworkDiagnosticsRssi() + ~ReadEthernetNetworkDiagnosticsPHYRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); + LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35665,25 +34745,25 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsRssi() - : SubscribeAttribute("rssi") + SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() + : SubscribeAttribute("phyrate") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsRssi() + ~SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35694,10 +34774,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRSSIWithParams:params + [cluster subscribeAttributePHYRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35711,34 +34791,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { }; /* - * Attribute BeaconLostCount + * Attribute FullDuplex */ -class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBeaconLostCount() - : ReadAttribute("beacon-lost-count") + ReadEthernetNetworkDiagnosticsFullDuplex() + : ReadAttribute("full-duplex") { } - ~ReadWiFiNetworkDiagnosticsBeaconLostCount() + ~ReadEthernetNetworkDiagnosticsFullDuplex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); + LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35747,25 +34827,25 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() - : SubscribeAttribute("beacon-lost-count") + SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() + : SubscribeAttribute("full-duplex") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35776,10 +34856,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBeaconLostCountWithParams:params + [cluster subscribeAttributeFullDuplexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35793,34 +34873,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe }; /* - * Attribute BeaconRxCount + * Attribute PacketRxCount */ -class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBeaconRxCount() - : ReadAttribute("beacon-rx-count") + ReadEthernetNetworkDiagnosticsPacketRxCount() + : ReadAttribute("packet-rx-count") { } - ~ReadWiFiNetworkDiagnosticsBeaconRxCount() + ~ReadEthernetNetworkDiagnosticsPacketRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); + LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35829,25 +34909,25 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() - : SubscribeAttribute("beacon-rx-count") + SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() + : SubscribeAttribute("packet-rx-count") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35858,10 +34938,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBeaconRxCountWithParams:params + [cluster subscribeAttributePacketRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35875,34 +34955,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt }; /* - * Attribute PacketMulticastRxCount + * Attribute PacketTxCount */ -class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() - : ReadAttribute("packet-multicast-rx-count") + ReadEthernetNetworkDiagnosticsPacketTxCount() + : ReadAttribute("packet-tx-count") { } - ~ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() + ~ReadEthernetNetworkDiagnosticsPacketTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); + LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35911,25 +34991,25 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() - : SubscribeAttribute("packet-multicast-rx-count") + SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() + : SubscribeAttribute("packet-tx-count") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35940,10 +35020,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketMulticastRxCountWithParams:params + [cluster subscribeAttributePacketTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35957,34 +35037,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su }; /* - * Attribute PacketMulticastTxCount + * Attribute TxErrCount */ -class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() - : ReadAttribute("packet-multicast-tx-count") + ReadEthernetNetworkDiagnosticsTxErrCount() + : ReadAttribute("tx-err-count") { } - ~ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() + ~ReadEthernetNetworkDiagnosticsTxErrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); + LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35993,25 +35073,25 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() - : SubscribeAttribute("packet-multicast-tx-count") + SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() + : SubscribeAttribute("tx-err-count") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36022,10 +35102,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketMulticastTxCountWithParams:params + [cluster subscribeAttributeTxErrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36039,34 +35119,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su }; /* - * Attribute PacketUnicastRxCount + * Attribute CollisionCount */ -class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() - : ReadAttribute("packet-unicast-rx-count") + ReadEthernetNetworkDiagnosticsCollisionCount() + : ReadAttribute("collision-count") { } - ~ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() + ~ReadEthernetNetworkDiagnosticsCollisionCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); + LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36075,25 +35155,25 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() - : SubscribeAttribute("packet-unicast-rx-count") + SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() + : SubscribeAttribute("collision-count") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36104,10 +35184,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketUnicastRxCountWithParams:params + [cluster subscribeAttributeCollisionCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36121,34 +35201,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs }; /* - * Attribute PacketUnicastTxCount + * Attribute OverrunCount */ -class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() - : ReadAttribute("packet-unicast-tx-count") + ReadEthernetNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() + ~ReadEthernetNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); + LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36157,25 +35237,25 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() - : SubscribeAttribute("packet-unicast-tx-count") + SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36186,10 +35266,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketUnicastTxCountWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36203,34 +35283,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs }; /* - * Attribute CurrentMaxRate + * Attribute CarrierDetect */ -class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsCurrentMaxRate() - : ReadAttribute("current-max-rate") + ReadEthernetNetworkDiagnosticsCarrierDetect() + : ReadAttribute("carrier-detect") { } - ~ReadWiFiNetworkDiagnosticsCurrentMaxRate() + ~ReadEthernetNetworkDiagnosticsCarrierDetect() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); + LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36239,25 +35319,25 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() - : SubscribeAttribute("current-max-rate") + SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() + : SubscribeAttribute("carrier-detect") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() + ~SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36268,10 +35348,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentMaxRateWithParams:params + [cluster subscribeAttributeCarrierDetectWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36285,34 +35365,34 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA }; /* - * Attribute OverrunCount + * Attribute TimeSinceReset */ -class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadEthernetNetworkDiagnosticsTimeSinceReset() + : ReadAttribute("time-since-reset") { } - ~ReadWiFiNetworkDiagnosticsOverrunCount() + ~ReadEthernetNetworkDiagnosticsTimeSinceReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); + LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36321,25 +35401,25 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() + : SubscribeAttribute("time-since-reset") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36350,10 +35430,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeTimeSinceResetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36369,32 +35449,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt /* * Attribute GeneratedCommandList */ -class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsGeneratedCommandList() + ReadEthernetNetworkDiagnosticsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadWiFiNetworkDiagnosticsGeneratedCommandList() + ~ReadEthernetNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36403,25 +35483,25 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36435,7 +35515,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36451,32 +35531,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs /* * Attribute AcceptedCommandList */ -class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsAcceptedCommandList() + ReadEthernetNetworkDiagnosticsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadWiFiNetworkDiagnosticsAcceptedCommandList() + ~ReadEthernetNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36485,25 +35565,25 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36517,7 +35597,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36535,32 +35615,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc /* * Attribute EventList */ -class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsEventList() + ReadEthernetNetworkDiagnosticsEventList() : ReadAttribute("event-list") { } - ~ReadWiFiNetworkDiagnosticsEventList() + ~ReadEthernetNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics EventList read Error", error); + LogNSError("EthernetNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36569,25 +35649,25 @@ class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsEventList() + SubscribeAttributeEthernetNetworkDiagnosticsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() + ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36601,7 +35681,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36619,32 +35699,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsAttributeList() + ReadEthernetNetworkDiagnosticsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadWiFiNetworkDiagnosticsAttributeList() + ~ReadEthernetNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); + LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36653,25 +35733,25 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + ~SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36685,7 +35765,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36701,32 +35781,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt /* * Attribute FeatureMap */ -class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsFeatureMap() + ReadEthernetNetworkDiagnosticsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadWiFiNetworkDiagnosticsFeatureMap() + ~ReadEthernetNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); + LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36735,25 +35815,25 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + ~SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36767,7 +35847,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36783,32 +35863,32 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri /* * Attribute ClusterRevision */ -class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsClusterRevision() + ReadEthernetNetworkDiagnosticsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadWiFiNetworkDiagnosticsClusterRevision() + ~ReadEthernetNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); + LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36817,25 +35897,25 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + ~SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36849,7 +35929,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36862,22 +35942,31 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster EthernetNetworkDiagnostics | 0x0037 | +| Cluster TimeSynchronization | 0x0038 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCounts | 0x00 | +| * SetUTCTime | 0x00 | +| * SetTrustedTimeSource | 0x01 | +| * SetTimeZone | 0x02 | +| * SetDSTOffset | 0x04 | +| * SetDefaultNTP | 0x05 | |------------------------------------------------------------------------------| | Attributes: | | -| * PHYRate | 0x0000 | -| * FullDuplex | 0x0001 | -| * PacketRxCount | 0x0002 | -| * PacketTxCount | 0x0003 | -| * TxErrCount | 0x0004 | -| * CollisionCount | 0x0005 | -| * OverrunCount | 0x0006 | -| * CarrierDetect | 0x0007 | -| * TimeSinceReset | 0x0008 | +| * UTCTime | 0x0000 | +| * Granularity | 0x0001 | +| * TimeSource | 0x0002 | +| * TrustedTimeSource | 0x0003 | +| * DefaultNTP | 0x0004 | +| * TimeZone | 0x0005 | +| * DSTOffset | 0x0006 | +| * LocalTime | 0x0007 | +| * TimeZoneDatabase | 0x0008 | +| * NTPServerAvailable | 0x0009 | +| * TimeZoneListMaxSize | 0x000A | +| * DSTOffsetListMaxSize | 0x000B | +| * SupportsDNSResolve | 0x000C | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -36886,163 +35975,366 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * DSTTableEmpty | 0x0000 | +| * DSTStatus | 0x0001 | +| * TimeZoneStatus | 0x0002 | +| * TimeFailure | 0x0003 | +| * MissingTrustedTimeSource | 0x0004 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command ResetCounts + * Command SetUTCTime */ -class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { +class TimeSynchronizationSetUTCTime : public ClusterCommand { public: - EthernetNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") + TimeSynchronizationSetUTCTime() + : ClusterCommand("set-utctime") { + AddArgument("UTCTime", 0, UINT64_MAX, &mRequest.UTCTime); + AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); + AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.utcTime = [NSNumber numberWithUnsignedLongLong:mRequest.UTCTime]; + params.granularity = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.granularity)]; + if (mRequest.timeSource.HasValue()) { + params.timeSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.timeSource.Value())]; + } else { + params.timeSource = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setUTCTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute PHYRate + * Command SetTrustedTimeSource */ -class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { +class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { public: - ReadEthernetNetworkDiagnosticsPHYRate() - : ReadAttribute("phyrate") - { - } - - ~ReadEthernetNetworkDiagnosticsPHYRate() + TimeSynchronizationSetTrustedTimeSource() + : ClusterCommand("set-trusted-time-source") + , mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.trustedTimeSource.IsNull()) { + params.trustedTimeSource = nil; + } else { + params.trustedTimeSource = [MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct new]; + params.trustedTimeSource.nodeID = [NSNumber numberWithUnsignedLongLong:mRequest.trustedTimeSource.Value().nodeID]; + params.trustedTimeSource.endpoint = [NSNumber numberWithUnsignedShort:mRequest.trustedTimeSource.Value().endpoint]; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTrustedTimeSourceWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; + TypedComplexArgument> mComplex_TrustedTimeSource; }; -class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTimeZone + */ +class TimeSynchronizationSetTimeZone : public ClusterCommand { public: - SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() - : SubscribeAttribute("phyrate") - { - } - - ~SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() + TimeSynchronizationSetTimeZone() + : ClusterCommand("set-time-zone") + , mComplex_TimeZone(&mRequest.timeZone) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeZone", &mComplex_TimeZone); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.timeZone) { + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + [array_0 addObject:newElement_0]; + } + params.timeZone = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTimeZoneWithParams:params completion: + ^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributePHYRateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; + TypedComplexArgument> mComplex_TimeZone; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetDSTOffset + */ +class TimeSynchronizationSetDSTOffset : public ClusterCommand { +public: + TimeSynchronizationSetDSTOffset() + : ClusterCommand("set-dstoffset") + , mComplex_DSTOffset(&mRequest.DSTOffset) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DSTOffset", &mComplex_DSTOffset); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.DSTOffset) { + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + if (entry_0.validUntil.IsNull()) { + newElement_0.validUntil = nil; } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; } - SetCommandExitStatus(error); - }]; + [array_0 addObject:newElement_0]; + } + params.dstOffset = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setDSTOffsetWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; + TypedComplexArgument> mComplex_DSTOffset; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetDefaultNTP + */ +class TimeSynchronizationSetDefaultNTP : public ClusterCommand { +public: + TimeSynchronizationSetDefaultNTP() + : ClusterCommand("set-default-ntp") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DefaultNTP", &mRequest.defaultNTP); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.defaultNTP.IsNull()) { + params.defaultNTP = nil; + } else { + params.defaultNTP = [[NSString alloc] initWithBytes:mRequest.defaultNTP.Value().data() length:mRequest.defaultNTP.Value().size() encoding:NSUTF8StringEncoding]; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setDefaultNTPWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FullDuplex + * Attribute UTCTime */ -class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { +class ReadTimeSynchronizationUTCTime : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsFullDuplex() - : ReadAttribute("full-duplex") + ReadTimeSynchronizationUTCTime() + : ReadAttribute("utctime") { } - ~ReadEthernetNetworkDiagnosticsFullDuplex() + ~ReadTimeSynchronizationUTCTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); + LogNSError("TimeSynchronization UTCTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37051,25 +36343,25 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() - : SubscribeAttribute("full-duplex") + SubscribeAttributeTimeSynchronizationUTCTime() + : SubscribeAttribute("utctime") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() + ~SubscribeAttributeTimeSynchronizationUTCTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37080,10 +36372,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFullDuplexWithParams:params + [cluster subscribeAttributeUTCTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37096,35 +36388,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketRxCount + * Attribute Granularity */ -class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { +class ReadTimeSynchronizationGranularity : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsPacketRxCount() - : ReadAttribute("packet-rx-count") + ReadTimeSynchronizationGranularity() + : ReadAttribute("granularity") { } - ~ReadEthernetNetworkDiagnosticsPacketRxCount() + ~ReadTimeSynchronizationGranularity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); + LogNSError("TimeSynchronization Granularity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37133,25 +36428,25 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() - : SubscribeAttribute("packet-rx-count") + SubscribeAttributeTimeSynchronizationGranularity() + : SubscribeAttribute("granularity") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() + ~SubscribeAttributeTimeSynchronizationGranularity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37162,10 +36457,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketRxCountWithParams:params + [cluster subscribeAttributeGranularityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37178,35 +36473,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketTxCount + * Attribute TimeSource */ -class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { +class ReadTimeSynchronizationTimeSource : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsPacketTxCount() - : ReadAttribute("packet-tx-count") + ReadTimeSynchronizationTimeSource() + : ReadAttribute("time-source") { } - ~ReadEthernetNetworkDiagnosticsPacketTxCount() + ~ReadTimeSynchronizationTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); + LogNSError("TimeSynchronization TimeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37215,25 +36513,25 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() - : SubscribeAttribute("packet-tx-count") + SubscribeAttributeTimeSynchronizationTimeSource() + : SubscribeAttribute("time-source") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() + ~SubscribeAttributeTimeSynchronizationTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37244,10 +36542,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketTxCountWithParams:params + [cluster subscribeAttributeTimeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37260,35 +36558,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TxErrCount + * Attribute TrustedTimeSource */ -class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { +class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsTxErrCount() - : ReadAttribute("tx-err-count") + ReadTimeSynchronizationTrustedTimeSource() + : ReadAttribute("trusted-time-source") { } - ~ReadEthernetNetworkDiagnosticsTxErrCount() + ~ReadTimeSynchronizationTrustedTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTrustedTimeSourceWithCompletion:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); + LogNSError("TimeSynchronization TrustedTimeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37297,25 +36598,25 @@ class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() - : SubscribeAttribute("tx-err-count") + SubscribeAttributeTimeSynchronizationTrustedTimeSource() + : SubscribeAttribute("trusted-time-source") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() + ~SubscribeAttributeTimeSynchronizationTrustedTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37326,10 +36627,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrCountWithParams:params + [cluster subscribeAttributeTrustedTimeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); + reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37342,35 +36643,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CollisionCount + * Attribute DefaultNTP */ -class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { +class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsCollisionCount() - : ReadAttribute("collision-count") + ReadTimeSynchronizationDefaultNTP() + : ReadAttribute("default-ntp") { } - ~ReadEthernetNetworkDiagnosticsCollisionCount() + ~ReadTimeSynchronizationDefaultNTP() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); + LogNSError("TimeSynchronization DefaultNTP read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37379,25 +36683,25 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() - : SubscribeAttribute("collision-count") + SubscribeAttributeTimeSynchronizationDefaultNTP() + : SubscribeAttribute("default-ntp") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() + ~SubscribeAttributeTimeSynchronizationDefaultNTP() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37408,10 +36712,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCollisionCountWithParams:params + [cluster subscribeAttributeDefaultNTPWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37424,35 +36728,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OverrunCount + * Attribute TimeZone */ -class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadTimeSynchronizationTimeZone : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadTimeSynchronizationTimeZone() + : ReadAttribute("time-zone") { } - ~ReadEthernetNetworkDiagnosticsOverrunCount() + ~ReadTimeSynchronizationTimeZone() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); + LogNSError("TimeSynchronization TimeZone read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37461,25 +36768,25 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeTimeSynchronizationTimeZone() + : SubscribeAttribute("time-zone") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeTimeSynchronizationTimeZone() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37490,10 +36797,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeTimeZoneWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37506,35 +36813,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CarrierDetect + * Attribute DSTOffset */ -class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { +class ReadTimeSynchronizationDSTOffset : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsCarrierDetect() - : ReadAttribute("carrier-detect") + ReadTimeSynchronizationDSTOffset() + : ReadAttribute("dstoffset") { } - ~ReadEthernetNetworkDiagnosticsCarrierDetect() + ~ReadTimeSynchronizationDSTOffset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); + LogNSError("TimeSynchronization DSTOffset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37543,25 +36853,25 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() - : SubscribeAttribute("carrier-detect") + SubscribeAttributeTimeSynchronizationDSTOffset() + : SubscribeAttribute("dstoffset") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() + ~SubscribeAttributeTimeSynchronizationDSTOffset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37572,10 +36882,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCarrierDetectWithParams:params + [cluster subscribeAttributeDSTOffsetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37588,35 +36898,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TimeSinceReset + * Attribute LocalTime */ -class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { +class ReadTimeSynchronizationLocalTime : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsTimeSinceReset() - : ReadAttribute("time-since-reset") + ReadTimeSynchronizationLocalTime() + : ReadAttribute("local-time") { } - ~ReadEthernetNetworkDiagnosticsTimeSinceReset() + ~ReadTimeSynchronizationLocalTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); + LogNSError("TimeSynchronization LocalTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37625,25 +36938,25 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() - : SubscribeAttribute("time-since-reset") + SubscribeAttributeTimeSynchronizationLocalTime() + : SubscribeAttribute("local-time") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() + ~SubscribeAttributeTimeSynchronizationLocalTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37654,10 +36967,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeSinceResetWithParams:params + [cluster subscribeAttributeLocalTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37670,35 +36983,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute TimeZoneDatabase */ -class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimeSynchronizationTimeZoneDatabase() + : ReadAttribute("time-zone-database") { } - ~ReadEthernetNetworkDiagnosticsGeneratedCommandList() + ~ReadTimeSynchronizationTimeZoneDatabase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37707,25 +37023,25 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimeSynchronizationTimeZoneDatabase() + : SubscribeAttribute("time-zone-database") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeTimeSynchronizationTimeZoneDatabase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37736,10 +37052,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTimeZoneDatabaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37752,35 +37068,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute NTPServerAvailable */ -class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTimeSynchronizationNTPServerAvailable() + : ReadAttribute("ntpserver-available") { } - ~ReadEthernetNetworkDiagnosticsAcceptedCommandList() + ~ReadTimeSynchronizationNTPServerAvailable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("TimeSynchronization NTPServerAvailable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37789,25 +37108,25 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTimeSynchronizationNTPServerAvailable() + : SubscribeAttribute("ntpserver-available") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeTimeSynchronizationNTPServerAvailable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37818,10 +37137,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeNTPServerAvailableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37834,37 +37153,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute TimeZoneListMaxSize */ -class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { +class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsEventList() - : ReadAttribute("event-list") + ReadTimeSynchronizationTimeZoneListMaxSize() + : ReadAttribute("time-zone-list-max-size") { } - ~ReadEthernetNetworkDiagnosticsEventList() + ~ReadTimeSynchronizationTimeZoneListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics EventList read Error", error); + LogNSError("TimeSynchronization TimeZoneListMaxSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37873,25 +37193,25 @@ class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() + : SubscribeAttribute("time-zone-list-max-size") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() + ~SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37902,10 +37222,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTimeZoneListMaxSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37919,36 +37239,37 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute DSTOffsetListMaxSize */ -class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadTimeSynchronizationDSTOffsetListMaxSize() + : ReadAttribute("dstoffset-list-max-size") { } - ~ReadEthernetNetworkDiagnosticsAttributeList() + ~ReadTimeSynchronizationDSTOffsetListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); + LogNSError("TimeSynchronization DSTOffsetListMaxSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37957,25 +37278,25 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() + : SubscribeAttribute("dstoffset-list-max-size") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() + ~SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37986,10 +37307,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeDSTOffsetListMaxSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38002,35 +37323,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute SupportsDNSResolve */ -class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { +class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadTimeSynchronizationSupportsDNSResolve() + : ReadAttribute("supports-dnsresolve") { } - ~ReadEthernetNetworkDiagnosticsFeatureMap() + ~ReadTimeSynchronizationSupportsDNSResolve() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); + LogNSError("TimeSynchronization SupportsDNSResolve read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38039,25 +37363,25 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTimeSynchronizationSupportsDNSResolve() + : SubscribeAttribute("supports-dnsresolve") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() + ~SubscribeAttributeTimeSynchronizationSupportsDNSResolve() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38068,10 +37392,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSupportsDNSResolveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38084,35 +37408,38 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { +class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadTimeSynchronizationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadEthernetNetworkDiagnosticsClusterRevision() + ~ReadTimeSynchronizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); + LogNSError("TimeSynchronization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38121,25 +37448,25 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTimeSynchronizationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() + ~SubscribeAttributeTimeSynchronizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38150,10 +37477,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38166,399 +37493,208 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster TimeSynchronization | 0x0038 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetUTCTime | 0x00 | -| * SetTrustedTimeSource | 0x01 | -| * SetTimeZone | 0x02 | -| * SetDSTOffset | 0x04 | -| * SetDefaultNTP | 0x05 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * UTCTime | 0x0000 | -| * Granularity | 0x0001 | -| * TimeSource | 0x0002 | -| * TrustedTimeSource | 0x0003 | -| * DefaultNTP | 0x0004 | -| * TimeZone | 0x0005 | -| * DSTOffset | 0x0006 | -| * LocalTime | 0x0007 | -| * TimeZoneDatabase | 0x0008 | -| * NTPServerAvailable | 0x0009 | -| * TimeZoneListMaxSize | 0x000A | -| * DSTOffsetListMaxSize | 0x000B | -| * SupportsDNSResolve | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * DSTTableEmpty | 0x0000 | -| * DSTStatus | 0x0001 | -| * TimeZoneStatus | 0x0002 | -| * TimeFailure | 0x0003 | -| * MissingTrustedTimeSource | 0x0004 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command SetUTCTime + * Attribute AcceptedCommandList */ -class TimeSynchronizationSetUTCTime : public ClusterCommand { +class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { public: - TimeSynchronizationSetUTCTime() - : ClusterCommand("set-utctime") + ReadTimeSynchronizationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadTimeSynchronizationAcceptedCommandList() { - AddArgument("UTCTime", 0, UINT64_MAX, &mRequest.UTCTime); - AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); - AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.utcTime = [NSNumber numberWithUnsignedLongLong:mRequest.UTCTime]; - params.granularity = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.granularity)]; - if (mRequest.timeSource.HasValue()) { - params.timeSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.timeSource.Value())]; - } else { - params.timeSource = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUTCTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TimeSynchronization AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTrustedTimeSource - */ -class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { +class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public SubscribeAttribute { public: - TimeSynchronizationSetTrustedTimeSource() - : ClusterCommand("set-trusted-time-source") - , mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) + SubscribeAttributeTimeSynchronizationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeTimeSynchronizationAcceptedCommandList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.trustedTimeSource.IsNull()) { - params.trustedTimeSource = nil; - } else { - params.trustedTimeSource = [MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct new]; - params.trustedTimeSource.nodeID = [NSNumber numberWithUnsignedLongLong:mRequest.trustedTimeSource.Value().nodeID]; - params.trustedTimeSource.endpoint = [NSNumber numberWithUnsignedShort:mRequest.trustedTimeSource.Value().endpoint]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTrustedTimeSourceWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; - TypedComplexArgument> mComplex_TrustedTimeSource; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + /* - * Command SetTimeZone + * Attribute EventList */ -class TimeSynchronizationSetTimeZone : public ClusterCommand { +class ReadTimeSynchronizationEventList : public ReadAttribute { public: - TimeSynchronizationSetTimeZone() - : ClusterCommand("set-time-zone") - , mComplex_TimeZone(&mRequest.timeZone) + ReadTimeSynchronizationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadTimeSynchronizationEventList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeZone", &mComplex_TimeZone); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.timeZone) { - MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; - if (entry_0.name.HasValue()) { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_0.name = nil; - } - [array_0 addObject:newElement_0]; - } - params.timeZone = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTimeZoneWithParams:params completion: - ^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TimeSynchronization EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; - TypedComplexArgument> mComplex_TimeZone; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetDSTOffset - */ -class TimeSynchronizationSetDSTOffset : public ClusterCommand { +class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute { public: - TimeSynchronizationSetDSTOffset() - : ClusterCommand("set-dstoffset") - , mComplex_DSTOffset(&mRequest.DSTOffset) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DSTOffset", &mComplex_DSTOffset); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeTimeSynchronizationEventList() + : SubscribeAttribute("event-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.DSTOffset) { - MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; - if (entry_0.validUntil.IsNull()) { - newElement_0.validUntil = nil; - } else { - newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; - } - [array_0 addObject:newElement_0]; - } - params.dstOffset = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setDSTOffsetWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; - TypedComplexArgument> mComplex_DSTOffset; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetDefaultNTP - */ -class TimeSynchronizationSetDefaultNTP : public ClusterCommand { -public: - TimeSynchronizationSetDefaultNTP() - : ClusterCommand("set-default-ntp") + ~SubscribeAttributeTimeSynchronizationEventList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DefaultNTP", &mRequest.defaultNTP); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.defaultNTP.IsNull()) { - params.defaultNTP = nil; - } else { - params.defaultNTP = [[NSString alloc] initWithBytes:mRequest.defaultNTP.Value().data() length:mRequest.defaultNTP.Value().size() encoding:NSUTF8StringEncoding]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setDefaultNTPWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute UTCTime + * Attribute AttributeList */ -class ReadTimeSynchronizationUTCTime : public ReadAttribute { +class ReadTimeSynchronizationAttributeList : public ReadAttribute { public: - ReadTimeSynchronizationUTCTime() - : ReadAttribute("utctime") + ReadTimeSynchronizationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTimeSynchronizationUTCTime() + ~ReadTimeSynchronizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization UTCTime read Error", error); + LogNSError("TimeSynchronization AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38567,21 +37703,21 @@ class ReadTimeSynchronizationUTCTime : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationUTCTime() - : SubscribeAttribute("utctime") + SubscribeAttributeTimeSynchronizationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimeSynchronizationUTCTime() + ~SubscribeAttributeTimeSynchronizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -38596,10 +37732,10 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUTCTimeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38616,34 +37752,34 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Granularity + * Attribute FeatureMap */ -class ReadTimeSynchronizationGranularity : public ReadAttribute { +class ReadTimeSynchronizationFeatureMap : public ReadAttribute { public: - ReadTimeSynchronizationGranularity() - : ReadAttribute("granularity") + ReadTimeSynchronizationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTimeSynchronizationGranularity() + ~ReadTimeSynchronizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization Granularity read Error", error); + LogNSError("TimeSynchronization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38652,21 +37788,21 @@ class ReadTimeSynchronizationGranularity : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationGranularity() - : SubscribeAttribute("granularity") + SubscribeAttributeTimeSynchronizationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimeSynchronizationGranularity() + ~SubscribeAttributeTimeSynchronizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -38681,10 +37817,10 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGranularityWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38701,34 +37837,34 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute TimeSource + * Attribute ClusterRevision */ -class ReadTimeSynchronizationTimeSource : public ReadAttribute { +class ReadTimeSynchronizationClusterRevision : public ReadAttribute { public: - ReadTimeSynchronizationTimeSource() - : ReadAttribute("time-source") + ReadTimeSynchronizationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimeSynchronizationTimeSource() + ~ReadTimeSynchronizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeSource read Error", error); + LogNSError("TimeSynchronization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38737,21 +37873,21 @@ class ReadTimeSynchronizationTimeSource : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeSource() - : SubscribeAttribute("time-source") + SubscribeAttributeTimeSynchronizationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimeSynchronizationTimeSource() + ~SubscribeAttributeTimeSynchronizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -38766,10 +37902,10 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeSourceWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38782,38 +37918,136 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasicInformation | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +| * KeepActive | 0x80 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * ProductID | 0x0004 | +| * NodeLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * ProductAppearance | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +| * ActiveChanged | 0x0080 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command KeepActive + */ +class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { +public: + BridgedDeviceBasicInformationKeepActive() + : ClusterCommand("keep-active") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeoutMs", 0, UINT32_MAX, &mRequest.timeoutMs); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + params.timeoutMs = [NSNumber numberWithUnsignedInt:mRequest.timeoutMs]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster keepActiveWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute TrustedTimeSource + * Attribute VendorName */ -class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { public: - ReadTimeSynchronizationTrustedTimeSource() - : ReadAttribute("trusted-time-source") + ReadBridgedDeviceBasicInformationVendorName() + : ReadAttribute("vendor-name") { } - ~ReadTimeSynchronizationTrustedTimeSource() + ~ReadBridgedDeviceBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTrustedTimeSourceWithCompletion:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TrustedTimeSource read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38822,25 +38056,25 @@ class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTrustedTimeSource() - : SubscribeAttribute("trusted-time-source") + SubscribeAttributeBridgedDeviceBasicInformationVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeTimeSynchronizationTrustedTimeSource() + ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38851,10 +38085,10 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTrustedTimeSourceWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38867,38 +38101,35 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute DefaultNTP + * Attribute VendorID */ -class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { public: - ReadTimeSynchronizationDefaultNTP() - : ReadAttribute("default-ntp") + ReadBridgedDeviceBasicInformationVendorID() + : ReadAttribute("vendor-id") { } - ~ReadTimeSynchronizationDefaultNTP() + ~ReadBridgedDeviceBasicInformationVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization DefaultNTP read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38907,25 +38138,25 @@ class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDefaultNTP() - : SubscribeAttribute("default-ntp") + SubscribeAttributeBridgedDeviceBasicInformationVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeTimeSynchronizationDefaultNTP() + ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38936,10 +38167,10 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultNTPWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38952,38 +38183,35 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZone + * Attribute ProductName */ -class ReadTimeSynchronizationTimeZone : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { public: - ReadTimeSynchronizationTimeZone() - : ReadAttribute("time-zone") + ReadBridgedDeviceBasicInformationProductName() + : ReadAttribute("product-name") { } - ~ReadTimeSynchronizationTimeZone() + ~ReadBridgedDeviceBasicInformationProductName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeZone read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38992,25 +38220,25 @@ class ReadTimeSynchronizationTimeZone : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZone() - : SubscribeAttribute("time-zone") + SubscribeAttributeBridgedDeviceBasicInformationProductName() + : SubscribeAttribute("product-name") { } - ~SubscribeAttributeTimeSynchronizationTimeZone() + ~SubscribeAttributeBridgedDeviceBasicInformationProductName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39021,10 +38249,10 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneWithParams:params + [cluster subscribeAttributeProductNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39037,38 +38265,37 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute DSTOffset + * Attribute ProductID */ -class ReadTimeSynchronizationDSTOffset : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductID : public ReadAttribute { public: - ReadTimeSynchronizationDSTOffset() - : ReadAttribute("dstoffset") + ReadBridgedDeviceBasicInformationProductID() + : ReadAttribute("product-id") { } - ~ReadTimeSynchronizationDSTOffset() + ~ReadBridgedDeviceBasicInformationProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization DSTOffset read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39077,25 +38304,25 @@ class ReadTimeSynchronizationDSTOffset : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductID : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDSTOffset() - : SubscribeAttribute("dstoffset") + SubscribeAttributeBridgedDeviceBasicInformationProductID() + : SubscribeAttribute("product-id") { } - ~SubscribeAttributeTimeSynchronizationDSTOffset() + ~SubscribeAttributeBridgedDeviceBasicInformationProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39106,10 +38333,10 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDSTOffsetWithParams:params + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39123,37 +38350,36 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute LocalTime + * Attribute NodeLabel */ -class ReadTimeSynchronizationLocalTime : public ReadAttribute { +class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { public: - ReadTimeSynchronizationLocalTime() - : ReadAttribute("local-time") + ReadBridgedDeviceBasicInformationNodeLabel() + : ReadAttribute("node-label") { } - ~ReadTimeSynchronizationLocalTime() + ~ReadBridgedDeviceBasicInformationNodeLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization LocalTime read Error", error); + LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39162,25 +38388,66 @@ class ReadTimeSynchronizationLocalTime : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute { +class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { public: - SubscribeAttributeTimeSynchronizationLocalTime() - : SubscribeAttribute("local-time") + WriteBridgedDeviceBasicInformationNodeLabel() + : WriteAttribute("node-label") { + AddArgument("attr-name", "node-label"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimeSynchronizationLocalTime() + ~WriteBridgedDeviceBasicInformationNodeLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { +public: + SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + : SubscribeAttribute("node-label") + { + } + + ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39191,10 +38458,10 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTimeWithParams:params + [cluster subscribeAttributeNodeLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39207,38 +38474,35 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZoneDatabase + * Attribute HardwareVersion */ -class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { public: - ReadTimeSynchronizationTimeZoneDatabase() - : ReadAttribute("time-zone-database") + ReadBridgedDeviceBasicInformationHardwareVersion() + : ReadAttribute("hardware-version") { } - ~ReadTimeSynchronizationTimeZoneDatabase() + ~ReadBridgedDeviceBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39247,25 +38511,25 @@ class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZoneDatabase() - : SubscribeAttribute("time-zone-database") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() + : SubscribeAttribute("hardware-version") { } - ~SubscribeAttributeTimeSynchronizationTimeZoneDatabase() + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39276,10 +38540,10 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneDatabaseWithParams:params + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39292,38 +38556,35 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NTPServerAvailable + * Attribute HardwareVersionString */ -class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { public: - ReadTimeSynchronizationNTPServerAvailable() - : ReadAttribute("ntpserver-available") + ReadBridgedDeviceBasicInformationHardwareVersionString() + : ReadAttribute("hardware-version-string") { } - ~ReadTimeSynchronizationNTPServerAvailable() + ~ReadBridgedDeviceBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization NTPServerAvailable read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39332,25 +38593,25 @@ class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationNTPServerAvailable() - : SubscribeAttribute("ntpserver-available") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() + : SubscribeAttribute("hardware-version-string") { } - ~SubscribeAttributeTimeSynchronizationNTPServerAvailable() + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39361,10 +38622,10 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNTPServerAvailableWithParams:params + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39377,38 +38638,35 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZoneListMaxSize + * Attribute SoftwareVersion */ -class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { public: - ReadTimeSynchronizationTimeZoneListMaxSize() - : ReadAttribute("time-zone-list-max-size") + ReadBridgedDeviceBasicInformationSoftwareVersion() + : ReadAttribute("software-version") { } - ~ReadTimeSynchronizationTimeZoneListMaxSize() + ~ReadBridgedDeviceBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeZoneListMaxSize read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39417,25 +38675,25 @@ class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() - : SubscribeAttribute("time-zone-list-max-size") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() + : SubscribeAttribute("software-version") { } - ~SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39446,10 +38704,10 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneListMaxSizeWithParams:params + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39462,38 +38720,35 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute DSTOffsetListMaxSize + * Attribute SoftwareVersionString */ -class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { public: - ReadTimeSynchronizationDSTOffsetListMaxSize() - : ReadAttribute("dstoffset-list-max-size") + ReadBridgedDeviceBasicInformationSoftwareVersionString() + : ReadAttribute("software-version-string") { } - ~ReadTimeSynchronizationDSTOffsetListMaxSize() + ~ReadBridgedDeviceBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization DSTOffsetListMaxSize read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39502,25 +38757,25 @@ class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() - : SubscribeAttribute("dstoffset-list-max-size") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() + : SubscribeAttribute("software-version-string") { } - ~SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39531,10 +38786,10 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDSTOffsetListMaxSizeWithParams:params + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39547,38 +38802,35 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportsDNSResolve + * Attribute ManufacturingDate */ -class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { +class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { public: - ReadTimeSynchronizationSupportsDNSResolve() - : ReadAttribute("supports-dnsresolve") + ReadBridgedDeviceBasicInformationManufacturingDate() + : ReadAttribute("manufacturing-date") { } - ~ReadTimeSynchronizationSupportsDNSResolve() + ~ReadBridgedDeviceBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization SupportsDNSResolve read Error", error); + LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39587,25 +38839,25 @@ class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationSupportsDNSResolve() - : SubscribeAttribute("supports-dnsresolve") + SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() + : SubscribeAttribute("manufacturing-date") { } - ~SubscribeAttributeTimeSynchronizationSupportsDNSResolve() + ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39616,10 +38868,10 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportsDNSResolveWithParams:params + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39632,38 +38884,35 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute PartNumber */ -class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { public: - ReadTimeSynchronizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBridgedDeviceBasicInformationPartNumber() + : ReadAttribute("part-number") { } - ~ReadTimeSynchronizationGeneratedCommandList() + ~ReadBridgedDeviceBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization GeneratedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39672,25 +38921,25 @@ class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBridgedDeviceBasicInformationPartNumber() + : SubscribeAttribute("part-number") { } - ~SubscribeAttributeTimeSynchronizationGeneratedCommandList() + ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39701,10 +38950,10 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39717,38 +38966,35 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute ProductURL */ -class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { public: - ReadTimeSynchronizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBridgedDeviceBasicInformationProductURL() + : ReadAttribute("product-url") { } - ~ReadTimeSynchronizationAcceptedCommandList() + ~ReadBridgedDeviceBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization AcceptedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39757,25 +39003,25 @@ class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBridgedDeviceBasicInformationProductURL() + : SubscribeAttribute("product-url") { } - ~SubscribeAttributeTimeSynchronizationAcceptedCommandList() + ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39786,10 +39032,10 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39802,38 +39048,35 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ProductLabel */ -class ReadTimeSynchronizationEventList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { public: - ReadTimeSynchronizationEventList() - : ReadAttribute("event-list") + ReadBridgedDeviceBasicInformationProductLabel() + : ReadAttribute("product-label") { } - ~ReadTimeSynchronizationEventList() + ~ReadBridgedDeviceBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization EventList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39842,25 +39085,25 @@ class ReadTimeSynchronizationEventList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBridgedDeviceBasicInformationProductLabel() + : SubscribeAttribute("product-label") { } - ~SubscribeAttributeTimeSynchronizationEventList() + ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39871,10 +39114,10 @@ class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.EventList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39887,38 +39130,35 @@ class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute SerialNumber */ -class ReadTimeSynchronizationAttributeList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { public: - ReadTimeSynchronizationAttributeList() - : ReadAttribute("attribute-list") + ReadBridgedDeviceBasicInformationSerialNumber() + : ReadAttribute("serial-number") { } - ~ReadTimeSynchronizationAttributeList() + ~ReadBridgedDeviceBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization AttributeList read Error", error); + LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39927,25 +39167,25 @@ class ReadTimeSynchronizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() + : SubscribeAttribute("serial-number") { } - ~SubscribeAttributeTimeSynchronizationAttributeList() + ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39956,10 +39196,10 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39972,38 +39212,35 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute Reachable */ -class ReadTimeSynchronizationFeatureMap : public ReadAttribute { +class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { public: - ReadTimeSynchronizationFeatureMap() - : ReadAttribute("feature-map") + ReadBridgedDeviceBasicInformationReachable() + : ReadAttribute("reachable") { } - ~ReadTimeSynchronizationFeatureMap() + ~ReadBridgedDeviceBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization FeatureMap read Error", error); + LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40012,25 +39249,25 @@ class ReadTimeSynchronizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBridgedDeviceBasicInformationReachable() + : SubscribeAttribute("reachable") { } - ~SubscribeAttributeTimeSynchronizationFeatureMap() + ~SubscribeAttributeBridgedDeviceBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40041,10 +39278,10 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeReachableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40057,38 +39294,35 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute UniqueID */ -class ReadTimeSynchronizationClusterRevision : public ReadAttribute { +class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { public: - ReadTimeSynchronizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadBridgedDeviceBasicInformationUniqueID() + : ReadAttribute("unique-id") { } - ~ReadTimeSynchronizationClusterRevision() + ~ReadBridgedDeviceBasicInformationUniqueID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization ClusterRevision read Error", error); + LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40097,25 +39331,25 @@ class ReadTimeSynchronizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBridgedDeviceBasicInformationUniqueID() + : SubscribeAttribute("unique-id") { } - ~SubscribeAttributeTimeSynchronizationClusterRevision() + ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40126,10 +39360,10 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUniqueIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40142,136 +39376,35 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster BridgedDeviceBasicInformation | 0x0039 | -|------------------------------------------------------------------------------| -| Commands: | | -| * KeepActive | 0x80 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * ProductID | 0x0004 | -| * NodeLabel | 0x0005 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * ProductAppearance | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | -| * ActiveChanged | 0x0080 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command KeepActive - */ -class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { -public: - BridgedDeviceBasicInformationKeepActive() - : ClusterCommand("keep-active") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeoutMs", 0, UINT32_MAX, &mRequest.timeoutMs); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.timeoutMs = [NSNumber numberWithUnsignedInt:mRequest.timeoutMs]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keepActiveWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::BridgedDeviceBasicInformation::Commands::KeepActive::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute VendorName + * Attribute ProductAppearance */ -class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationVendorName() - : ReadAttribute("vendor-name") + ReadBridgedDeviceBasicInformationProductAppearance() + : ReadAttribute("product-appearance") { } - ~ReadBridgedDeviceBasicInformationVendorName() + ~ReadBridgedDeviceBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + [cluster readAttributeProductAppearanceWithCompletion:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40280,21 +39413,21 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() + ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40309,10 +39442,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeProductAppearanceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + reportHandler:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40326,34 +39459,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri }; /* - * Attribute VendorID + * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { +class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationVendorID() - : ReadAttribute("vendor-id") + ReadBridgedDeviceBasicInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationVendorID() + ~ReadBridgedDeviceBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); + LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40362,21 +39495,21 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() + ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40391,10 +39524,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40408,34 +39541,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe }; /* - * Attribute ProductName + * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductName() - : ReadAttribute("product-name") + ReadBridgedDeviceBasicInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationProductName() + ~ReadBridgedDeviceBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); + LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40444,21 +39577,21 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductName() - : SubscribeAttribute("product-name") + SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductName() + ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40473,10 +39606,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductNameWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40492,34 +39625,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute ProductID + * Attribute EventList */ -class ReadBridgedDeviceBasicInformationProductID : public ReadAttribute { +class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductID() - : ReadAttribute("product-id") + ReadBridgedDeviceBasicInformationEventList() + : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationProductID() + ~ReadBridgedDeviceBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductID::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductID response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ProductID read Error", error); + LogNSError("BridgedDeviceBasicInformation EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40528,21 +39661,21 @@ class ReadBridgedDeviceBasicInformationProductID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductID : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeBridgedDeviceBasicInformationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductID() + ~SubscribeAttributeBridgedDeviceBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductID::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40557,10 +39690,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductID : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40576,98 +39709,57 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductID : public Subscrib #endif // MTR_ENABLE_PROVISIONAL /* - * Attribute NodeLabel + * Attribute AttributeList */ -class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationNodeLabel() - : ReadAttribute("node-label") + ReadBridgedDeviceBasicInformationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBridgedDeviceBasicInformationNodeLabel() + ~ReadBridgedDeviceBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { -public: - WriteBridgedDeviceBasicInformationNodeLabel() - : WriteAttribute("node-label") - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBridgedDeviceBasicInformationNodeLabel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() - : SubscribeAttribute("node-label") + SubscribeAttributeBridgedDeviceBasicInformationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40682,10 +39774,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNodeLabelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40699,34 +39791,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib }; /* - * Attribute HardwareVersion + * Attribute FeatureMap */ -class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { +class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersion() - : ReadAttribute("hardware-version") + ReadBridgedDeviceBasicInformationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBridgedDeviceBasicInformationHardwareVersion() + ~ReadBridgedDeviceBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); + LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40735,21 +39827,21 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() - : SubscribeAttribute("hardware-version") + SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() + ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40764,10 +39856,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40781,34 +39873,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su }; /* - * Attribute HardwareVersionString + * Attribute ClusterRevision */ -class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { +class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersionString() - : ReadAttribute("hardware-version-string") + ReadBridgedDeviceBasicInformationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBridgedDeviceBasicInformationHardwareVersionString() + ~ReadBridgedDeviceBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); + LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40817,21 +39909,21 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() - : SubscribeAttribute("hardware-version-string") + SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() + ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -40846,10 +39938,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40862,35 +39954,61 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub } }; +/*----------------------------------------------------------------------------*\ +| Cluster Switch | 0x003B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NumberOfPositions | 0x0000 | +| * CurrentPosition | 0x0001 | +| * MultiPressMax | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SwitchLatched | 0x0000 | +| * InitialPress | 0x0001 | +| * LongPress | 0x0002 | +| * ShortRelease | 0x0003 | +| * LongRelease | 0x0004 | +| * MultiPressOngoing | 0x0005 | +| * MultiPressComplete | 0x0006 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute SoftwareVersion + * Attribute NumberOfPositions */ -class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { +class ReadSwitchNumberOfPositions : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSoftwareVersion() - : ReadAttribute("software-version") + ReadSwitchNumberOfPositions() + : ReadAttribute("number-of-positions") { } - ~ReadBridgedDeviceBasicInformationSoftwareVersion() + ~ReadSwitchNumberOfPositions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); + LogNSError("Switch NumberOfPositions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40899,25 +40017,25 @@ class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { +class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() - : SubscribeAttribute("software-version") + SubscribeAttributeSwitchNumberOfPositions() + : SubscribeAttribute("number-of-positions") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() + ~SubscribeAttributeSwitchNumberOfPositions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40928,10 +40046,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionWithParams:params + [cluster subscribeAttributeNumberOfPositionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40945,34 +40063,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su }; /* - * Attribute SoftwareVersionString + * Attribute CurrentPosition */ -class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { +class ReadSwitchCurrentPosition : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSoftwareVersionString() - : ReadAttribute("software-version-string") + ReadSwitchCurrentPosition() + : ReadAttribute("current-position") { } - ~ReadBridgedDeviceBasicInformationSoftwareVersionString() + ~ReadSwitchCurrentPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); + LogNSError("Switch CurrentPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40981,25 +40099,25 @@ class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttrib } }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { +class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() - : SubscribeAttribute("software-version-string") + SubscribeAttributeSwitchCurrentPosition() + : SubscribeAttribute("current-position") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() + ~SubscribeAttributeSwitchCurrentPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41010,10 +40128,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + [cluster subscribeAttributeCurrentPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41027,34 +40145,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub }; /* - * Attribute ManufacturingDate + * Attribute MultiPressMax */ -class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { +class ReadSwitchMultiPressMax : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationManufacturingDate() - : ReadAttribute("manufacturing-date") + ReadSwitchMultiPressMax() + : ReadAttribute("multi-press-max") { } - ~ReadBridgedDeviceBasicInformationManufacturingDate() + ~ReadSwitchMultiPressMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); + LogNSError("Switch MultiPressMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41063,25 +40181,25 @@ class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute } }; -class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { +class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() - : SubscribeAttribute("manufacturing-date") + SubscribeAttributeSwitchMultiPressMax() + : SubscribeAttribute("multi-press-max") { } - ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() + ~SubscribeAttributeSwitchMultiPressMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41092,10 +40210,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeManufacturingDateWithParams:params + [cluster subscribeAttributeMultiPressMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41109,34 +40227,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public }; /* - * Attribute PartNumber + * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { +class ReadSwitchGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationPartNumber() - : ReadAttribute("part-number") + ReadSwitchGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationPartNumber() + ~ReadSwitchGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); + LogNSError("Switch GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41145,25 +40263,25 @@ class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { +class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationPartNumber() - : SubscribeAttribute("part-number") + SubscribeAttributeSwitchGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() + ~SubscribeAttributeSwitchGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41174,10 +40292,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartNumberWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41191,34 +40309,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri }; /* - * Attribute ProductURL + * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { +class ReadSwitchAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductURL() - : ReadAttribute("product-url") + ReadSwitchAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationProductURL() + ~ReadSwitchAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); + LogNSError("Switch AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41227,25 +40345,25 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { +class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductURL() - : SubscribeAttribute("product-url") + SubscribeAttributeSwitchAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() + ~SubscribeAttributeSwitchAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41256,10 +40374,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductURLWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41272,35 +40390,37 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ProductLabel + * Attribute EventList */ -class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { +class ReadSwitchEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductLabel() - : ReadAttribute("product-label") + ReadSwitchEventList() + : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationProductLabel() + ~ReadSwitchEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); + LogNSError("Switch EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41309,25 +40429,25 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { +class SubscribeAttributeSwitchEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductLabel() - : SubscribeAttribute("product-label") + SubscribeAttributeSwitchEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() + ~SubscribeAttributeSwitchEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41338,10 +40458,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductLabelWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41354,35 +40474,37 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SerialNumber + * Attribute AttributeList */ -class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { +class ReadSwitchAttributeList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSerialNumber() - : ReadAttribute("serial-number") + ReadSwitchAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBridgedDeviceBasicInformationSerialNumber() + ~ReadSwitchAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); + LogNSError("Switch AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41391,25 +40513,25 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { +class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() - : SubscribeAttribute("serial-number") + SubscribeAttributeSwitchAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() + ~SubscribeAttributeSwitchAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41420,10 +40542,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSerialNumberWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41437,34 +40559,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc }; /* - * Attribute Reachable + * Attribute FeatureMap */ -class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { +class ReadSwitchFeatureMap : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationReachable() - : ReadAttribute("reachable") + ReadSwitchFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBridgedDeviceBasicInformationReachable() + ~ReadSwitchFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); + LogNSError("Switch FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41473,25 +40595,25 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { +class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationReachable() - : SubscribeAttribute("reachable") + SubscribeAttributeSwitchFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBridgedDeviceBasicInformationReachable() + ~SubscribeAttributeSwitchFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41502,10 +40624,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReachableWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + NSLog(@"Switch.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41519,34 +40641,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib }; /* - * Attribute UniqueID + * Attribute ClusterRevision */ -class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { +class ReadSwitchClusterRevision : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationUniqueID() - : ReadAttribute("unique-id") + ReadSwitchClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBridgedDeviceBasicInformationUniqueID() + ~ReadSwitchClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); + LogNSError("Switch ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41555,25 +40677,25 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { +class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationUniqueID() - : SubscribeAttribute("unique-id") + SubscribeAttributeSwitchClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() + ~SubscribeAttributeSwitchClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41584,10 +40706,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUniqueIDWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41600,117 +40722,203 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe } }; +/*----------------------------------------------------------------------------*\ +| Cluster AdministratorCommissioning | 0x003C | +|------------------------------------------------------------------------------| +| Commands: | | +| * OpenCommissioningWindow | 0x00 | +| * OpenBasicCommissioningWindow | 0x01 | +| * RevokeCommissioning | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowStatus | 0x0000 | +| * AdminFabricIndex | 0x0001 | +| * AdminVendorId | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ProductAppearance + * Command OpenCommissioningWindow */ -class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { +class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationProductAppearance() - : ReadAttribute("product-appearance") - { - } - - ~ReadBridgedDeviceBasicInformationProductAppearance() + AdministratorCommissioningOpenCommissioningWindow() + : ClusterCommand("open-commissioning-window") { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); + AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); + AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); + AddArgument("Salt", &mRequest.salt); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductAppearanceWithCompletion:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() length:mRequest.PAKEPasscodeVerifier.size()]; + params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; + params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; + params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; }; -class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { +/* + * Command OpenBasicCommissioningWindow + */ +class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { public: - SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() - : SubscribeAttribute("product-appearance") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + AdministratorCommissioningOpenBasicCommissioningWindow() + : ClusterCommand("open-basic-commissioning-window") { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openBasicCommissioningWindowWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeProductAppearanceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command RevokeCommissioning */ -class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationGeneratedCommandList() - : ReadAttribute("generated-command-list") + AdministratorCommissioningRevokeCommissioning() + : ClusterCommand("revoke-commissioning") { + ClusterCommand::AddArguments(); } - ~ReadBridgedDeviceBasicInformationGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster revokeCommissioningWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute WindowStatus + */ +class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +public: + ReadAdministratorCommissioningWindowStatus() + : ReadAttribute("window-status") + { + } + + ~ReadAdministratorCommissioningWindowStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); + LogNSError("AdministratorCommissioning WindowStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41719,25 +40927,25 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeAdministratorCommissioningWindowStatus() + : SubscribeAttribute("window-status") { } - ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + ~SubscribeAttributeAdministratorCommissioningWindowStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41748,10 +40956,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWindowStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41765,34 +40973,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ }; /* - * Attribute AcceptedCommandList + * Attribute AdminFabricIndex */ -class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { +class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadAdministratorCommissioningAdminFabricIndex() + : ReadAttribute("admin-fabric-index") { } - ~ReadBridgedDeviceBasicInformationAcceptedCommandList() + ~ReadAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); + LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41801,25 +41009,25 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + : SubscribeAttribute("admin-fabric-index") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41830,10 +41038,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAdminFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41846,37 +41054,35 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AdminVendorId */ -class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { +class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationEventList() - : ReadAttribute("event-list") + ReadAdministratorCommissioningAdminVendorId() + : ReadAttribute("admin-vendor-id") { } - ~ReadBridgedDeviceBasicInformationEventList() + ~ReadAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation EventList read Error", error); + LogNSError("AdministratorCommissioning AdminVendorId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41885,25 +41091,25 @@ class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeAdministratorCommissioningAdminVendorId() + : SubscribeAttribute("admin-vendor-id") { } - ~SubscribeAttributeBridgedDeviceBasicInformationEventList() + ~SubscribeAttributeAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41914,10 +41120,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAdminVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41930,37 +41136,35 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { +class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAttributeList() - : ReadAttribute("attribute-list") + ReadAdministratorCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationAttributeList() + ~ReadAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); + LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41969,25 +41173,25 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() + ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41998,10 +41202,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42015,34 +41219,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { +class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationFeatureMap() - : ReadAttribute("feature-map") + ReadAdministratorCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationFeatureMap() + ~ReadAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); + LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42051,25 +41255,25 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() + ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42080,10 +41284,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42096,35 +41300,37 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { +class ReadAdministratorCommissioningEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationClusterRevision() - : ReadAttribute("cluster-revision") + ReadAdministratorCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationClusterRevision() + ~ReadAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); + LogNSError("AdministratorCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42133,25 +41339,25 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAdministratorCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() + ~SubscribeAttributeAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42162,10 +41368,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42178,61 +41384,37 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su } }; -/*----------------------------------------------------------------------------*\ -| Cluster Switch | 0x003B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NumberOfPositions | 0x0000 | -| * CurrentPosition | 0x0001 | -| * MultiPressMax | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SwitchLatched | 0x0000 | -| * InitialPress | 0x0001 | -| * LongPress | 0x0002 | -| * ShortRelease | 0x0003 | -| * LongRelease | 0x0004 | -| * MultiPressOngoing | 0x0005 | -| * MultiPressComplete | 0x0006 | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfPositions + * Attribute AttributeList */ -class ReadSwitchNumberOfPositions : public ReadAttribute { +class ReadAdministratorCommissioningAttributeList : public ReadAttribute { public: - ReadSwitchNumberOfPositions() - : ReadAttribute("number-of-positions") + ReadAdministratorCommissioningAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSwitchNumberOfPositions() + ~ReadAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch NumberOfPositions read Error", error); + LogNSError("AdministratorCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42241,25 +41423,25 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { } }; -class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSwitchNumberOfPositions() - : SubscribeAttribute("number-of-positions") + SubscribeAttributeAdministratorCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSwitchNumberOfPositions() + ~SubscribeAttributeAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42270,10 +41452,10 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPositionsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42287,34 +41469,34 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { }; /* - * Attribute CurrentPosition + * Attribute FeatureMap */ -class ReadSwitchCurrentPosition : public ReadAttribute { +class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { public: - ReadSwitchCurrentPosition() - : ReadAttribute("current-position") + ReadAdministratorCommissioningFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSwitchCurrentPosition() + ~ReadAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch CurrentPosition read Error", error); + LogNSError("AdministratorCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42323,25 +41505,25 @@ class ReadSwitchCurrentPosition : public ReadAttribute { } }; -class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSwitchCurrentPosition() - : SubscribeAttribute("current-position") + SubscribeAttributeAdministratorCommissioningFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSwitchCurrentPosition() + ~SubscribeAttributeAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::CurrentPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42352,10 +41534,10 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42369,34 +41551,34 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { }; /* - * Attribute MultiPressMax + * Attribute ClusterRevision */ -class ReadSwitchMultiPressMax : public ReadAttribute { +class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { public: - ReadSwitchMultiPressMax() - : ReadAttribute("multi-press-max") + ReadAdministratorCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSwitchMultiPressMax() + ~ReadAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch MultiPressMax read Error", error); + LogNSError("AdministratorCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42405,25 +41587,25 @@ class ReadSwitchMultiPressMax : public ReadAttribute { } }; -class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSwitchMultiPressMax() - : SubscribeAttribute("multi-press-max") + SubscribeAttributeAdministratorCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSwitchMultiPressMax() + ~SubscribeAttributeAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::MultiPressMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42434,10 +41616,10 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMultiPressMaxWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42450,117 +41632,511 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster OperationalCredentials | 0x003E | +|------------------------------------------------------------------------------| +| Commands: | | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Command AttestationRequest */ -class ReadSwitchGeneratedCommandList : public ReadAttribute { +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - ReadSwitchGeneratedCommandList() - : ReadAttribute("generated-command-list") + OperationalCredentialsAttestationRequest() + : ClusterCommand("attestation-request") { + AddArgument("AttestationNonce", &mRequest.attestationNonce); + ClusterCommand::AddArguments(); } - ~ReadSwitchGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster attestationRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; +}; + +/* + * Command CertificateChainRequest + */ +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { +public: + OperationalCredentialsCertificateChainRequest() + : ClusterCommand("certificate-chain-request") { + AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Switch GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster certificateChainRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; -class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { +/* + * Command CSRRequest + */ +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - SubscribeAttributeSwitchGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + OperationalCredentialsCSRRequest() + : ClusterCommand("csrrequest") { + AddArgument("CSRNonce", &mRequest.CSRNonce); + AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeSwitchGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; + if (mRequest.isForUpdateNOC.HasValue()) { + params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; + } else { + params.isForUpdateNOC = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster CSRRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; +}; + +/* + * Command AddNOC + */ +class OperationalCredentialsAddNOC : public ClusterCommand { +public: + OperationalCredentialsAddNOC() + : ClusterCommand("add-noc") { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + AddArgument("IPKValue", &mRequest.IPKValue); + AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); + AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; + params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; + params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; +}; + +/* + * Command UpdateNOC + */ +class OperationalCredentialsUpdateNOC : public ClusterCommand { +public: + OperationalCredentialsUpdateNOC() + : ClusterCommand("update-noc") + { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateNOCWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; +}; + +/* + * Command UpdateFabricLabel + */ +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { +public: + OperationalCredentialsUpdateFabricLabel() + : ClusterCommand("update-fabric-label") + { + AddArgument("Label", &mRequest.label); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.label = [[NSString alloc] initWithBytes:mRequest.label.data() length:mRequest.label.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateFabricLabelWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Command RemoveFabric */ -class ReadSwitchAcceptedCommandList : public ReadAttribute { +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - ReadSwitchAcceptedCommandList() - : ReadAttribute("accepted-command-list") + OperationalCredentialsRemoveFabric() + : ClusterCommand("remove-fabric") { + AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); + ClusterCommand::AddArguments(); } - ~ReadSwitchAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeFabricWithParams:params completion: + ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; +}; + +/* + * Command AddTrustedRootCertificate + */ +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +public: + OperationalCredentialsAddTrustedRootCertificate() + : ClusterCommand("add-trusted-root-certificate") { + AddArgument("RootCACertificate", &mRequest.rootCACertificate); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() length:mRequest.rootCACertificate.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addTrustedRootCertificateWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; +}; + +/* + * Attribute NOCs + */ +class ReadOperationalCredentialsNOCs : public ReadAttribute { +public: + ReadOperationalCredentialsNOCs() + : ReadAttribute("nocs") + { + } + + ~ReadOperationalCredentialsNOCs() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeNOCsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials NOCs read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42569,25 +42145,25 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { public: - SubscribeAttributeSwitchAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalCredentialsNOCs() + : SubscribeAttribute("nocs") { } - ~SubscribeAttributeSwitchAcceptedCommandList() + ~SubscribeAttributeOperationalCredentialsNOCs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42598,10 +42174,10 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeNOCsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42614,37 +42190,39 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute Fabrics */ -class ReadSwitchEventList : public ReadAttribute { +class ReadOperationalCredentialsFabrics : public ReadAttribute { public: - ReadSwitchEventList() - : ReadAttribute("event-list") + ReadOperationalCredentialsFabrics() + : ReadAttribute("fabrics") { } - ~ReadSwitchEventList() + ~ReadOperationalCredentialsFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch EventList read Error", error); + LogNSError("OperationalCredentials Fabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42653,25 +42231,25 @@ class ReadSwitchEventList : public ReadAttribute { } }; -class SubscribeAttributeSwitchEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { public: - SubscribeAttributeSwitchEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOperationalCredentialsFabrics() + : SubscribeAttribute("fabrics") { } - ~SubscribeAttributeSwitchEventList() + ~SubscribeAttributeOperationalCredentialsFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42682,10 +42260,10 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42698,201 +42276,35 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute SupportedFabrics */ -class ReadSwitchAttributeList : public ReadAttribute { +class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { public: - ReadSwitchAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadSwitchAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Switch AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeSwitchAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeSwitchAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadSwitchFeatureMap : public ReadAttribute { -public: - ReadSwitchFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadSwitchFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Switch FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeSwitchFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeSwitchFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadSwitchClusterRevision : public ReadAttribute { -public: - ReadSwitchClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalCredentialsSupportedFabrics() + : ReadAttribute("supported-fabrics") { } - ~ReadSwitchClusterRevision() + ~ReadOperationalCredentialsSupportedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Switch ClusterRevision read Error", error); + LogNSError("OperationalCredentials SupportedFabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42901,25 +42313,25 @@ class ReadSwitchClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { public: - SubscribeAttributeSwitchClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalCredentialsSupportedFabrics() + : SubscribeAttribute("supported-fabrics") { } - ~SubscribeAttributeSwitchClusterRevision() + ~SubscribeAttributeOperationalCredentialsSupportedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42930,10 +42342,10 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeSupportedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42946,203 +42358,35 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster AdministratorCommissioning | 0x003C | -|------------------------------------------------------------------------------| -| Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command OpenCommissioningWindow - */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { -public: - AdministratorCommissioningOpenCommissioningWindow() - : ClusterCommand("open-commissioning-window") - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); - AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); - AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); - AddArgument("Salt", &mRequest.salt); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; - params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() length:mRequest.PAKEPasscodeVerifier.size()]; - params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; - params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; - params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster openCommissioningWindowWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; -}; - -/* - * Command OpenBasicCommissioningWindow - */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { -public: - AdministratorCommissioningOpenBasicCommissioningWindow() - : ClusterCommand("open-basic-commissioning-window") - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster openBasicCommissioningWindowWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; -}; - -/* - * Command RevokeCommissioning - */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { -public: - AdministratorCommissioningRevokeCommissioning() - : ClusterCommand("revoke-commissioning") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster revokeCommissioningWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute WindowStatus + * Attribute CommissionedFabrics */ -class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { public: - ReadAdministratorCommissioningWindowStatus() - : ReadAttribute("window-status") + ReadOperationalCredentialsCommissionedFabrics() + : ReadAttribute("commissioned-fabrics") { } - ~ReadAdministratorCommissioningWindowStatus() + ~ReadOperationalCredentialsCommissionedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning WindowStatus read Error", error); + LogNSError("OperationalCredentials CommissionedFabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43151,25 +42395,25 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningWindowStatus() - : SubscribeAttribute("window-status") + SubscribeAttributeOperationalCredentialsCommissionedFabrics() + : SubscribeAttribute("commissioned-fabrics") { } - ~SubscribeAttributeAdministratorCommissioningWindowStatus() + ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::WindowStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43180,10 +42424,10 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindowStatusWithParams:params + [cluster subscribeAttributeCommissionedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43197,34 +42441,34 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib }; /* - * Attribute AdminFabricIndex + * Attribute TrustedRootCertificates */ -class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { +class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { public: - ReadAdministratorCommissioningAdminFabricIndex() - : ReadAttribute("admin-fabric-index") + ReadOperationalCredentialsTrustedRootCertificates() + : ReadAttribute("trusted-root-certificates") { } - ~ReadAdministratorCommissioningAdminFabricIndex() + ~ReadOperationalCredentialsTrustedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); + LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43233,25 +42477,25 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminFabricIndex() - : SubscribeAttribute("admin-fabric-index") + SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + : SubscribeAttribute("trusted-root-certificates") { } - ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43262,10 +42506,10 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminFabricIndexWithParams:params + [cluster subscribeAttributeTrustedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43279,34 +42523,34 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs }; /* - * Attribute AdminVendorId + * Attribute CurrentFabricIndex */ -class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { +class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { public: - ReadAdministratorCommissioningAdminVendorId() - : ReadAttribute("admin-vendor-id") + ReadOperationalCredentialsCurrentFabricIndex() + : ReadAttribute("current-fabric-index") { } - ~ReadAdministratorCommissioningAdminVendorId() + ~ReadOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AdminVendorId read Error", error); + LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43315,25 +42559,25 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminVendorId() - : SubscribeAttribute("admin-vendor-id") + SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + : SubscribeAttribute("current-fabric-index") { } - ~SubscribeAttributeAdministratorCommissioningAdminVendorId() + ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AdminVendorId::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43344,10 +42588,10 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminVendorIdWithParams:params + [cluster subscribeAttributeCurrentFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43363,32 +42607,32 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri /* * Attribute GeneratedCommandList */ -class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { +class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningGeneratedCommandList() + ReadOperationalCredentialsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAdministratorCommissioningGeneratedCommandList() + ~ReadOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + LogNSError("OperationalCredentials GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43397,25 +42641,25 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + SubscribeAttributeOperationalCredentialsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43429,7 +42673,7 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43445,32 +42689,32 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { +class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningAcceptedCommandList() + ReadOperationalCredentialsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAdministratorCommissioningAcceptedCommandList() + ~ReadOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43479,25 +42723,25 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + SubscribeAttributeOperationalCredentialsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43511,7 +42755,7 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43529,32 +42773,32 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S /* * Attribute EventList */ -class ReadAdministratorCommissioningEventList : public ReadAttribute { +class ReadOperationalCredentialsEventList : public ReadAttribute { public: - ReadAdministratorCommissioningEventList() + ReadOperationalCredentialsEventList() : ReadAttribute("event-list") { } - ~ReadAdministratorCommissioningEventList() + ~ReadOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning EventList read Error", error); + LogNSError("OperationalCredentials EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43563,25 +42807,25 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningEventList() + SubscribeAttributeOperationalCredentialsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAdministratorCommissioningEventList() + ~SubscribeAttributeOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43595,7 +42839,7 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43613,32 +42857,32 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadAdministratorCommissioningAttributeList : public ReadAttribute { +class ReadOperationalCredentialsAttributeList : public ReadAttribute { public: - ReadAdministratorCommissioningAttributeList() + ReadOperationalCredentialsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAdministratorCommissioningAttributeList() + ~ReadOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AttributeList read Error", error); + LogNSError("OperationalCredentials AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43647,25 +42891,25 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAttributeList() + SubscribeAttributeOperationalCredentialsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAdministratorCommissioningAttributeList() + ~SubscribeAttributeOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43679,7 +42923,7 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43695,32 +42939,32 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { +class ReadOperationalCredentialsFeatureMap : public ReadAttribute { public: - ReadAdministratorCommissioningFeatureMap() + ReadOperationalCredentialsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAdministratorCommissioningFeatureMap() + ~ReadOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning FeatureMap read Error", error); + LogNSError("OperationalCredentials FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43729,25 +42973,25 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningFeatureMap() + SubscribeAttributeOperationalCredentialsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAdministratorCommissioningFeatureMap() + ~SubscribeAttributeOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43761,7 +43005,7 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43777,32 +43021,32 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { +class ReadOperationalCredentialsClusterRevision : public ReadAttribute { public: - ReadAdministratorCommissioningClusterRevision() + ReadOperationalCredentialsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAdministratorCommissioningClusterRevision() + ~ReadOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + LogNSError("OperationalCredentials ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43811,25 +43055,25 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningClusterRevision() + SubscribeAttributeOperationalCredentialsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAdministratorCommissioningClusterRevision() + ~SubscribeAttributeOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AdministratorCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AdministratorCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43843,7 +43087,7 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43857,25 +43101,19 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster GroupKeyManagement | 0x003F | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -43887,156 +43125,125 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc \*----------------------------------------------------------------------------*/ /* - * Command AttestationRequest + * Command KeySetWrite */ -class OperationalCredentialsAttestationRequest : public ClusterCommand { +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - OperationalCredentialsAttestationRequest() - : ClusterCommand("attestation-request") + GroupKeyManagementKeySetWrite() + : ClusterCommand("key-set-write") + , mComplex_GroupKeySet(&mRequest.groupKeySet) { - AddArgument("AttestationNonce", &mRequest.attestationNonce); + AddArgument("GroupKeySet", &mComplex_GroupKeySet); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster attestationRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; + params.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; + if (mRequest.groupKeySet.epochKey0.IsNull()) { + params.groupKeySet.epochKey0 = nil; + } else { + params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() length:mRequest.groupKeySet.epochKey0.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime0.IsNull()) { + params.groupKeySet.epochStartTime0 = nil; + } else { + params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; + } + if (mRequest.groupKeySet.epochKey1.IsNull()) { + params.groupKeySet.epochKey1 = nil; + } else { + params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() length:mRequest.groupKeySet.epochKey1.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime1.IsNull()) { + params.groupKeySet.epochStartTime1 = nil; + } else { + params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; + } + if (mRequest.groupKeySet.epochKey2.IsNull()) { + params.groupKeySet.epochKey2 = nil; + } else { + params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() length:mRequest.groupKeySet.epochKey2.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime2.IsNull()) { + params.groupKeySet.epochStartTime2 = nil; + } else { + params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; -}; - -/* - * Command CertificateChainRequest - */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand { -public: - OperationalCredentialsCertificateChainRequest() - : ClusterCommand("certificate-chain-request") - { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster certificateChainRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetWriteWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; /* - * Command CSRRequest + * Command KeySetRead */ -class OperationalCredentialsCSRRequest : public ClusterCommand { +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - OperationalCredentialsCSRRequest() - : ClusterCommand("csrrequest") + GroupKeyManagementKeySetRead() + : ClusterCommand("key-set-read") { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; - if (mRequest.isForUpdateNOC.HasValue()) { - params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; - } else { - params.isForUpdateNOC = nil; - } + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster CSRRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, NSError * _Nullable error) { + [cluster keySetReadWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -44048,319 +43255,280 @@ class OperationalCredentialsCSRRequest : public ClusterCommand { } private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command AddNOC + * Command KeySetRemove */ -class OperationalCredentialsAddNOC : public ClusterCommand { +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - OperationalCredentialsAddNOC() - : ClusterCommand("add-noc") + GroupKeyManagementKeySetRemove() + : ClusterCommand("key-set-remove") { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - AddArgument("IPKValue", &mRequest.IPKValue); - AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); - AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; - } - params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; - params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; - params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetRemoveWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; }; /* - * Command UpdateNOC + * Command KeySetReadAllIndices */ -class OperationalCredentialsUpdateNOC : public ClusterCommand { +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - OperationalCredentialsUpdateNOC() - : ClusterCommand("update-noc") + GroupKeyManagementKeySetReadAllIndices() + : ClusterCommand("key-set-read-all-indices") { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; - } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster updateNOCWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster keySetReadAllIndicesWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; /* - * Command UpdateFabricLabel + * Attribute GroupKeyMap */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { +class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { public: - OperationalCredentialsUpdateFabricLabel() - : ClusterCommand("update-fabric-label") + ReadGroupKeyManagementGroupKeyMap() + : ReadAttribute("group-key-map") + { + } + + ~ReadGroupKeyManagementGroupKeyMap() { - AddArgument("Label", &mRequest.label); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.label = [[NSString alloc] initWithBytes:mRequest.label.data() length:mRequest.label.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updateFabricLabelWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; -/* - * Command RemoveFabric - */ -class OperationalCredentialsRemoveFabric : public ClusterCommand { +class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { public: - OperationalCredentialsRemoveFabric() - : ClusterCommand("remove-fabric") + WriteGroupKeyManagementGroupKeyMap() + : WriteAttribute("group-key-map") + , mComplex(&mValue) { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "group-key-map"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~WriteGroupKeyManagementGroupKeyMap() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeFabricWithParams:params completion: - ^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; } + + [cluster writeAttributeGroupKeyMapWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -/* - * Command AddTrustedRootCertificate - */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { public: - OperationalCredentialsAddTrustedRootCertificate() - : ClusterCommand("add-trusted-root-certificate") + SubscribeAttributeGroupKeyManagementGroupKeyMap() + : SubscribeAttribute("group-key-map") { - AddArgument("RootCACertificate", &mRequest.rootCACertificate); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeGroupKeyManagementGroupKeyMap() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() length:mRequest.rootCACertificate.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addTrustedRootCertificateWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGroupKeyMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; /* - * Attribute NOCs + * Attribute GroupTable */ -class ReadOperationalCredentialsNOCs : public ReadAttribute { +class ReadGroupKeyManagementGroupTable : public ReadAttribute { public: - ReadOperationalCredentialsNOCs() - : ReadAttribute("nocs") + ReadGroupKeyManagementGroupTable() + : ReadAttribute("group-table") { } - ~ReadOperationalCredentialsNOCs() + ~ReadGroupKeyManagementGroupTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRReadParams alloc] init]; if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } - [cluster readAttributeNOCsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials NOCs read Error", error); + LogNSError("GroupKeyManagement GroupTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44369,25 +43537,25 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsNOCs() - : SubscribeAttribute("nocs") + SubscribeAttributeGroupKeyManagementGroupTable() + : SubscribeAttribute("group-table") { } - ~SubscribeAttributeOperationalCredentialsNOCs() + ~SubscribeAttributeGroupKeyManagementGroupTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44398,10 +43566,10 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNOCsWithParams:params + [cluster subscribeAttributeGroupTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44415,38 +43583,34 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { }; /* - * Attribute Fabrics + * Attribute MaxGroupsPerFabric */ -class ReadOperationalCredentialsFabrics : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { public: - ReadOperationalCredentialsFabrics() - : ReadAttribute("fabrics") + ReadGroupKeyManagementMaxGroupsPerFabric() + : ReadAttribute("max-groups-per-fabric") { } - ~ReadOperationalCredentialsFabrics() + ~ReadGroupKeyManagementMaxGroupsPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeFabricsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials Fabrics read Error", error); + LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44455,25 +43619,25 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFabrics() - : SubscribeAttribute("fabrics") + SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + : SubscribeAttribute("max-groups-per-fabric") { } - ~SubscribeAttributeOperationalCredentialsFabrics() + ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::Fabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44484,10 +43648,10 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFabricsWithParams:params + [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44501,34 +43665,34 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut }; /* - * Attribute SupportedFabrics + * Attribute MaxGroupKeysPerFabric */ -class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { public: - ReadOperationalCredentialsSupportedFabrics() - : ReadAttribute("supported-fabrics") + ReadGroupKeyManagementMaxGroupKeysPerFabric() + : ReadAttribute("max-group-keys-per-fabric") { } - ~ReadOperationalCredentialsSupportedFabrics() + ~ReadGroupKeyManagementMaxGroupKeysPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials SupportedFabrics read Error", error); + LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44537,25 +43701,25 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsSupportedFabrics() - : SubscribeAttribute("supported-fabrics") + SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + : SubscribeAttribute("max-group-keys-per-fabric") { } - ~SubscribeAttributeOperationalCredentialsSupportedFabrics() + ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::SupportedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44566,10 +43730,10 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedFabricsWithParams:params + [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44583,34 +43747,34 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib }; /* - * Attribute CommissionedFabrics + * Attribute GeneratedCommandList */ -class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { +class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsCommissionedFabrics() - : ReadAttribute("commissioned-fabrics") + ReadGroupKeyManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalCredentialsCommissionedFabrics() + ~ReadGroupKeyManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44619,25 +43783,25 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCommissionedFabrics() - : SubscribeAttribute("commissioned-fabrics") + SubscribeAttributeGroupKeyManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() + ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CommissionedFabrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44648,10 +43812,10 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCommissionedFabricsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44665,34 +43829,34 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc }; /* - * Attribute TrustedRootCertificates + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { +class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsTrustedRootCertificates() - : ReadAttribute("trusted-root-certificates") + ReadGroupKeyManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsTrustedRootCertificates() + ~ReadGroupKeyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); + LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44701,25 +43865,25 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsTrustedRootCertificates() - : SubscribeAttribute("trusted-root-certificates") + SubscribeAttributeGroupKeyManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::TrustedRootCertificates::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44730,10 +43894,10 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTrustedRootCertificatesWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44746,35 +43910,37 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentFabricIndex + * Attribute EventList */ -class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { +class ReadGroupKeyManagementEventList : public ReadAttribute { public: - ReadOperationalCredentialsCurrentFabricIndex() - : ReadAttribute("current-fabric-index") + ReadGroupKeyManagementEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsCurrentFabricIndex() + ~ReadGroupKeyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); + LogNSError("GroupKeyManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44783,25 +43949,25 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCurrentFabricIndex() - : SubscribeAttribute("current-fabric-index") + SubscribeAttributeGroupKeyManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + ~SubscribeAttributeGroupKeyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::CurrentFabricIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44812,10 +43978,10 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentFabricIndexWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44828,35 +43994,37 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { +class ReadGroupKeyManagementAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadGroupKeyManagementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsGeneratedCommandList() + ~ReadGroupKeyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + LogNSError("GroupKeyManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44865,25 +44033,25 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeGroupKeyManagementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() + ~SubscribeAttributeGroupKeyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44894,10 +44062,10 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44911,34 +44079,34 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { +class ReadGroupKeyManagementFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadGroupKeyManagementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsAcceptedCommandList() + ~ReadGroupKeyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + LogNSError("GroupKeyManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44947,25 +44115,25 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeGroupKeyManagementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() + ~SubscribeAttributeGroupKeyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44976,10 +44144,10 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44992,37 +44160,35 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadOperationalCredentialsEventList : public ReadAttribute { +class ReadGroupKeyManagementClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsEventList() - : ReadAttribute("event-list") + ReadGroupKeyManagementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsEventList() + ~ReadGroupKeyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials EventList read Error", error); + LogNSError("GroupKeyManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45031,25 +44197,25 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeGroupKeyManagementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsEventList() + ~SubscribeAttributeGroupKeyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45060,10 +44226,10 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45076,37 +44242,52 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Attribute LabelList */ -class ReadOperationalCredentialsAttributeList : public ReadAttribute { +class ReadFixedLabelLabelList : public ReadAttribute { public: - ReadOperationalCredentialsAttributeList() - : ReadAttribute("attribute-list") + ReadFixedLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadOperationalCredentialsAttributeList() + ~ReadFixedLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AttributeList read Error", error); + LogNSError("FixedLabel LabelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45115,25 +44296,25 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeFixedLabelLabelList() + : SubscribeAttribute("label-list") { } - ~SubscribeAttributeOperationalCredentialsAttributeList() + ~SubscribeAttributeFixedLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45144,10 +44325,10 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45161,34 +44342,34 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadOperationalCredentialsFeatureMap : public ReadAttribute { +class ReadFixedLabelGeneratedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsFeatureMap() - : ReadAttribute("feature-map") + ReadFixedLabelGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalCredentialsFeatureMap() + ~ReadFixedLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials FeatureMap read Error", error); + LogNSError("FixedLabel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45197,25 +44378,25 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeFixedLabelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalCredentialsFeatureMap() + ~SubscribeAttributeFixedLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45226,10 +44407,10 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45243,34 +44424,34 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsClusterRevision : public ReadAttribute { +class ReadFixedLabelAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsClusterRevision() - : ReadAttribute("cluster-revision") + ReadFixedLabelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsClusterRevision() + ~ReadFixedLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials ClusterRevision read Error", error); + LogNSError("FixedLabel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45279,25 +44460,25 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeFixedLabelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsClusterRevision() + ~SubscribeAttributeFixedLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalCredentials::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalCredentials::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45308,10 +44489,10 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45324,294 +44505,121 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | -|------------------------------------------------------------------------------| -| Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command KeySetWrite + * Attribute EventList */ -class GroupKeyManagementKeySetWrite : public ClusterCommand { +class ReadFixedLabelEventList : public ReadAttribute { public: - GroupKeyManagementKeySetWrite() - : ClusterCommand("key-set-write") - , mComplex_GroupKeySet(&mRequest.groupKeySet) - { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadFixedLabelEventList() + : ReadAttribute("event-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; - params.groupKeySet.groupKeySecurityPolicy = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; - if (mRequest.groupKeySet.epochKey0.IsNull()) { - params.groupKeySet.epochKey0 = nil; - } else { - params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() length:mRequest.groupKeySet.epochKey0.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime0.IsNull()) { - params.groupKeySet.epochStartTime0 = nil; - } else { - params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; - } - if (mRequest.groupKeySet.epochKey1.IsNull()) { - params.groupKeySet.epochKey1 = nil; - } else { - params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() length:mRequest.groupKeySet.epochKey1.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime1.IsNull()) { - params.groupKeySet.epochStartTime1 = nil; - } else { - params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; - } - if (mRequest.groupKeySet.epochKey2.IsNull()) { - params.groupKeySet.epochKey2 = nil; - } else { - params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() length:mRequest.groupKeySet.epochKey2.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime2.IsNull()) { - params.groupKeySet.epochStartTime2 = nil; - } else { - params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetWriteWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; -}; - -/* - * Command KeySetRead - */ -class GroupKeyManagementKeySetRead : public ClusterCommand { -public: - GroupKeyManagementKeySetRead() - : ClusterCommand("key-set-read") + ~ReadFixedLabelEventList() { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetReadWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("FixedLabel EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; -/* - * Command KeySetRemove - */ -class GroupKeyManagementKeySetRemove : public ClusterCommand { +class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { public: - GroupKeyManagementKeySetRemove() - : ClusterCommand("key-set-remove") - { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeFixedLabelEventList() + : SubscribeAttribute("event-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetRemoveWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; -}; - -/* - * Command KeySetReadAllIndices - */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { -public: - GroupKeyManagementKeySetReadAllIndices() - : ClusterCommand("key-set-read-all-indices") + ~SubscribeAttributeFixedLabelEventList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetReadAllIndicesWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute GroupKeyMap + * Attribute AttributeList */ -class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { +class ReadFixedLabelAttributeList : public ReadAttribute { public: - ReadGroupKeyManagementGroupKeyMap() - : ReadAttribute("group-key-map") + ReadFixedLabelAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadGroupKeyManagementGroupKeyMap() + ~ReadFixedLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupKeyMapWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + LogNSError("FixedLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45620,80 +44628,25 @@ class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { } }; -class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { +class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { public: - WriteGroupKeyManagementGroupKeyMap() - : WriteAttribute("group-key-map") - , mComplex(&mValue) + SubscribeAttributeFixedLabelAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("attr-name", "group-key-map"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); } - ~WriteGroupKeyManagementGroupKeyMap() + ~SubscribeAttributeFixedLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } - - [cluster writeAttributeGroupKeyMapWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; -}; - -class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { -public: - SubscribeAttributeGroupKeyManagementGroupKeyMap() - : SubscribeAttribute("group-key-map") - { - } - - ~SubscribeAttributeGroupKeyManagementGroupKeyMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45704,10 +44657,10 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupKeyMapWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45721,38 +44674,34 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut }; /* - * Attribute GroupTable + * Attribute FeatureMap */ -class ReadGroupKeyManagementGroupTable : public ReadAttribute { +class ReadFixedLabelFeatureMap : public ReadAttribute { public: - ReadGroupKeyManagementGroupTable() - : ReadAttribute("group-table") + ReadFixedLabelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadGroupKeyManagementGroupTable() + ~ReadFixedLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupTableWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GroupTable read Error", error); + LogNSError("FixedLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45761,25 +44710,25 @@ class ReadGroupKeyManagementGroupTable : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { +class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGroupTable() - : SubscribeAttribute("group-table") + SubscribeAttributeFixedLabelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGroupKeyManagementGroupTable() + ~SubscribeAttributeFixedLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45790,10 +44739,10 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupTableWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45807,34 +44756,34 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute }; /* - * Attribute MaxGroupsPerFabric + * Attribute ClusterRevision */ -class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { +class ReadFixedLabelClusterRevision : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupsPerFabric() - : ReadAttribute("max-groups-per-fabric") + ReadFixedLabelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadGroupKeyManagementMaxGroupsPerFabric() + ~ReadFixedLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); + LogNSError("FixedLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45843,25 +44792,25 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { +class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() - : SubscribeAttribute("max-groups-per-fabric") + SubscribeAttributeFixedLabelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + ~SubscribeAttributeFixedLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45872,10 +44821,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45888,35 +44837,52 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } }; +/*----------------------------------------------------------------------------*\ +| Cluster UserLabel | 0x0041 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MaxGroupKeysPerFabric + * Attribute LabelList */ -class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { +class ReadUserLabelLabelList : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupKeysPerFabric() - : ReadAttribute("max-group-keys-per-fabric") + ReadUserLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadGroupKeyManagementMaxGroupKeysPerFabric() + ~ReadUserLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + LogNSError("UserLabel LabelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45925,25 +44891,79 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +class WriteUserLabelLabelList : public WriteAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() - : SubscribeAttribute("max-group-keys-per-fabric") + WriteUserLabelLabelList() + : WriteAttribute("label-list") + , mComplex(&mValue) { + AddArgument("attr-name", "label-list"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + ~WriteUserLabelLabelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeLabelListWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UserLabel LabelList write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; +}; + +class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelLabelList() + : SubscribeAttribute("label-list") + { + } + + ~SubscribeAttributeUserLabelLabelList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45954,10 +44974,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45973,32 +44993,32 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri /* * Attribute GeneratedCommandList */ -class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { +class ReadUserLabelGeneratedCommandList : public ReadAttribute { public: - ReadGroupKeyManagementGeneratedCommandList() + ReadUserLabelGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadGroupKeyManagementGeneratedCommandList() + ~ReadUserLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); + LogNSError("UserLabel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46007,25 +45027,25 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGeneratedCommandList() + SubscribeAttributeUserLabelGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() + ~SubscribeAttributeUserLabelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46039,7 +45059,7 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46055,32 +45075,32 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { +class ReadUserLabelAcceptedCommandList : public ReadAttribute { public: - ReadGroupKeyManagementAcceptedCommandList() + ReadUserLabelAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadGroupKeyManagementAcceptedCommandList() + ~ReadUserLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); + LogNSError("UserLabel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46089,25 +45109,25 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAcceptedCommandList() + SubscribeAttributeUserLabelAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() + ~SubscribeAttributeUserLabelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46121,7 +45141,7 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46139,32 +45159,32 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadGroupKeyManagementEventList : public ReadAttribute { +class ReadUserLabelEventList : public ReadAttribute { public: - ReadGroupKeyManagementEventList() + ReadUserLabelEventList() : ReadAttribute("event-list") { } - ~ReadGroupKeyManagementEventList() + ~ReadUserLabelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + NSLog(@"UserLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement EventList read Error", error); + LogNSError("UserLabel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46173,25 +45193,25 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { +class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementEventList() + SubscribeAttributeUserLabelEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeGroupKeyManagementEventList() + ~SubscribeAttributeUserLabelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46205,7 +45225,7 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList response %@", [value description]); + NSLog(@"UserLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46223,32 +45243,32 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadGroupKeyManagementAttributeList : public ReadAttribute { +class ReadUserLabelAttributeList : public ReadAttribute { public: - ReadGroupKeyManagementAttributeList() + ReadUserLabelAttributeList() : ReadAttribute("attribute-list") { } - ~ReadGroupKeyManagementAttributeList() + ~ReadUserLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + NSLog(@"UserLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement AttributeList read Error", error); + LogNSError("UserLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46257,25 +45277,25 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAttributeList() + SubscribeAttributeUserLabelAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeGroupKeyManagementAttributeList() + ~SubscribeAttributeUserLabelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46289,7 +45309,7 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + NSLog(@"UserLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46305,32 +45325,32 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadGroupKeyManagementFeatureMap : public ReadAttribute { +class ReadUserLabelFeatureMap : public ReadAttribute { public: - ReadGroupKeyManagementFeatureMap() + ReadUserLabelFeatureMap() : ReadAttribute("feature-map") { } - ~ReadGroupKeyManagementFeatureMap() + ~ReadUserLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement FeatureMap read Error", error); + LogNSError("UserLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46339,25 +45359,25 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementFeatureMap() + SubscribeAttributeUserLabelFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGroupKeyManagementFeatureMap() + ~SubscribeAttributeUserLabelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46371,7 +45391,7 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + NSLog(@"UserLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46387,32 +45407,32 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadGroupKeyManagementClusterRevision : public ReadAttribute { +class ReadUserLabelClusterRevision : public ReadAttribute { public: - ReadGroupKeyManagementClusterRevision() + ReadUserLabelClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadGroupKeyManagementClusterRevision() + ~ReadUserLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GroupKeyManagement ClusterRevision read Error", error); + LogNSError("UserLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46421,25 +45441,25 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementClusterRevision() + SubscribeAttributeUserLabelClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGroupKeyManagementClusterRevision() + ~SubscribeAttributeUserLabelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GroupKeyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46453,7 +45473,7 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46467,12 +45487,12 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr }; /*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | +| Cluster BooleanState | 0x0045 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * LabelList | 0x0000 | +| * StateValue | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -46481,37 +45501,38 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * StateChange | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Attribute LabelList + * Attribute StateValue */ -class ReadFixedLabelLabelList : public ReadAttribute { +class ReadBooleanStateStateValue : public ReadAttribute { public: - ReadFixedLabelLabelList() - : ReadAttribute("label-list") + ReadBooleanStateStateValue() + : ReadAttribute("state-value") { } - ~ReadFixedLabelLabelList() + ~ReadBooleanStateStateValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel LabelList read Error", error); + LogNSError("BooleanState StateValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46520,25 +45541,25 @@ class ReadFixedLabelLabelList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeBooleanStateStateValue() + : SubscribeAttribute("state-value") { } - ~SubscribeAttributeFixedLabelLabelList() + ~SubscribeAttributeBooleanStateStateValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46549,10 +45570,10 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeStateValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46568,32 +45589,32 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadFixedLabelGeneratedCommandList : public ReadAttribute { +class ReadBooleanStateGeneratedCommandList : public ReadAttribute { public: - ReadFixedLabelGeneratedCommandList() + ReadBooleanStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadFixedLabelGeneratedCommandList() + ~ReadBooleanStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel GeneratedCommandList read Error", error); + LogNSError("BooleanState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46602,25 +45623,25 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelGeneratedCommandList() + SubscribeAttributeBooleanStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFixedLabelGeneratedCommandList() + ~SubscribeAttributeBooleanStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46634,7 +45655,7 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46650,32 +45671,32 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadFixedLabelAcceptedCommandList : public ReadAttribute { +class ReadBooleanStateAcceptedCommandList : public ReadAttribute { public: - ReadFixedLabelAcceptedCommandList() + ReadBooleanStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadFixedLabelAcceptedCommandList() + ~ReadBooleanStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AcceptedCommandList read Error", error); + LogNSError("BooleanState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46684,25 +45705,25 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAcceptedCommandList() + SubscribeAttributeBooleanStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFixedLabelAcceptedCommandList() + ~SubscribeAttributeBooleanStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46716,7 +45737,7 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46734,32 +45755,32 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadFixedLabelEventList : public ReadAttribute { +class ReadBooleanStateEventList : public ReadAttribute { public: - ReadFixedLabelEventList() + ReadBooleanStateEventList() : ReadAttribute("event-list") { } - ~ReadFixedLabelEventList() + ~ReadBooleanStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); + NSLog(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel EventList read Error", error); + LogNSError("BooleanState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46768,25 +45789,25 @@ class ReadFixedLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelEventList() + SubscribeAttributeBooleanStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFixedLabelEventList() + ~SubscribeAttributeBooleanStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46800,7 +45821,7 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); + NSLog(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46818,32 +45839,32 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadFixedLabelAttributeList : public ReadAttribute { +class ReadBooleanStateAttributeList : public ReadAttribute { public: - ReadFixedLabelAttributeList() + ReadBooleanStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadFixedLabelAttributeList() + ~ReadBooleanStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AttributeList read Error", error); + LogNSError("BooleanState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46852,25 +45873,25 @@ class ReadFixedLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAttributeList() + SubscribeAttributeBooleanStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFixedLabelAttributeList() + ~SubscribeAttributeBooleanStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46884,7 +45905,7 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46900,32 +45921,32 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadFixedLabelFeatureMap : public ReadAttribute { +class ReadBooleanStateFeatureMap : public ReadAttribute { public: - ReadFixedLabelFeatureMap() + ReadBooleanStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadFixedLabelFeatureMap() + ~ReadBooleanStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel FeatureMap read Error", error); + LogNSError("BooleanState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46934,25 +45955,25 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelFeatureMap() + SubscribeAttributeBooleanStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFixedLabelFeatureMap() + ~SubscribeAttributeBooleanStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46966,7 +45987,7 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46982,32 +46003,32 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadFixedLabelClusterRevision : public ReadAttribute { +class ReadBooleanStateClusterRevision : public ReadAttribute { public: - ReadFixedLabelClusterRevision() + ReadBooleanStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadFixedLabelClusterRevision() + ~ReadBooleanStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel ClusterRevision read Error", error); + LogNSError("BooleanState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47016,25 +46037,25 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelClusterRevision() + SubscribeAttributeBooleanStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFixedLabelClusterRevision() + ~SubscribeAttributeBooleanStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FixedLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FixedLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47048,7 +46069,7 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47061,13 +46082,26 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | +| Cluster IcdManagement | 0x0046 | |------------------------------------------------------------------------------| | Commands: | | +| * RegisterClient | 0x00 | +| * UnregisterClient | 0x02 | +| * StayActiveRequest | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * LabelList | 0x0000 | +| * IdleModeDuration | 0x0000 | +| * ActiveModeDuration | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * RegisteredClients | 0x0003 | +| * ICDCounter | 0x0004 | +| * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | +| * OperatingMode | 0x0008 | +| * MaximumCheckInBackOff | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -47078,171 +46112,247 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute LabelList + * Command RegisterClient */ -class ReadUserLabelLabelList : public ReadAttribute { +class IcdManagementRegisterClient : public ClusterCommand { public: - ReadUserLabelLabelList() - : ReadAttribute("label-list") - { - } - - ~ReadUserLabelLabelList() + IcdManagementRegisterClient() + : ClusterCommand("register-client") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Key", &mRequest.key); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ClientType", 0, UINT8_MAX, &mRequest.clientType); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("UserLabel LabelList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.verificationKey.HasValue()) { + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; + } else { + params.verificationKey = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.clientType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.clientType)]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster registerClientWithParams:params completion: + ^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; -class WriteUserLabelLabelList : public WriteAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnregisterClient + */ +class IcdManagementUnregisterClient : public ClusterCommand { public: - WriteUserLabelLabelList() - : WriteAttribute("label-list") - , mComplex(&mValue) - { - AddArgument("attr-name", "label-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteUserLabelLabelList() + IcdManagementUnregisterClient() + : ClusterCommand("unregister-client") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - value = array_0; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.verificationKey.HasValue()) { + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; + } else { + params.verificationKey = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unregisterClientWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeLabelListWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; }; -class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StayActiveRequest + */ +class IcdManagementStayActiveRequest : public ClusterCommand { public: - SubscribeAttributeUserLabelLabelList() - : SubscribeAttribute("label-list") - { - } - - ~SubscribeAttributeUserLabelLabelList() + IcdManagementStayActiveRequest() + : ClusterCommand("stay-active-request") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stayActiveRequestWithParams:params completion: + ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeLabelListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute IdleModeDuration */ -class ReadUserLabelGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementIdleModeDuration : public ReadAttribute { public: - ReadUserLabelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadIcdManagementIdleModeDuration() + : ReadAttribute("idle-mode-duration") { } - ~ReadUserLabelGeneratedCommandList() + ~ReadIcdManagementIdleModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeIdleModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel GeneratedCommandList read Error", error); + LogNSError("ICDManagement IdleModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47251,25 +46361,25 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { public: - SubscribeAttributeUserLabelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeIcdManagementIdleModeDuration() + : SubscribeAttribute("idle-mode-duration") { } - ~SubscribeAttributeUserLabelGeneratedCommandList() + ~SubscribeAttributeIcdManagementIdleModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47280,10 +46390,10 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeIdleModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47296,35 +46406,38 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute ActiveModeDuration */ -class ReadUserLabelAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementActiveModeDuration : public ReadAttribute { public: - ReadUserLabelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIcdManagementActiveModeDuration() + : ReadAttribute("active-mode-duration") { } - ~ReadUserLabelAcceptedCommandList() + ~ReadIcdManagementActiveModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel AcceptedCommandList read Error", error); + LogNSError("ICDManagement ActiveModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47333,25 +46446,25 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIcdManagementActiveModeDuration() + : SubscribeAttribute("active-mode-duration") { } - ~SubscribeAttributeUserLabelAcceptedCommandList() + ~SubscribeAttributeIcdManagementActiveModeDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47362,10 +46475,10 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeActiveModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47378,37 +46491,38 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ActiveModeThreshold */ -class ReadUserLabelEventList : public ReadAttribute { +class ReadIcdManagementActiveModeThreshold : public ReadAttribute { public: - ReadUserLabelEventList() - : ReadAttribute("event-list") + ReadIcdManagementActiveModeThreshold() + : ReadAttribute("active-mode-threshold") { } - ~ReadUserLabelEventList() + ~ReadIcdManagementActiveModeThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel EventList read Error", error); + LogNSError("ICDManagement ActiveModeThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47417,25 +46531,25 @@ class ReadUserLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { public: - SubscribeAttributeUserLabelEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeIcdManagementActiveModeThreshold() + : SubscribeAttribute("active-mode-threshold") { } - ~SubscribeAttributeUserLabelEventList() + ~SubscribeAttributeIcdManagementActiveModeThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47446,10 +46560,10 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeActiveModeThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47463,36 +46577,41 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute RegisteredClients */ -class ReadUserLabelAttributeList : public ReadAttribute { +class ReadIcdManagementRegisteredClients : public ReadAttribute { public: - ReadUserLabelAttributeList() - : ReadAttribute("attribute-list") + ReadIcdManagementRegisteredClients() + : ReadAttribute("registered-clients") { } - ~ReadUserLabelAttributeList() + ~ReadIcdManagementRegisteredClients() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel AttributeList read Error", error); + LogNSError("ICDManagement RegisteredClients read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47501,25 +46620,25 @@ class ReadUserLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeIcdManagementRegisteredClients() + : SubscribeAttribute("registered-clients") { } - ~SubscribeAttributeUserLabelAttributeList() + ~SubscribeAttributeIcdManagementRegisteredClients() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47530,10 +46649,10 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeRegisteredClientsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47546,35 +46665,38 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute ICDCounter */ -class ReadUserLabelFeatureMap : public ReadAttribute { +class ReadIcdManagementICDCounter : public ReadAttribute { public: - ReadUserLabelFeatureMap() - : ReadAttribute("feature-map") + ReadIcdManagementICDCounter() + : ReadAttribute("icdcounter") { } - ~ReadUserLabelFeatureMap() + ~ReadIcdManagementICDCounter() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ICDCounter response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel FeatureMap read Error", error); + LogNSError("ICDManagement ICDCounter read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47583,25 +46705,25 @@ class ReadUserLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { public: - SubscribeAttributeUserLabelFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeIcdManagementICDCounter() + : SubscribeAttribute("icdcounter") { } - ~SubscribeAttributeUserLabelFeatureMap() + ~SubscribeAttributeIcdManagementICDCounter() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47612,10 +46734,10 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeICDCounterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.ICDCounter response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47628,35 +46750,38 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute ClientsSupportedPerFabric */ -class ReadUserLabelClusterRevision : public ReadAttribute { +class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { public: - ReadUserLabelClusterRevision() - : ReadAttribute("cluster-revision") + ReadIcdManagementClientsSupportedPerFabric() + : ReadAttribute("clients-supported-per-fabric") { } - ~ReadUserLabelClusterRevision() + ~ReadIcdManagementClientsSupportedPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UserLabel ClusterRevision read Error", error); + LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47665,25 +46790,25 @@ class ReadUserLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { public: - SubscribeAttributeUserLabelClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeIcdManagementClientsSupportedPerFabric() + : SubscribeAttribute("clients-supported-per-fabric") { } - ~SubscribeAttributeUserLabelClusterRevision() + ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UserLabel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UserLabel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47694,10 +46819,10 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47710,53 +46835,38 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute StateValue + * Attribute UserActiveModeTriggerHint */ -class ReadBooleanStateStateValue : public ReadAttribute { +class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { public: - ReadBooleanStateStateValue() - : ReadAttribute("state-value") + ReadIcdManagementUserActiveModeTriggerHint() + : ReadAttribute("user-active-mode-trigger-hint") { } - ~ReadBooleanStateStateValue() + ~ReadIcdManagementUserActiveModeTriggerHint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerHintWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState StateValue read Error", error); + LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47765,25 +46875,25 @@ class ReadBooleanStateStateValue : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { +class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateStateValue() - : SubscribeAttribute("state-value") + SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + : SubscribeAttribute("user-active-mode-trigger-hint") { } - ~SubscribeAttributeBooleanStateStateValue() + ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::StateValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47794,10 +46904,265 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateValueWithParams:params + [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute UserActiveModeTriggerInstruction + */ +class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { +public: + ReadIcdManagementUserActiveModeTriggerInstruction() + : ReadAttribute("user-active-mode-trigger-instruction") + { + } + + ~ReadIcdManagementUserActiveModeTriggerInstruction() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserActiveModeTriggerInstructionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { +public: + SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + : SubscribeAttribute("user-active-mode-trigger-instruction") + { + } + + ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute OperatingMode + */ +class ReadIcdManagementOperatingMode : public ReadAttribute { +public: + ReadIcdManagementOperatingMode() + : ReadAttribute("operating-mode") + { + } + + ~ReadIcdManagementOperatingMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement OperatingMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { +public: + SubscribeAttributeIcdManagementOperatingMode() + : SubscribeAttribute("operating-mode") + { + } + + ~SubscribeAttributeIcdManagementOperatingMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOperatingModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute MaximumCheckInBackOff + */ +class ReadIcdManagementMaximumCheckInBackOff : public ReadAttribute { +public: + ReadIcdManagementMaximumCheckInBackOff() + : ReadAttribute("maximum-check-in-back-off") + { + } + + ~ReadIcdManagementMaximumCheckInBackOff() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::MaximumCheckInBackOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaximumCheckInBackOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.MaximumCheckInBackOff response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ICDManagement MaximumCheckInBackOff read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIcdManagementMaximumCheckInBackOff : public SubscribeAttribute { +public: + SubscribeAttributeIcdManagementMaximumCheckInBackOff() + : SubscribeAttribute("maximum-check-in-back-off") + { + } + + ~SubscribeAttributeIcdManagementMaximumCheckInBackOff() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::MaximumCheckInBackOff::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaximumCheckInBackOffWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.MaximumCheckInBackOff response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47810,35 +47175,38 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadBooleanStateGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementGeneratedCommandList : public ReadAttribute { public: - ReadBooleanStateGeneratedCommandList() + ReadIcdManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBooleanStateGeneratedCommandList() + ~ReadIcdManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState GeneratedCommandList read Error", error); + LogNSError("ICDManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47847,25 +47215,25 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateGeneratedCommandList() + SubscribeAttributeIcdManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBooleanStateGeneratedCommandList() + ~SubscribeAttributeIcdManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47879,7 +47247,7 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47892,35 +47260,38 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadBooleanStateAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementAcceptedCommandList : public ReadAttribute { public: - ReadBooleanStateAcceptedCommandList() + ReadIcdManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBooleanStateAcceptedCommandList() + ~ReadIcdManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState AcceptedCommandList read Error", error); + LogNSError("ICDManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47929,25 +47300,25 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAcceptedCommandList() + SubscribeAttributeIcdManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBooleanStateAcceptedCommandList() + ~SubscribeAttributeIcdManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47961,7 +47332,7 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47974,37 +47345,38 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadBooleanStateEventList : public ReadAttribute { +class ReadIcdManagementEventList : public ReadAttribute { public: - ReadBooleanStateEventList() + ReadIcdManagementEventList() : ReadAttribute("event-list") { } - ~ReadBooleanStateEventList() + ~ReadIcdManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState EventList read Error", error); + LogNSError("ICDManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48013,25 +47385,25 @@ class ReadBooleanStateEventList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateEventList() + SubscribeAttributeIcdManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBooleanStateEventList() + ~SubscribeAttributeIcdManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48045,7 +47417,7 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48059,36 +47431,37 @@ class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadBooleanStateAttributeList : public ReadAttribute { +class ReadIcdManagementAttributeList : public ReadAttribute { public: - ReadBooleanStateAttributeList() + ReadIcdManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBooleanStateAttributeList() + ~ReadIcdManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState AttributeList read Error", error); + LogNSError("ICDManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48097,25 +47470,25 @@ class ReadBooleanStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAttributeList() + SubscribeAttributeIcdManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBooleanStateAttributeList() + ~SubscribeAttributeIcdManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48129,7 +47502,7 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48142,35 +47515,38 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadBooleanStateFeatureMap : public ReadAttribute { +class ReadIcdManagementFeatureMap : public ReadAttribute { public: - ReadBooleanStateFeatureMap() + ReadIcdManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBooleanStateFeatureMap() + ~ReadIcdManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState FeatureMap read Error", error); + LogNSError("ICDManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48179,25 +47555,25 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateFeatureMap() + SubscribeAttributeIcdManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBooleanStateFeatureMap() + ~SubscribeAttributeIcdManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48211,7 +47587,7 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48224,35 +47600,38 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadBooleanStateClusterRevision : public ReadAttribute { +class ReadIcdManagementClusterRevision : public ReadAttribute { public: - ReadBooleanStateClusterRevision() + ReadIcdManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBooleanStateClusterRevision() + ~ReadIcdManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState ClusterRevision read Error", error); + LogNSError("ICDManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48261,25 +47640,25 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateClusterRevision() + SubscribeAttributeIcdManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBooleanStateClusterRevision() + ~SubscribeAttributeIcdManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48293,7 +47672,7 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48306,26 +47685,22 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster IcdManagement | 0x0046 | +| Cluster Timer | 0x0047 | |------------------------------------------------------------------------------| | Commands: | | -| * RegisterClient | 0x00 | -| * UnregisterClient | 0x02 | -| * StayActiveRequest | 0x03 | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * IdleModeDuration | 0x0000 | -| * ActiveModeDuration | 0x0001 | -| * ActiveModeThreshold | 0x0002 | -| * RegisteredClients | 0x0003 | -| * ICDCounter | 0x0004 | -| * ClientsSupportedPerFabric | 0x0005 | -| * UserActiveModeTriggerHint | 0x0006 | -| * UserActiveModeTriggerInstruction | 0x0007 | -| * OperatingMode | 0x0008 | -| * MaximumCheckInBackOff | 0x0009 | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -48338,210 +47713,206 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Command RegisterClient + * Command SetTimer */ -class IcdManagementRegisterClient : public ClusterCommand { +class TimerSetTimer : public ClusterCommand { public: - IcdManagementRegisterClient() - : ClusterCommand("register-client") + TimerSetTimer() + : ClusterCommand("set-timer") { #if MTR_ENABLE_PROVISIONAL - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MonitoredSubject", 0, UINT64_MAX, &mRequest.monitoredSubject); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Key", &mRequest.key); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ClientType", 0, UINT8_MAX, &mRequest.clientType); + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::RegisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterSetTimerParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.monitoredSubject = [NSNumber numberWithUnsignedLongLong:mRequest.monitoredSubject]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.key = [NSData dataWithBytes:mRequest.key.data() length:mRequest.key.size()]; + params.newTime = [NSNumber numberWithUnsignedInt:mRequest.newTime]; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.verificationKey.HasValue()) { - params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; - } else { - params.verificationKey = nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTimerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.clientType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.clientType)]; -#endif // MTR_ENABLE_PROVISIONAL +/* + * Command ResetTimer + */ +class TimerResetTimer : public ClusterCommand { +public: + TimerResetTimer() + : ClusterCommand("reset-timer") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterResetTimerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster registerClientWithParams:params completion: - ^(MTRICDManagementClusterRegisterClientResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetTimerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command UnregisterClient + * Command AddTime */ -class IcdManagementUnregisterClient : public ClusterCommand { +class TimerAddTime : public ClusterCommand { public: - IcdManagementUnregisterClient() - : ClusterCommand("unregister-client") + TimerAddTime() + : ClusterCommand("add-time") { #if MTR_ENABLE_PROVISIONAL - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("VerificationKey", &mRequest.verificationKey); + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterAddTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.checkInNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.checkInNodeID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.verificationKey.HasValue()) { - params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.Value().data() length:mRequest.verificationKey.Value().size()]; - } else { - params.verificationKey = nil; - } + params.additionalTime = [NSNumber numberWithUnsignedInt:mRequest.additionalTime]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unregisterClientWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; + chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command StayActiveRequest + * Command ReduceTime */ -class IcdManagementStayActiveRequest : public ClusterCommand { +class TimerReduceTime : public ClusterCommand { public: - IcdManagementStayActiveRequest() - : ClusterCommand("stay-active-request") + TimerReduceTime() + : ClusterCommand("reduce-time") { #if MTR_ENABLE_PROVISIONAL - AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); + AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimerClusterReduceTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; + params.timeReduction = [NSNumber numberWithUnsignedInt:mRequest.timeReduction]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stayActiveRequestWithParams:params completion: - ^(MTRICDManagementClusterStayActiveResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster reduceTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; + chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -48549,34 +47920,34 @@ class IcdManagementStayActiveRequest : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute IdleModeDuration + * Attribute SetTime */ -class ReadIcdManagementIdleModeDuration : public ReadAttribute { +class ReadTimerSetTime : public ReadAttribute { public: - ReadIcdManagementIdleModeDuration() - : ReadAttribute("idle-mode-duration") + ReadTimerSetTime() + : ReadAttribute("set-time") { } - ~ReadIcdManagementIdleModeDuration() + ~ReadTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIdleModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement IdleModeDuration read Error", error); + LogNSError("Timer SetTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48585,25 +47956,25 @@ class ReadIcdManagementIdleModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { +class SubscribeAttributeTimerSetTime : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementIdleModeDuration() - : SubscribeAttribute("idle-mode-duration") + SubscribeAttributeTimerSetTime() + : SubscribeAttribute("set-time") { } - ~SubscribeAttributeIcdManagementIdleModeDuration() + ~SubscribeAttributeTimerSetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::IdleModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48614,10 +47985,10 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIdleModeDurationWithParams:params + [cluster subscribeAttributeSetTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); + NSLog(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48634,34 +48005,34 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeDuration + * Attribute TimeRemaining */ -class ReadIcdManagementActiveModeDuration : public ReadAttribute { +class ReadTimerTimeRemaining : public ReadAttribute { public: - ReadIcdManagementActiveModeDuration() - : ReadAttribute("active-mode-duration") + ReadTimerTimeRemaining() + : ReadAttribute("time-remaining") { } - ~ReadIcdManagementActiveModeDuration() + ~ReadTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ActiveModeDuration read Error", error); + LogNSError("Timer TimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48670,25 +48041,25 @@ class ReadIcdManagementActiveModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { +class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementActiveModeDuration() - : SubscribeAttribute("active-mode-duration") + SubscribeAttributeTimerTimeRemaining() + : SubscribeAttribute("time-remaining") { } - ~SubscribeAttributeIcdManagementActiveModeDuration() + ~SubscribeAttributeTimerTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48699,10 +48070,10 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveModeDurationWithParams:params + [cluster subscribeAttributeTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); + NSLog(@"Timer.TimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48719,34 +48090,34 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeThreshold + * Attribute TimerState */ -class ReadIcdManagementActiveModeThreshold : public ReadAttribute { +class ReadTimerTimerState : public ReadAttribute { public: - ReadIcdManagementActiveModeThreshold() - : ReadAttribute("active-mode-threshold") + ReadTimerTimerState() + : ReadAttribute("timer-state") { } - ~ReadIcdManagementActiveModeThreshold() + ~ReadTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimerStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ActiveModeThreshold read Error", error); + LogNSError("Timer TimerState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48755,25 +48126,25 @@ class ReadIcdManagementActiveModeThreshold : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { +class SubscribeAttributeTimerTimerState : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementActiveModeThreshold() - : SubscribeAttribute("active-mode-threshold") + SubscribeAttributeTimerTimerState() + : SubscribeAttribute("timer-state") { } - ~SubscribeAttributeIcdManagementActiveModeThreshold() + ~SubscribeAttributeTimerTimerState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ActiveModeThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48784,10 +48155,10 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveModeThresholdWithParams:params + [cluster subscribeAttributeTimerStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + NSLog(@"Timer.TimerState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48804,38 +48175,34 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute RegisteredClients + * Attribute GeneratedCommandList */ -class ReadIcdManagementRegisteredClients : public ReadAttribute { +class ReadTimerGeneratedCommandList : public ReadAttribute { public: - ReadIcdManagementRegisteredClients() - : ReadAttribute("registered-clients") + ReadTimerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadIcdManagementRegisteredClients() + ~ReadTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeRegisteredClientsWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement RegisteredClients read Error", error); + LogNSError("Timer GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48844,25 +48211,25 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { +class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementRegisteredClients() - : SubscribeAttribute("registered-clients") + SubscribeAttributeTimerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIcdManagementRegisteredClients() + ~SubscribeAttributeTimerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::RegisteredClients::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48873,10 +48240,10 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRegisteredClientsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48893,34 +48260,34 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute ICDCounter + * Attribute AcceptedCommandList */ -class ReadIcdManagementICDCounter : public ReadAttribute { +class ReadTimerAcceptedCommandList : public ReadAttribute { public: - ReadIcdManagementICDCounter() - : ReadAttribute("icdcounter") + ReadTimerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadIcdManagementICDCounter() + ~ReadTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeICDCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ICDCounter read Error", error); + LogNSError("Timer AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48929,25 +48296,25 @@ class ReadIcdManagementICDCounter : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { +class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementICDCounter() - : SubscribeAttribute("icdcounter") + SubscribeAttributeTimerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIcdManagementICDCounter() + ~SubscribeAttributeTimerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ICDCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48958,10 +48325,10 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeICDCounterWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48978,34 +48345,34 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClientsSupportedPerFabric + * Attribute EventList */ -class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { +class ReadTimerEventList : public ReadAttribute { public: - ReadIcdManagementClientsSupportedPerFabric() - : ReadAttribute("clients-supported-per-fabric") + ReadTimerEventList() + : ReadAttribute("event-list") { } - ~ReadIcdManagementClientsSupportedPerFabric() + ~ReadTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClientsSupportedPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); + LogNSError("Timer EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49014,25 +48381,25 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { +class SubscribeAttributeTimerEventList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClientsSupportedPerFabric() - : SubscribeAttribute("clients-supported-per-fabric") + SubscribeAttributeTimerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() + ~SubscribeAttributeTimerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClientsSupportedPerFabric::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49043,10 +48410,10 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49063,34 +48430,34 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerHint + * Attribute AttributeList */ -class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { +class ReadTimerAttributeList : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerHint() - : ReadAttribute("user-active-mode-trigger-hint") + ReadTimerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadIcdManagementUserActiveModeTriggerHint() + ~ReadTimerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserActiveModeTriggerHintWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); + LogNSError("Timer AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49099,25 +48466,25 @@ class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { +class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerHint() - : SubscribeAttribute("user-active-mode-trigger-hint") + SubscribeAttributeTimerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + ~SubscribeAttributeTimerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerHint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49128,10 +48495,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49148,34 +48515,34 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerInstruction + * Attribute FeatureMap */ -class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { +class ReadTimerFeatureMap : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerInstruction() - : ReadAttribute("user-active-mode-trigger-instruction") + ReadTimerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadIcdManagementUserActiveModeTriggerInstruction() + ~ReadTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserActiveModeTriggerInstructionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); + LogNSError("Timer FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49184,25 +48551,25 @@ class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { +class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() - : SubscribeAttribute("user-active-mode-trigger-instruction") + SubscribeAttributeTimerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + ~SubscribeAttributeTimerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49213,10 +48580,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49233,34 +48600,34 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperatingMode + * Attribute ClusterRevision */ -class ReadIcdManagementOperatingMode : public ReadAttribute { +class ReadTimerClusterRevision : public ReadAttribute { public: - ReadIcdManagementOperatingMode() - : ReadAttribute("operating-mode") + ReadTimerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadIcdManagementOperatingMode() + ~ReadTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement OperatingMode read Error", error); + LogNSError("Timer ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49269,25 +48636,25 @@ class ReadIcdManagementOperatingMode : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { +class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementOperatingMode() - : SubscribeAttribute("operating-mode") + SubscribeAttributeTimerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIcdManagementOperatingMode() + ~SubscribeAttributeTimerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::OperatingMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49298,10 +48665,10 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperatingModeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.OperatingMode response %@", [value description]); + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49314,38 +48681,277 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OvenCavityOperationalState | 0x0048 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute MaximumCheckInBackOff + * Command Pause */ -class ReadIcdManagementMaximumCheckInBackOff : public ReadAttribute { +class OvenCavityOperationalStatePause : public ClusterCommand { public: - ReadIcdManagementMaximumCheckInBackOff() - : ReadAttribute("maximum-check-in-back-off") + OvenCavityOperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } - ~ReadIcdManagementMaximumCheckInBackOff() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class OvenCavityOperationalStateStop : public ClusterCommand { +public: + OvenCavityOperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::MaximumCheckInBackOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Start + */ +class OvenCavityOperationalStateStart : public ClusterCommand { +public: + OvenCavityOperationalStateStart() + : ClusterCommand("start") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class OvenCavityOperationalStateResume : public ClusterCommand { +public: + OvenCavityOperationalStateResume() + : ClusterCommand("resume") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute PhaseList + */ +class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { +public: + ReadOvenCavityOperationalStatePhaseList() + : ReadAttribute("phase-list") + { + } + + ~ReadOvenCavityOperationalStatePhaseList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaximumCheckInBackOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.MaximumCheckInBackOff response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement MaximumCheckInBackOff read Error", error); + LogNSError("OvenCavityOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49354,25 +48960,25 @@ class ReadIcdManagementMaximumCheckInBackOff : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementMaximumCheckInBackOff : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementMaximumCheckInBackOff() - : SubscribeAttribute("maximum-check-in-back-off") + SubscribeAttributeOvenCavityOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeIcdManagementMaximumCheckInBackOff() + ~SubscribeAttributeOvenCavityOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::MaximumCheckInBackOff::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49383,10 +48989,10 @@ class SubscribeAttributeIcdManagementMaximumCheckInBackOff : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaximumCheckInBackOffWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.MaximumCheckInBackOff response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49403,34 +49009,34 @@ class SubscribeAttributeIcdManagementMaximumCheckInBackOff : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute CurrentPhase */ -class ReadIcdManagementGeneratedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { public: - ReadIcdManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOvenCavityOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadIcdManagementGeneratedCommandList() + ~ReadOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement GeneratedCommandList read Error", error); + LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49439,25 +49045,25 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeIcdManagementGeneratedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49468,10 +49074,10 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49488,34 +49094,34 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute CountdownTime */ -class ReadIcdManagementAcceptedCommandList : public ReadAttribute { +class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { public: - ReadIcdManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOvenCavityOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadIcdManagementAcceptedCommandList() + ~ReadOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement AcceptedCommandList read Error", error); + LogNSError("OvenCavityOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49524,25 +49130,25 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOvenCavityOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeIcdManagementAcceptedCommandList() + ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49553,10 +49159,10 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49573,34 +49179,34 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute OperationalStateList */ -class ReadIcdManagementEventList : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { public: - ReadIcdManagementEventList() - : ReadAttribute("event-list") + ReadOvenCavityOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadIcdManagementEventList() + ~ReadOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement EventList read Error", error); + LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49609,25 +49215,25 @@ class ReadIcdManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeIcdManagementEventList() + ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49638,10 +49244,10 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.EventList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49658,34 +49264,34 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute OperationalState */ -class ReadIcdManagementAttributeList : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { public: - ReadIcdManagementAttributeList() - : ReadAttribute("attribute-list") + ReadOvenCavityOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadIcdManagementAttributeList() + ~ReadOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement AttributeList read Error", error); + LogNSError("OvenCavityOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49694,25 +49300,25 @@ class ReadIcdManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOvenCavityOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeIcdManagementAttributeList() + ~SubscribeAttributeOvenCavityOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49723,10 +49329,10 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49743,34 +49349,34 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute OperationalError */ -class ReadIcdManagementFeatureMap : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { public: - ReadIcdManagementFeatureMap() - : ReadAttribute("feature-map") + ReadOvenCavityOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadIcdManagementFeatureMap() + ~ReadOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement FeatureMap read Error", error); + LogNSError("OvenCavityOperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49779,25 +49385,25 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenCavityOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeIcdManagementFeatureMap() + ~SubscribeAttributeOvenCavityOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49808,10 +49414,10 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.FeatureMap response %@", [value description]); + reportHandler:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49828,34 +49434,34 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadIcdManagementClusterRevision : public ReadAttribute { +class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadIcdManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenCavityOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadIcdManagementClusterRevision() + ~ReadOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ClusterRevision read Error", error); + LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49864,25 +49470,25 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIcdManagementClusterRevision() + ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IcdManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49893,10 +49499,10 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49909,269 +49515,208 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster Timer | 0x0047 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetTimer | 0x00 | -| * ResetTimer | 0x01 | -| * AddTime | 0x02 | -| * ReduceTime | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SetTime | 0x0000 | -| * TimeRemaining | 0x0001 | -| * TimerState | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command SetTimer + * Attribute AcceptedCommandList */ -class TimerSetTimer : public ClusterCommand { +class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { public: - TimerSetTimer() - : ClusterCommand("set-timer") + ReadOvenCavityOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadOvenCavityOperationalStateAcceptedCommandList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::SetTimer::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterSetTimerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newTime = [NSNumber numberWithUnsignedInt:mRequest.newTime]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTimerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResetTimer - */ -class TimerResetTimer : public ClusterCommand { +class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - TimerResetTimer() - : ClusterCommand("reset-timer") + SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterResetTimerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetTimerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + /* - * Command AddTime + * Attribute EventList */ -class TimerAddTime : public ClusterCommand { +class ReadOvenCavityOperationalStateEventList : public ReadAttribute { public: - TimerAddTime() - : ClusterCommand("add-time") + ReadOvenCavityOperationalStateEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOvenCavityOperationalStateEventList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::AddTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterAddTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.additionalTime = [NSNumber numberWithUnsignedInt:mRequest.additionalTime]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenCavityOperationalState EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ReduceTime - */ -class TimerReduceTime : public ClusterCommand { +class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { public: - TimerReduceTime() - : ClusterCommand("reduce-time") + SubscribeAttributeOvenCavityOperationalStateEventList() + : SubscribeAttribute("event-list") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeReduction", 0, UINT32_MAX, &mRequest.timeReduction); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeOvenCavityOperationalStateEventList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ReduceTime::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimerClusterReduceTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.timeReduction = [NSNumber numberWithUnsignedInt:mRequest.timeReduction]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster reduceTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SetTime + * Attribute AttributeList */ -class ReadTimerSetTime : public ReadAttribute { +class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { public: - ReadTimerSetTime() - : ReadAttribute("set-time") + ReadOvenCavityOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTimerSetTime() + ~ReadOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer SetTime read Error", error); + LogNSError("OvenCavityOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50180,25 +49725,25 @@ class ReadTimerSetTime : public ReadAttribute { } }; -class SubscribeAttributeTimerSetTime : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimerSetTime() - : SubscribeAttribute("set-time") + SubscribeAttributeOvenCavityOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimerSetTime() + ~SubscribeAttributeOvenCavityOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::SetTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50209,10 +49754,10 @@ class SubscribeAttributeTimerSetTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetTimeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50229,34 +49774,34 @@ class SubscribeAttributeTimerSetTime : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TimeRemaining + * Attribute FeatureMap */ -class ReadTimerTimeRemaining : public ReadAttribute { +class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { public: - ReadTimerTimeRemaining() - : ReadAttribute("time-remaining") + ReadOvenCavityOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTimerTimeRemaining() + ~ReadOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimeRemaining response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer TimeRemaining read Error", error); + LogNSError("OvenCavityOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50265,25 +49810,25 @@ class ReadTimerTimeRemaining : public ReadAttribute { } }; -class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimerTimeRemaining() - : SubscribeAttribute("time-remaining") + SubscribeAttributeOvenCavityOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimerTimeRemaining() + ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50294,10 +49839,10 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeRemainingWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimeRemaining response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50314,34 +49859,34 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TimerState + * Attribute ClusterRevision */ -class ReadTimerTimerState : public ReadAttribute { +class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { public: - ReadTimerTimerState() - : ReadAttribute("timer-state") + ReadOvenCavityOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimerTimerState() + ~ReadOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimerStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimerState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer TimerState read Error", error); + LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50350,25 +49895,25 @@ class ReadTimerTimerState : public ReadAttribute { } }; -class SubscribeAttributeTimerTimerState : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimerTimerState() - : SubscribeAttribute("timer-state") + SubscribeAttributeOvenCavityOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimerTimerState() + ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::TimerState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50379,10 +49924,10 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimerStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimerState response %@", [value description]); + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50395,38 +49940,121 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OvenMode | 0x0049 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Command ChangeToMode */ -class ReadTimerGeneratedCommandList : public ReadAttribute { +class OvenModeChangeToMode : public ClusterCommand { public: - ReadTimerGeneratedCommandList() - : ReadAttribute("generated-command-list") + OvenModeChangeToMode() + : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadTimerGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadOvenModeSupportedModes : public ReadAttribute { +public: + ReadOvenModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer GeneratedCommandList read Error", error); + LogNSError("OvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50435,25 +50063,25 @@ class ReadTimerGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeTimerGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeTimerGeneratedCommandList() + ~SubscribeAttributeOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50464,10 +50092,10 @@ class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.GeneratedCommandList response %@", [value description]); + NSLog(@"OvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50484,34 +50112,34 @@ class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute CurrentMode */ -class ReadTimerAcceptedCommandList : public ReadAttribute { +class ReadOvenModeCurrentMode : public ReadAttribute { public: - ReadTimerAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadTimerAcceptedCommandList() + ~ReadOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer AcceptedCommandList read Error", error); + LogNSError("OvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50520,25 +50148,25 @@ class ReadTimerAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeTimerAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeTimerAcceptedCommandList() + ~SubscribeAttributeOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50549,10 +50177,10 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50569,34 +50197,34 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute StartUpMode */ -class ReadTimerEventList : public ReadAttribute { +class ReadOvenModeStartUpMode : public ReadAttribute { public: - ReadTimerEventList() - : ReadAttribute("event-list") + ReadOvenModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadTimerEventList() + ~ReadOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer EventList read Error", error); + LogNSError("OvenMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50605,25 +50233,69 @@ class ReadTimerEventList : public ReadAttribute { } }; -class SubscribeAttributeTimerEventList : public SubscribeAttribute { +class WriteOvenModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeTimerEventList() - : SubscribeAttribute("event-list") + WriteOvenModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimerEventList() + ~WriteOvenModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OvenMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeOvenModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50634,10 +50306,10 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50654,34 +50326,34 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute OnMode */ -class ReadTimerAttributeList : public ReadAttribute { +class ReadOvenModeOnMode : public ReadAttribute { public: - ReadTimerAttributeList() - : ReadAttribute("attribute-list") + ReadOvenModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadTimerAttributeList() + ~ReadOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer AttributeList read Error", error); + LogNSError("OvenMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50690,25 +50362,69 @@ class ReadTimerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { +class WriteOvenModeOnMode : public WriteAttribute { public: - SubscribeAttributeTimerAttributeList() - : SubscribeAttribute("attribute-list") + WriteOvenModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimerAttributeList() + ~WriteOvenModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OvenMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeOvenModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50719,10 +50435,10 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50739,34 +50455,34 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadTimerFeatureMap : public ReadAttribute { +class ReadOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadTimerFeatureMap() - : ReadAttribute("feature-map") + ReadOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTimerFeatureMap() + ~ReadOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer FeatureMap read Error", error); + LogNSError("OvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50775,25 +50491,25 @@ class ReadTimerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimerFeatureMap() + ~SubscribeAttributeOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50804,10 +50520,10 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50824,34 +50540,34 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadTimerClusterRevision : public ReadAttribute { +class ReadOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadTimerClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTimerClusterRevision() + ~ReadOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer ClusterRevision read Error", error); + LogNSError("OvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50860,25 +50576,25 @@ class ReadTimerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimerClusterRevision() + ~SubscribeAttributeOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Timer::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Timer::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50889,10 +50605,10 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50905,277 +50621,123 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster OvenCavityOperationalState | 0x0048 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command Pause + * Attribute EventList */ -class OvenCavityOperationalStatePause : public ClusterCommand { +class ReadOvenModeEventList : public ReadAttribute { public: - OvenCavityOperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadOvenModeEventList() + : ReadAttribute("event-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Stop - */ -class OvenCavityOperationalStateStop : public ClusterCommand { -public: - OvenCavityOperationalStateStop() - : ClusterCommand("stop") + ~ReadOvenModeEventList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OvenMode EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Start - */ -class OvenCavityOperationalStateStart : public ClusterCommand { +class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { public: - OvenCavityOperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeOvenModeEventList() + : SubscribeAttribute("event-list") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Resume - */ -class OvenCavityOperationalStateResume : public ClusterCommand { -public: - OvenCavityOperationalStateResume() - : ClusterCommand("resume") + ~SubscribeAttributeOvenModeEventList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute PhaseList + * Attribute AttributeList */ -class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { +class ReadOvenModeAttributeList : public ReadAttribute { public: - ReadOvenCavityOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadOvenModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOvenCavityOperationalStatePhaseList() + ~ReadOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState PhaseList read Error", error); + LogNSError("OvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51184,25 +50746,25 @@ class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeOvenModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenCavityOperationalStatePhaseList() + ~SubscribeAttributeOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51213,10 +50775,10 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); + NSLog(@"OvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51233,34 +50795,34 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPhase + * Attribute FeatureMap */ -class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { +class ReadOvenModeFeatureMap : public ReadAttribute { public: - ReadOvenCavityOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadOvenModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOvenCavityOperationalStateCurrentPhase() + ~ReadOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); + LogNSError("OvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51269,25 +50831,25 @@ class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeOvenModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + ~SubscribeAttributeOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51298,10 +50860,10 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"OvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51318,34 +50880,34 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CountdownTime + * Attribute ClusterRevision */ -class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { +class ReadOvenModeClusterRevision : public ReadAttribute { public: - ReadOvenCavityOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadOvenModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOvenCavityOperationalStateCountdownTime() + ~ReadOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState CountdownTime read Error", error); + LogNSError("OvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51354,25 +50916,25 @@ class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() + ~SubscribeAttributeOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51383,10 +50945,10 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51400,37 +50962,57 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster LaundryDryerControls | 0x004A | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedDrynessLevels | 0x0000 | +| * SelectedDrynessLevel | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalStateList + * Attribute SupportedDrynessLevels */ -class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { +class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadLaundryDryerControlsSupportedDrynessLevels() + : ReadAttribute("supported-dryness-levels") { } - ~ReadOvenCavityOperationalStateOperationalStateList() + ~ReadLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedDrynessLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); + LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51439,25 +51021,25 @@ class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + : SubscribeAttribute("supported-dryness-levels") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51468,10 +51050,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeSupportedDrynessLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); + NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51488,34 +51070,34 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute OperationalState + * Attribute SelectedDrynessLevel */ -class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { +class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadLaundryDryerControlsSelectedDrynessLevel() + : ReadAttribute("selected-dryness-level") { } - ~ReadOvenCavityOperationalStateOperationalState() + ~ReadLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedDrynessLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalState read Error", error); + LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51524,110 +51106,69 @@ class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { +class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + WriteLaundryDryerControlsSelectedDrynessLevel() + : WriteAttribute("selected-dryness-level") { + AddArgument("attr-name", "selected-dryness-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOvenCavityOperationalStateOperationalState() + ~WriteLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeOperationalStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OperationalError - */ -class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { -public: - ReadOvenCavityOperationalStateOperationalError() - : ReadAttribute("operational-error") - { - } - - ~ReadOvenCavityOperationalStateOperationalError() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OvenCavityOperationalState OperationalError read Error", error); + [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + : SubscribeAttribute("selected-dryness-level") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalError() + ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51638,10 +51179,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeSelectedDrynessLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51660,32 +51201,32 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs /* * Attribute GeneratedCommandList */ -class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateGeneratedCommandList() + ReadLaundryDryerControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenCavityOperationalStateGeneratedCommandList() + ~ReadLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); + LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51694,25 +51235,25 @@ class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + SubscribeAttributeLaundryDryerControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51726,7 +51267,7 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51745,32 +51286,32 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAcceptedCommandList() + ReadLaundryDryerControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenCavityOperationalStateAcceptedCommandList() + ~ReadLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); + LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51779,25 +51320,25 @@ class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + SubscribeAttributeLaundryDryerControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51811,7 +51352,7 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51830,32 +51371,32 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S /* * Attribute EventList */ -class ReadOvenCavityOperationalStateEventList : public ReadAttribute { +class ReadLaundryDryerControlsEventList : public ReadAttribute { public: - ReadOvenCavityOperationalStateEventList() + ReadLaundryDryerControlsEventList() : ReadAttribute("event-list") { } - ~ReadOvenCavityOperationalStateEventList() + ~ReadLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState EventList read Error", error); + LogNSError("LaundryDryerControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51864,25 +51405,25 @@ class ReadOvenCavityOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateEventList() + SubscribeAttributeLaundryDryerControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenCavityOperationalStateEventList() + ~SubscribeAttributeLaundryDryerControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51896,7 +51437,7 @@ class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51915,32 +51456,32 @@ class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { +class ReadLaundryDryerControlsAttributeList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAttributeList() + ReadLaundryDryerControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenCavityOperationalStateAttributeList() + ~ReadLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AttributeList read Error", error); + LogNSError("LaundryDryerControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51949,25 +51490,25 @@ class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAttributeList() + SubscribeAttributeLaundryDryerControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAttributeList() + ~SubscribeAttributeLaundryDryerControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51981,7 +51522,7 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52000,32 +51541,32 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { +class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { public: - ReadOvenCavityOperationalStateFeatureMap() + ReadLaundryDryerControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenCavityOperationalStateFeatureMap() + ~ReadLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState FeatureMap read Error", error); + LogNSError("LaundryDryerControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52034,25 +51575,25 @@ class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateFeatureMap() + SubscribeAttributeLaundryDryerControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() + ~SubscribeAttributeLaundryDryerControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52066,7 +51607,7 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52085,32 +51626,32 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { +class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { public: - ReadOvenCavityOperationalStateClusterRevision() + ReadLaundryDryerControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenCavityOperationalStateClusterRevision() + ~ReadLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); + LogNSError("LaundryDryerControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52119,25 +51660,25 @@ class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateClusterRevision() + SubscribeAttributeLaundryDryerControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() + ~SubscribeAttributeLaundryDryerControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenCavityOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52151,7 +51692,7 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52166,18 +51707,19 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OvenMode | 0x0049 | +| Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -52188,51 +51730,40 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class OvenModeChangeToMode : public ClusterCommand { +class ModeSelectChangeToMode : public ClusterCommand { public: - OvenModeChangeToMode() + ModeSelectChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } + ^(NSError * _Nullable error) { responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -52243,42 +51774,202 @@ class OvenModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL +/* + * Attribute Description + */ +class ReadModeSelectDescription : public ReadAttribute { +public: + ReadModeSelectDescription() + : ReadAttribute("description") + { + } -#if MTR_ENABLE_PROVISIONAL + ~ReadModeSelectDescription() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect Description read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectDescription() + : SubscribeAttribute("description") + { + } + + ~SubscribeAttributeModeSelectDescription() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeDescriptionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute StandardNamespace + */ +class ReadModeSelectStandardNamespace : public ReadAttribute { +public: + ReadModeSelectStandardNamespace() + : ReadAttribute("standard-namespace") + { + } + + ~ReadModeSelectStandardNamespace() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect StandardNamespace read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectStandardNamespace() + : SubscribeAttribute("standard-namespace") + { + } + + ~SubscribeAttributeModeSelectStandardNamespace() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStandardNamespaceWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; /* * Attribute SupportedModes */ -class ReadOvenModeSupportedModes : public ReadAttribute { +class ReadModeSelectSupportedModes : public ReadAttribute { public: - ReadOvenModeSupportedModes() + ReadModeSelectSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadOvenModeSupportedModes() + ~ReadModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.SupportedModes response %@", [value description]); + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode SupportedModes read Error", error); + LogNSError("ModeSelect SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52287,25 +51978,25 @@ class ReadOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeOvenModeSupportedModes() + SubscribeAttributeModeSelectSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeOvenModeSupportedModes() + ~SubscribeAttributeModeSelectSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52319,7 +52010,7 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.SupportedModes response %@", [value description]); + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52332,38 +52023,35 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadOvenModeCurrentMode : public ReadAttribute { +class ReadModeSelectCurrentMode : public ReadAttribute { public: - ReadOvenModeCurrentMode() + ReadModeSelectCurrentMode() : ReadAttribute("current-mode") { } - ~ReadOvenModeCurrentMode() + ~ReadModeSelectCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.CurrentMode response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode CurrentMode read Error", error); + LogNSError("ModeSelect CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52372,25 +52060,25 @@ class ReadOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeCurrentMode() + SubscribeAttributeModeSelectCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeOvenModeCurrentMode() + ~SubscribeAttributeModeSelectCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52404,7 +52092,7 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.CurrentMode response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52417,38 +52105,35 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute StartUpMode */ -class ReadOvenModeStartUpMode : public ReadAttribute { +class ReadModeSelectStartUpMode : public ReadAttribute { public: - ReadOvenModeStartUpMode() + ReadModeSelectStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadOvenModeStartUpMode() + ~ReadModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode StartUpMode read Error", error); + LogNSError("ModeSelect StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52457,9 +52142,9 @@ class ReadOvenModeStartUpMode : public ReadAttribute { } }; -class WriteOvenModeStartUpMode : public WriteAttribute { +class WriteModeSelectStartUpMode : public WriteAttribute { public: - WriteOvenModeStartUpMode() + WriteModeSelectStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -52467,18 +52152,18 @@ class WriteOvenModeStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeStartUpMode() + ~WriteModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -52489,7 +52174,7 @@ class WriteOvenModeStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode StartUpMode write Error", error); + LogNSError("ModeSelect StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52501,25 +52186,25 @@ class WriteOvenModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeStartUpMode() + SubscribeAttributeModeSelectStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeOvenModeStartUpMode() + ~SubscribeAttributeModeSelectStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52533,7 +52218,7 @@ class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52546,38 +52231,35 @@ class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute OnMode */ -class ReadOvenModeOnMode : public ReadAttribute { +class ReadModeSelectOnMode : public ReadAttribute { public: - ReadOvenModeOnMode() + ReadModeSelectOnMode() : ReadAttribute("on-mode") { } - ~ReadOvenModeOnMode() + ~ReadModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode OnMode read Error", error); + LogNSError("ModeSelect OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52586,9 +52268,9 @@ class ReadOvenModeOnMode : public ReadAttribute { } }; -class WriteOvenModeOnMode : public WriteAttribute { +class WriteModeSelectOnMode : public WriteAttribute { public: - WriteOvenModeOnMode() + WriteModeSelectOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -52596,18 +52278,18 @@ class WriteOvenModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeOnMode() + ~WriteModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -52618,7 +52300,7 @@ class WriteOvenModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode OnMode write Error", error); + LogNSError("ModeSelect OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52630,25 +52312,25 @@ class WriteOvenModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeOnMode() + SubscribeAttributeModeSelectOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeOvenModeOnMode() + ~SubscribeAttributeModeSelectOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52662,7 +52344,7 @@ class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52675,38 +52357,35 @@ class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadOvenModeGeneratedCommandList : public ReadAttribute { +class ReadModeSelectGeneratedCommandList : public ReadAttribute { public: - ReadOvenModeGeneratedCommandList() + ReadModeSelectGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenModeGeneratedCommandList() + ~ReadModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode GeneratedCommandList read Error", error); + LogNSError("ModeSelect GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52715,25 +52394,25 @@ class ReadOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeGeneratedCommandList() + SubscribeAttributeModeSelectGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenModeGeneratedCommandList() + ~SubscribeAttributeModeSelectGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52747,7 +52426,7 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52760,38 +52439,35 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadOvenModeAcceptedCommandList : public ReadAttribute { +class ReadModeSelectAcceptedCommandList : public ReadAttribute { public: - ReadOvenModeAcceptedCommandList() + ReadModeSelectAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenModeAcceptedCommandList() + ~ReadModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AcceptedCommandList read Error", error); + LogNSError("ModeSelect AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52800,25 +52476,25 @@ class ReadOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAcceptedCommandList() + SubscribeAttributeModeSelectAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenModeAcceptedCommandList() + ~SubscribeAttributeModeSelectAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52832,7 +52508,7 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52845,38 +52521,37 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadOvenModeEventList : public ReadAttribute { +class ReadModeSelectEventList : public ReadAttribute { public: - ReadOvenModeEventList() + ReadModeSelectEventList() : ReadAttribute("event-list") { } - ~ReadOvenModeEventList() + ~ReadModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode EventList read Error", error); + LogNSError("ModeSelect EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52885,25 +52560,25 @@ class ReadOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeEventList() + SubscribeAttributeModeSelectEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenModeEventList() + ~SubscribeAttributeModeSelectEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52917,7 +52592,7 @@ class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52931,37 +52606,36 @@ class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadOvenModeAttributeList : public ReadAttribute { +class ReadModeSelectAttributeList : public ReadAttribute { public: - ReadOvenModeAttributeList() + ReadModeSelectAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenModeAttributeList() + ~ReadModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AttributeList read Error", error); + LogNSError("ModeSelect AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52970,25 +52644,25 @@ class ReadOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAttributeList() + SubscribeAttributeModeSelectAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenModeAttributeList() + ~SubscribeAttributeModeSelectAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53002,7 +52676,7 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53015,38 +52689,35 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadOvenModeFeatureMap : public ReadAttribute { +class ReadModeSelectFeatureMap : public ReadAttribute { public: - ReadOvenModeFeatureMap() + ReadModeSelectFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenModeFeatureMap() + ~ReadModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode FeatureMap read Error", error); + LogNSError("ModeSelect FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53055,25 +52726,25 @@ class ReadOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenModeFeatureMap() + SubscribeAttributeModeSelectFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenModeFeatureMap() + ~SubscribeAttributeModeSelectFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53087,7 +52758,7 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53100,38 +52771,35 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadOvenModeClusterRevision : public ReadAttribute { +class ReadModeSelectClusterRevision : public ReadAttribute { public: - ReadOvenModeClusterRevision() + ReadModeSelectClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenModeClusterRevision() + ~ReadModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode ClusterRevision read Error", error); + LogNSError("ModeSelect ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53140,25 +52808,25 @@ class ReadOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenModeClusterRevision() + SubscribeAttributeModeSelectClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenModeClusterRevision() + ~SubscribeAttributeModeSelectClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53172,7 +52840,7 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53185,17 +52853,18 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryDryerControls | 0x004A | +| Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDrynessLevels | 0x0000 | -| * SelectedDrynessLevel | 0x0001 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -53206,37 +52875,97 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class LaundryWasherModeChangeToMode : public ClusterCommand { +public: + LaundryWasherModeChangeToMode() + : ClusterCommand("change-to-mode") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedDrynessLevels + * Attribute SupportedModes */ -class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { +class ReadLaundryWasherModeSupportedModes : public ReadAttribute { public: - ReadLaundryDryerControlsSupportedDrynessLevels() - : ReadAttribute("supported-dryness-levels") + ReadLaundryWasherModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadLaundryDryerControlsSupportedDrynessLevels() + ~ReadLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedDrynessLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); + LogNSError("LaundryWasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53245,25 +52974,25 @@ class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() - : SubscribeAttribute("supported-dryness-levels") + SubscribeAttributeLaundryWasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + ~SubscribeAttributeLaundryWasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SupportedDrynessLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53274,10 +53003,10 @@ class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedDrynessLevelsWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53294,34 +53023,34 @@ class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedDrynessLevel + * Attribute CurrentMode */ -class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { +class ReadLaundryWasherModeCurrentMode : public ReadAttribute { public: - ReadLaundryDryerControlsSelectedDrynessLevel() - : ReadAttribute("selected-dryness-level") + ReadLaundryWasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadLaundryDryerControlsSelectedDrynessLevel() + ~ReadLaundryWasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedDrynessLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); + LogNSError("LaundryWasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53330,69 +53059,25 @@ class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { } }; -class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { +class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { public: - WriteLaundryDryerControlsSelectedDrynessLevel() - : WriteAttribute("selected-dryness-level") + SubscribeAttributeLaundryWasherModeCurrentMode() + : SubscribeAttribute("current-mode") { - AddArgument("attr-name", "selected-dryness-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteLaundryDryerControlsSelectedDrynessLevel() + ~SubscribeAttributeLaundryWasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { -public: - SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() - : SubscribeAttribute("selected-dryness-level") - { - } - - ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53403,10 +53088,10 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedDrynessLevelWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53423,34 +53108,34 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute StartUpMode */ -class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherModeStartUpMode : public ReadAttribute { public: - ReadLaundryDryerControlsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadLaundryWasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadLaundryDryerControlsGeneratedCommandList() + ~ReadLaundryWasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); + LogNSError("LaundryWasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53459,25 +53144,69 @@ class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { +class WriteLaundryWasherModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeLaundryDryerControlsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteLaundryWasherModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + ~WriteLaundryWasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeLaundryWasherModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53488,10 +53217,10 @@ class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53508,34 +53237,34 @@ class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public Subscr #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute OnMode */ -class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherModeOnMode : public ReadAttribute { public: - ReadLaundryDryerControlsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadLaundryWasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadLaundryDryerControlsAcceptedCommandList() + ~ReadLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); + LogNSError("LaundryWasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53544,25 +53273,69 @@ class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { +class WriteLaundryWasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeLaundryDryerControlsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteLaundryWasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + ~WriteLaundryWasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeLaundryWasherModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53573,10 +53346,10 @@ class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53593,34 +53366,34 @@ class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public Subscri #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadLaundryDryerControlsEventList : public ReadAttribute { +class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsEventList() - : ReadAttribute("event-list") + ReadLaundryWasherModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadLaundryDryerControlsEventList() + ~ReadLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls EventList read Error", error); + LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53629,25 +53402,25 @@ class ReadLaundryDryerControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeLaundryWasherModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryDryerControlsEventList() + ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53658,10 +53431,10 @@ class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53678,34 +53451,34 @@ class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadLaundryDryerControlsAttributeList : public ReadAttribute { +class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsAttributeList() - : ReadAttribute("attribute-list") + ReadLaundryWasherModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadLaundryDryerControlsAttributeList() + ~ReadLaundryWasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AttributeList read Error", error); + LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53714,25 +53487,25 @@ class ReadLaundryDryerControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeLaundryWasherModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryDryerControlsAttributeList() + ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53743,10 +53516,10 @@ class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53763,34 +53536,34 @@ class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { +class ReadLaundryWasherModeEventList : public ReadAttribute { public: - ReadLaundryDryerControlsFeatureMap() - : ReadAttribute("feature-map") + ReadLaundryWasherModeEventList() + : ReadAttribute("event-list") { } - ~ReadLaundryDryerControlsFeatureMap() + ~ReadLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls FeatureMap read Error", error); + LogNSError("LaundryWasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53799,25 +53572,25 @@ class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeLaundryWasherModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryDryerControlsFeatureMap() + ~SubscribeAttributeLaundryWasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53828,10 +53601,10 @@ class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53848,34 +53621,34 @@ class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { +class ReadLaundryWasherModeAttributeList : public ReadAttribute { public: - ReadLaundryDryerControlsClusterRevision() - : ReadAttribute("cluster-revision") + ReadLaundryWasherModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadLaundryDryerControlsClusterRevision() + ~ReadLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls ClusterRevision read Error", error); + LogNSError("LaundryWasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53884,25 +53657,25 @@ class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeLaundryWasherModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryDryerControlsClusterRevision() + ~SubscribeAttributeLaundryWasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryDryerControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryDryerControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53913,10 +53686,10 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53930,106 +53703,37 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class ModeSelectChangeToMode : public ClusterCommand { -public: - ModeSelectChangeToMode() - : ClusterCommand("change-to-mode") - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute Description + * Attribute FeatureMap */ -class ReadModeSelectDescription : public ReadAttribute { +class ReadLaundryWasherModeFeatureMap : public ReadAttribute { public: - ReadModeSelectDescription() - : ReadAttribute("description") + ReadLaundryWasherModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadModeSelectDescription() + ~ReadLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect Description read Error", error); + LogNSError("LaundryWasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54038,25 +53742,25 @@ class ReadModeSelectDescription : public ReadAttribute { } }; -class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectDescription() - : SubscribeAttribute("description") + SubscribeAttributeLaundryWasherModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectDescription() + ~SubscribeAttributeLaundryWasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54067,10 +53771,10 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54083,35 +53787,38 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute StandardNamespace + * Attribute ClusterRevision */ -class ReadModeSelectStandardNamespace : public ReadAttribute { +class ReadLaundryWasherModeClusterRevision : public ReadAttribute { public: - ReadModeSelectStandardNamespace() - : ReadAttribute("standard-namespace") + ReadLaundryWasherModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadModeSelectStandardNamespace() + ~ReadLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect StandardNamespace read Error", error); + LogNSError("LaundryWasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54120,25 +53827,25 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { } }; -class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStandardNamespace() - : SubscribeAttribute("standard-namespace") + SubscribeAttributeLaundryWasherModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectStandardNamespace() + ~SubscribeAttributeLaundryWasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StandardNamespace::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54149,10 +53856,10 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStandardNamespaceWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54165,35 +53872,121 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { +public: + RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() + : ClusterCommand("change-to-mode") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* * Attribute SupportedModes */ -class ReadModeSelectSupportedModes : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { public: - ReadModeSelectSupportedModes() + ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadModeSelectSupportedModes() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect SupportedModes read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54202,25 +53995,25 @@ class ReadModeSelectSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeModeSelectSupportedModes() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeModeSelectSupportedModes() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54234,7 +54027,7 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54247,35 +54040,38 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute CurrentMode */ -class ReadModeSelectCurrentMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { public: - ReadModeSelectCurrentMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadModeSelectCurrentMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect CurrentMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54284,25 +54080,25 @@ class ReadModeSelectCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectCurrentMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeModeSelectCurrentMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54316,7 +54112,7 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54329,35 +54125,38 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute StartUpMode */ -class ReadModeSelectStartUpMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { public: - ReadModeSelectStartUpMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadModeSelectStartUpMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect StartUpMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54366,9 +54165,9 @@ class ReadModeSelectStartUpMode : public ReadAttribute { } }; -class WriteModeSelectStartUpMode : public WriteAttribute { +class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { public: - WriteModeSelectStartUpMode() + WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -54376,18 +54175,18 @@ class WriteModeSelectStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteModeSelectStartUpMode() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -54398,7 +54197,7 @@ class WriteModeSelectStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54410,25 +54209,25 @@ class WriteModeSelectStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStartUpMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeModeSelectStartUpMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54442,7 +54241,7 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54455,35 +54254,38 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute OnMode */ -class ReadModeSelectOnMode : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { public: - ReadModeSelectOnMode() + ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() : ReadAttribute("on-mode") { } - ~ReadModeSelectOnMode() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect OnMode read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54492,9 +54294,9 @@ class ReadModeSelectOnMode : public ReadAttribute { } }; -class WriteModeSelectOnMode : public WriteAttribute { +class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { public: - WriteModeSelectOnMode() + WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -54502,18 +54304,18 @@ class WriteModeSelectOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteModeSelectOnMode() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -54524,7 +54326,7 @@ class WriteModeSelectOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54536,25 +54338,25 @@ class WriteModeSelectOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeModeSelectOnMode() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeModeSelectOnMode() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54568,7 +54370,7 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54581,35 +54383,38 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadModeSelectGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { public: - ReadModeSelectGeneratedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadModeSelectGeneratedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54618,25 +54423,25 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectGeneratedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeModeSelectGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54650,7 +54455,7 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54663,35 +54468,38 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadModeSelectAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { public: - ReadModeSelectAcceptedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadModeSelectAcceptedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54700,25 +54508,25 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAcceptedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeModeSelectAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54732,7 +54540,7 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54745,37 +54553,38 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadModeSelectEventList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { public: - ReadModeSelectEventList() + ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() : ReadAttribute("event-list") { } - ~ReadModeSelectEventList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect EventList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54784,25 +54593,25 @@ class ReadModeSelectEventList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectEventList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeModeSelectEventList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54816,7 +54625,7 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54830,36 +54639,37 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadModeSelectAttributeList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { public: - ReadModeSelectAttributeList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadModeSelectAttributeList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AttributeList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54868,25 +54678,25 @@ class ReadModeSelectAttributeList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAttributeList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectAttributeList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54900,7 +54710,7 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54913,35 +54723,38 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadModeSelectFeatureMap : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { public: - ReadModeSelectFeatureMap() + ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadModeSelectFeatureMap() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect FeatureMap read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54950,25 +54763,25 @@ class ReadModeSelectFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectFeatureMap() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectFeatureMap() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54982,7 +54795,7 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54995,35 +54808,38 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadModeSelectClusterRevision : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { public: - ReadModeSelectClusterRevision() + ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadModeSelectClusterRevision() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect ClusterRevision read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55032,25 +54848,25 @@ class ReadModeSelectClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectClusterRevision() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectClusterRevision() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ModeSelect::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ModeSelect::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55064,7 +54880,7 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55077,18 +54893,19 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherMode | 0x0051 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -55100,96 +54917,36 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL + /* - * Command ChangeToMode + * Attribute SpinSpeeds */ -class LaundryWasherModeChangeToMode : public ClusterCommand { +class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { public: - LaundryWasherModeChangeToMode() - : ClusterCommand("change-to-mode") + ReadLaundryWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") + { + } + + ~ReadLaundryWasherControlsSpinSpeeds() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute SupportedModes - */ -class ReadLaundryWasherModeSupportedModes : public ReadAttribute { -public: - ReadLaundryWasherModeSupportedModes() - : ReadAttribute("supported-modes") - { - } - - ~ReadLaundryWasherModeSupportedModes() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode SupportedModes read Error", error); + LogNSError("LaundryWasherControls SpinSpeeds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55198,25 +54955,25 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeLaundryWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") { } - ~SubscribeAttributeLaundryWasherModeSupportedModes() + ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55227,10 +54984,10 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeSpinSpeedsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55247,34 +55004,34 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute SpinSpeedCurrent */ -class ReadLaundryWasherModeCurrentMode : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { public: - ReadLaundryWasherModeCurrentMode() - : ReadAttribute("current-mode") + ReadLaundryWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") { } - ~ReadLaundryWasherModeCurrentMode() + ~ReadLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode CurrentMode read Error", error); + LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55283,25 +55040,69 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { +class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { public: - SubscribeAttributeLaundryWasherModeCurrentMode() - : SubscribeAttribute("current-mode") + WriteLaundryWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeLaundryWasherModeCurrentMode() + ~WriteLaundryWasherControlsSpinSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +public: + SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") + { + } + + ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55312,10 +55113,10 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSpinSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55332,34 +55133,34 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute StartUpMode + * Attribute NumberOfRinses */ -class ReadLaundryWasherModeStartUpMode : public ReadAttribute { +class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { public: - ReadLaundryWasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadLaundryWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") { } - ~ReadLaundryWasherModeStartUpMode() + ~ReadLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode StartUpMode read Error", error); + LogNSError("LaundryWasherControls NumberOfRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55368,39 +55169,36 @@ class ReadLaundryWasherModeStartUpMode : public ReadAttribute { } }; -class WriteLaundryWasherModeStartUpMode : public WriteAttribute { +class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { public: - WriteLaundryWasherModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteLaundryWasherControlsNumberOfRinses() + : WriteAttribute("number-of-rinses") { - AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-name", "number-of-rinses"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteLaundryWasherModeStartUpMode() + ~WriteLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherMode StartUpMode write Error", error); + LogNSError("LaundryWasherControls NumberOfRinses write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55409,28 +55207,28 @@ class WriteLaundryWasherModeStartUpMode : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeLaundryWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") { } - ~SubscribeAttributeLaundryWasherModeStartUpMode() + ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55441,10 +55239,10 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeNumberOfRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55461,105 +55259,61 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute SupportedRinses */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { +class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { public: - ReadLaundryWasherModeOnMode() - : ReadAttribute("on-mode") + ReadLaundryWasherControlsSupportedRinses() + : ReadAttribute("supported-rinses") { } - ~ReadLaundryWasherModeOnMode() + ~ReadLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherModeOnMode : public WriteAttribute { -public: - WriteLaundryWasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); + LogNSError("LaundryWasherControls SupportedRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeLaundryWasherControlsSupportedRinses() + : SubscribeAttribute("supported-rinses") { } - ~SubscribeAttributeLaundryWasherModeOnMode() + ~SubscribeAttributeLaundryWasherControlsSupportedRinses() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55570,10 +55324,10 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeSupportedRinsesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55592,32 +55346,32 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeGeneratedCommandList() + ReadLaundryWasherControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherModeGeneratedCommandList() + ~ReadLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55626,25 +55380,25 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeGeneratedCommandList() + SubscribeAttributeLaundryWasherControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() + ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55658,7 +55412,7 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55677,32 +55431,32 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeAcceptedCommandList() + ReadLaundryWasherControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherModeAcceptedCommandList() + ~ReadLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55711,25 +55465,25 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAcceptedCommandList() + SubscribeAttributeLaundryWasherControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() + ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55743,7 +55497,7 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55762,32 +55516,32 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA /* * Attribute EventList */ -class ReadLaundryWasherModeEventList : public ReadAttribute { +class ReadLaundryWasherControlsEventList : public ReadAttribute { public: - ReadLaundryWasherModeEventList() + ReadLaundryWasherControlsEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherModeEventList() + ~ReadLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode EventList read Error", error); + LogNSError("LaundryWasherControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55796,25 +55550,25 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeEventList() + SubscribeAttributeLaundryWasherControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherModeEventList() + ~SubscribeAttributeLaundryWasherControlsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55828,7 +55582,7 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55847,32 +55601,32 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadLaundryWasherModeAttributeList : public ReadAttribute { +class ReadLaundryWasherControlsAttributeList : public ReadAttribute { public: - ReadLaundryWasherModeAttributeList() + ReadLaundryWasherControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherModeAttributeList() + ~ReadLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AttributeList read Error", error); + LogNSError("LaundryWasherControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55881,25 +55635,25 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAttributeList() + SubscribeAttributeLaundryWasherControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherModeAttributeList() + ~SubscribeAttributeLaundryWasherControlsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55913,7 +55667,7 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55932,32 +55686,32 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu /* * Attribute FeatureMap */ -class ReadLaundryWasherModeFeatureMap : public ReadAttribute { +class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { public: - ReadLaundryWasherModeFeatureMap() + ReadLaundryWasherControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherModeFeatureMap() + ~ReadLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode FeatureMap read Error", error); + LogNSError("LaundryWasherControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55966,25 +55720,25 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeFeatureMap() + SubscribeAttributeLaundryWasherControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherModeFeatureMap() + ~SubscribeAttributeLaundryWasherControlsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55998,7 +55752,7 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56017,32 +55771,32 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadLaundryWasherModeClusterRevision : public ReadAttribute { +class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { public: - ReadLaundryWasherModeClusterRevision() + ReadLaundryWasherControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherModeClusterRevision() + ~ReadLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode ClusterRevision read Error", error); + LogNSError("LaundryWasherControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56051,25 +55805,25 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeClusterRevision() + SubscribeAttributeLaundryWasherControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherModeClusterRevision() + ~SubscribeAttributeLaundryWasherControlsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56083,7 +55837,7 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56098,9 +55852,8 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster RvcRunMode | 0x0054 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -56108,8 +55861,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -56120,50 +55871,45 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { +class RvcRunModeChangeToMode : public ClusterCommand { public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() + RvcRunModeChangeToMode() : ClusterCommand("change-to-mode") { -#if MTR_ENABLE_PROVISIONAL AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -56175,42 +55921,38 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust } private: - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { +class ReadRvcRunModeSupportedModes : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ReadRvcRunModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~ReadRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + LogNSError("RVCRunMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56219,25 +55961,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + SubscribeAttributeRvcRunModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~SubscribeAttributeRvcRunModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56251,7 +55993,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56264,38 +56006,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { +class ReadRvcRunModeCurrentMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ReadRvcRunModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~ReadRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); + LogNSError("RVCRunMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56304,25 +56043,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + SubscribeAttributeRvcRunModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~SubscribeAttributeRvcRunModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56336,7 +56075,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56349,109 +56088,62 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMo } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute StartUpMode + * Attribute GeneratedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public ReadAttribute { +class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadRvcRunModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + ~ReadRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); + LogNSError("RVCRunMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeRvcRunModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + ~SubscribeAttributeRvcRunModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56462,10 +56154,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.StartUpMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56478,109 +56170,62 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OnMode + * Attribute AcceptedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { +class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : ReadAttribute("on-mode") + ReadRvcRunModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~ReadRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { -public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + LogNSError("RVCRunMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeRvcRunModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~SubscribeAttributeRvcRunModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56591,10 +56236,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56607,38 +56252,37 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { +class ReadRvcRunModeEventList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRvcRunModeEventList() + : ReadAttribute("event-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~ReadRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + LogNSError("RVCRunMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56647,25 +56291,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRvcRunModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~SubscribeAttributeRvcRunModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56676,10 +56320,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56693,37 +56337,36 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { +class ReadRvcRunModeAttributeList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRvcRunModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~ReadRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + LogNSError("RVCRunMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56732,25 +56375,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRvcRunModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~SubscribeAttributeRvcRunModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56761,10 +56404,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56777,38 +56420,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { +class ReadRvcRunModeFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() - : ReadAttribute("event-list") + ReadRvcRunModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~ReadRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + LogNSError("RVCRunMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56817,25 +56457,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRvcRunModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~SubscribeAttributeRvcRunModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56846,10 +56486,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56862,38 +56502,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { +class ReadRvcRunModeClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() - : ReadAttribute("attribute-list") + ReadRvcRunModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~ReadRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + LogNSError("RVCRunMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56902,25 +56539,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRvcRunModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~SubscribeAttributeRvcRunModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -56931,10 +56568,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56947,65 +56584,134 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RvcCleanMode | 0x0055 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute FeatureMap + * Command ChangeToMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { +class RvcCleanModeChangeToMode : public ClusterCommand { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + RvcCleanModeChangeToMode() + : ClusterCommand("change-to-mode") { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { +/* + * Attribute SupportedModes + */ +class ReadRvcCleanModeSupportedModes : public ReadAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() - : SubscribeAttribute("feature-map") + ReadRvcCleanModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~ReadRvcCleanModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCCleanMode SupportedModes read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { +public: + SubscribeAttributeRvcCleanModeSupportedModes() + : SubscribeAttribute("supported-modes") + { + } + + ~SubscribeAttributeRvcCleanModeSupportedModes() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57016,10 +56722,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57032,38 +56738,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute CurrentMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { +class ReadRvcCleanModeCurrentMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadRvcCleanModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~ReadRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + LogNSError("RVCCleanMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57072,25 +56775,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRvcCleanModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~SubscribeAttributeRvcCleanModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57101,10 +56804,10 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57117,60 +56820,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherControls | 0x0053 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * SupportedRinses | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpinSpeeds + * Attribute GeneratedCommandList */ -class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { +class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeeds() - : ReadAttribute("spin-speeds") + ReadRvcCleanModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherControlsSpinSpeeds() + ~ReadRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SpinSpeeds read Error", error); + LogNSError("RVCCleanMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57179,25 +56857,25 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeeds() - : SubscribeAttribute("spin-speeds") + SubscribeAttributeRvcCleanModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() + ~SubscribeAttributeRvcCleanModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeeds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57208,10 +56886,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57224,109 +56902,62 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SpinSpeedCurrent + * Attribute AcceptedCommandList */ -class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { +class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeedCurrent() - : ReadAttribute("spin-speed-current") + ReadRvcCleanModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherControlsSpinSpeedCurrent() + ~ReadRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { -public: - WriteLaundryWasherControlsSpinSpeedCurrent() - : WriteAttribute("spin-speed-current") - { - AddArgument("attr-name", "spin-speed-current"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherControlsSpinSpeedCurrent() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + LogNSError("RVCCleanMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() - : SubscribeAttribute("spin-speed-current") + SubscribeAttributeRvcCleanModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeRvcCleanModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SpinSpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57337,10 +56968,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedCurrentWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57353,106 +56984,64 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfRinses + * Attribute EventList */ -class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { +class ReadRvcCleanModeEventList : public ReadAttribute { public: - ReadLaundryWasherControlsNumberOfRinses() - : ReadAttribute("number-of-rinses") + ReadRvcCleanModeEventList() + : ReadAttribute("event-list") { } - ~ReadLaundryWasherControlsNumberOfRinses() + ~ReadRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls NumberOfRinses read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { -public: - WriteLaundryWasherControlsNumberOfRinses() - : WriteAttribute("number-of-rinses") - { - AddArgument("attr-name", "number-of-rinses"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLaundryWasherControlsNumberOfRinses() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + LogNSError("RVCCleanMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsNumberOfRinses() - : SubscribeAttribute("number-of-rinses") + SubscribeAttributeRvcCleanModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() + ~SubscribeAttributeRvcCleanModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::NumberOfRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57463,10 +57052,10 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRinsesWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57480,37 +57069,36 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedRinses + * Attribute AttributeList */ -class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { +class ReadRvcCleanModeAttributeList : public ReadAttribute { public: - ReadLaundryWasherControlsSupportedRinses() - : ReadAttribute("supported-rinses") + ReadRvcCleanModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherControlsSupportedRinses() + ~ReadRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedRinsesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls SupportedRinses read Error", error); + LogNSError("RVCCleanMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57519,25 +57107,25 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSupportedRinses() - : SubscribeAttribute("supported-rinses") + SubscribeAttributeRvcCleanModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherControlsSupportedRinses() + ~SubscribeAttributeRvcCleanModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::SupportedRinses::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57548,10 +57136,10 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedRinsesWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57564,38 +57152,35 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { +class ReadRvcCleanModeFeatureMap : public ReadAttribute { public: - ReadLaundryWasherControlsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRvcCleanModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadLaundryWasherControlsGeneratedCommandList() + ~ReadRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + LogNSError("RVCCleanMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57604,25 +57189,25 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRvcCleanModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + ~SubscribeAttributeRvcCleanModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57633,10 +57218,10 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57649,38 +57234,35 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { +class ReadRvcCleanModeClusterRevision : public ReadAttribute { public: - ReadLaundryWasherControlsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRvcCleanModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherControlsAcceptedCommandList() + ~ReadRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + LogNSError("RVCCleanMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57689,25 +57271,25 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRvcCleanModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + ~SubscribeAttributeRvcCleanModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57718,10 +57300,10 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57734,38 +57316,129 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureControl | 0x0056 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetTemperature | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTemperature + */ +class TemperatureControlSetTemperature : public ClusterCommand { +public: + TemperatureControlSetTemperature() + : ClusterCommand("set-temperature") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperature.HasValue()) { + params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; + } else { + params.targetTemperature = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.targetTemperatureLevel.HasValue()) { + params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; + } else { + params.targetTemperatureLevel = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTemperatureWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; +}; + #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute TemperatureSetpoint */ -class ReadLaundryWasherControlsEventList : public ReadAttribute { +class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { public: - ReadLaundryWasherControlsEventList() - : ReadAttribute("event-list") + ReadTemperatureControlTemperatureSetpoint() + : ReadAttribute("temperature-setpoint") { } - ~ReadLaundryWasherControlsEventList() + ~ReadTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls EventList read Error", error); + LogNSError("TemperatureControl TemperatureSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57774,25 +57447,25 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTemperatureControlTemperatureSetpoint() + : SubscribeAttribute("temperature-setpoint") { } - ~SubscribeAttributeLaundryWasherControlsEventList() + ~SubscribeAttributeTemperatureControlTemperatureSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57803,10 +57476,10 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTemperatureSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57823,34 +57496,34 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute MinTemperature */ -class ReadLaundryWasherControlsAttributeList : public ReadAttribute { +class ReadTemperatureControlMinTemperature : public ReadAttribute { public: - ReadLaundryWasherControlsAttributeList() - : ReadAttribute("attribute-list") + ReadTemperatureControlMinTemperature() + : ReadAttribute("min-temperature") { } - ~ReadLaundryWasherControlsAttributeList() + ~ReadTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AttributeList read Error", error); + LogNSError("TemperatureControl MinTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57859,25 +57532,25 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTemperatureControlMinTemperature() + : SubscribeAttribute("min-temperature") { } - ~SubscribeAttributeLaundryWasherControlsAttributeList() + ~SubscribeAttributeTemperatureControlMinTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57888,10 +57561,10 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57908,34 +57581,34 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute MaxTemperature */ -class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { +class ReadTemperatureControlMaxTemperature : public ReadAttribute { public: - ReadLaundryWasherControlsFeatureMap() - : ReadAttribute("feature-map") + ReadTemperatureControlMaxTemperature() + : ReadAttribute("max-temperature") { } - ~ReadLaundryWasherControlsFeatureMap() + ~ReadTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls FeatureMap read Error", error); + LogNSError("TemperatureControl MaxTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57944,25 +57617,25 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTemperatureControlMaxTemperature() + : SubscribeAttribute("max-temperature") { } - ~SubscribeAttributeLaundryWasherControlsFeatureMap() + ~SubscribeAttributeTemperatureControlMaxTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -57973,10 +57646,10 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57993,34 +57666,34 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute Step */ -class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { +class ReadTemperatureControlStep : public ReadAttribute { public: - ReadLaundryWasherControlsClusterRevision() - : ReadAttribute("cluster-revision") + ReadTemperatureControlStep() + : ReadAttribute("step") { } - ~ReadLaundryWasherControlsClusterRevision() + ~ReadTemperatureControlStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.Step response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls ClusterRevision read Error", error); + LogNSError("TemperatureControl Step read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58029,25 +57702,25 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTemperatureControlStep() + : SubscribeAttribute("step") { } - ~SubscribeAttributeLaundryWasherControlsClusterRevision() + ~SubscribeAttributeTemperatureControlStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LaundryWasherControls::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LaundryWasherControls::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58058,10 +57731,10 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.Step response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58075,108 +57748,37 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster RvcRunMode | 0x0054 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class RvcRunModeChangeToMode : public ClusterCommand { -public: - RvcRunModeChangeToMode() - : ClusterCommand("change-to-mode") - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute SelectedTemperatureLevel */ -class ReadRvcRunModeSupportedModes : public ReadAttribute { +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { public: - ReadRvcRunModeSupportedModes() - : ReadAttribute("supported-modes") + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") { } - ~ReadRvcRunModeSupportedModes() + ~ReadTemperatureControlSelectedTemperatureLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode SupportedModes read Error", error); + LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58185,25 +57787,25 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") { } - ~SubscribeAttributeRvcRunModeSupportedModes() + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58214,10 +57816,10 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58230,35 +57832,38 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMode + * Attribute SupportedTemperatureLevels */ -class ReadRvcRunModeCurrentMode : public ReadAttribute { +class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { public: - ReadRvcRunModeCurrentMode() - : ReadAttribute("current-mode") + ReadTemperatureControlSupportedTemperatureLevels() + : ReadAttribute("supported-temperature-levels") { } - ~ReadRvcRunModeCurrentMode() + ~ReadTemperatureControlSupportedTemperatureLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode CurrentMode read Error", error); + LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58267,25 +57872,25 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + : SubscribeAttribute("supported-temperature-levels") { } - ~SubscribeAttributeRvcRunModeCurrentMode() + ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58296,10 +57901,10 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58312,35 +57917,38 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { +class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { public: - ReadRvcRunModeGeneratedCommandList() + ReadTemperatureControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcRunModeGeneratedCommandList() + ~ReadTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode GeneratedCommandList read Error", error); + LogNSError("TemperatureControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58349,25 +57957,25 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeGeneratedCommandList() + SubscribeAttributeTemperatureControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcRunModeGeneratedCommandList() + ~SubscribeAttributeTemperatureControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58381,7 +57989,7 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58394,35 +58002,38 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { +class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { public: - ReadRvcRunModeAcceptedCommandList() + ReadTemperatureControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcRunModeAcceptedCommandList() + ~ReadTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AcceptedCommandList read Error", error); + LogNSError("TemperatureControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58431,25 +58042,25 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAcceptedCommandList() + SubscribeAttributeTemperatureControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcRunModeAcceptedCommandList() + ~SubscribeAttributeTemperatureControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58463,7 +58074,7 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58476,37 +58087,38 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcRunModeEventList : public ReadAttribute { +class ReadTemperatureControlEventList : public ReadAttribute { public: - ReadRvcRunModeEventList() + ReadTemperatureControlEventList() : ReadAttribute("event-list") { } - ~ReadRvcRunModeEventList() + ~ReadTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode EventList read Error", error); + LogNSError("TemperatureControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58515,25 +58127,25 @@ class ReadRvcRunModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeEventList() + SubscribeAttributeTemperatureControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcRunModeEventList() + ~SubscribeAttributeTemperatureControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58547,7 +58159,7 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58561,36 +58173,37 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcRunModeAttributeList : public ReadAttribute { +class ReadTemperatureControlAttributeList : public ReadAttribute { public: - ReadRvcRunModeAttributeList() + ReadTemperatureControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcRunModeAttributeList() + ~ReadTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AttributeList read Error", error); + LogNSError("TemperatureControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58599,25 +58212,25 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAttributeList() + SubscribeAttributeTemperatureControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcRunModeAttributeList() + ~SubscribeAttributeTemperatureControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58631,7 +58244,7 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58644,35 +58257,38 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcRunModeFeatureMap : public ReadAttribute { +class ReadTemperatureControlFeatureMap : public ReadAttribute { public: - ReadRvcRunModeFeatureMap() + ReadTemperatureControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcRunModeFeatureMap() + ~ReadTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode FeatureMap read Error", error); + LogNSError("TemperatureControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58681,25 +58297,25 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeFeatureMap() + SubscribeAttributeTemperatureControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcRunModeFeatureMap() + ~SubscribeAttributeTemperatureControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58713,7 +58329,7 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58726,35 +58342,38 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcRunModeClusterRevision : public ReadAttribute { +class ReadTemperatureControlClusterRevision : public ReadAttribute { public: - ReadRvcRunModeClusterRevision() + ReadTemperatureControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcRunModeClusterRevision() + ~ReadTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode ClusterRevision read Error", error); + LogNSError("TemperatureControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58763,25 +58382,25 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeClusterRevision() + SubscribeAttributeTemperatureControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcRunModeClusterRevision() + ~SubscribeAttributeTemperatureControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcRunMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcRunMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58795,7 +58414,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58808,15 +58427,18 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcCleanMode | 0x0055 | +| Cluster RefrigeratorAlarm | 0x0057 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | +| * Mask | 0x0000 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -58825,90 +58447,125 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL + /* - * Command ChangeToMode + * Attribute Mask */ -class RvcCleanModeChangeToMode : public ClusterCommand { +class ReadRefrigeratorAlarmMask : public ReadAttribute { public: - RvcCleanModeChangeToMode() - : ClusterCommand("change-to-mode") + ReadRefrigeratorAlarmMask() + : ReadAttribute("mask") + { + } + + ~ReadRefrigeratorAlarmMask() { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RefrigeratorAlarm Mask read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; +class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { +public: + SubscribeAttributeRefrigeratorAlarmMask() + : SubscribeAttribute("mask") + { + } + + ~SubscribeAttributeRefrigeratorAlarmMask() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaskWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedModes + * Attribute State */ -class ReadRvcCleanModeSupportedModes : public ReadAttribute { +class ReadRefrigeratorAlarmState : public ReadAttribute { public: - ReadRvcCleanModeSupportedModes() - : ReadAttribute("supported-modes") + ReadRefrigeratorAlarmState() + : ReadAttribute("state") { } - ~ReadRvcCleanModeSupportedModes() + ~ReadRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode SupportedModes read Error", error); + LogNSError("RefrigeratorAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58917,25 +58574,25 @@ class ReadRvcCleanModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeRefrigeratorAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeRvcCleanModeSupportedModes() + ~SubscribeAttributeRefrigeratorAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58946,10 +58603,10 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58962,35 +58619,38 @@ class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMode + * Attribute Supported */ -class ReadRvcCleanModeCurrentMode : public ReadAttribute { +class ReadRefrigeratorAlarmSupported : public ReadAttribute { public: - ReadRvcCleanModeCurrentMode() - : ReadAttribute("current-mode") + ReadRefrigeratorAlarmSupported() + : ReadAttribute("supported") { } - ~ReadRvcCleanModeCurrentMode() + ~ReadRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode CurrentMode read Error", error); + LogNSError("RefrigeratorAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58999,25 +58659,25 @@ class ReadRvcCleanModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeRefrigeratorAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeRvcCleanModeCurrentMode() + ~SubscribeAttributeRefrigeratorAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59028,10 +58688,10 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59044,35 +58704,38 @@ class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { public: - ReadRvcCleanModeGeneratedCommandList() + ReadRefrigeratorAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcCleanModeGeneratedCommandList() + ~ReadRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59081,25 +58744,25 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeGeneratedCommandList() + SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcCleanModeGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59113,7 +58776,7 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59126,35 +58789,38 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { public: - ReadRvcCleanModeAcceptedCommandList() + ReadRefrigeratorAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcCleanModeAcceptedCommandList() + ~ReadRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59163,25 +58829,25 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAcceptedCommandList() + SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcCleanModeAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59195,7 +58861,7 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59208,37 +58874,38 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcCleanModeEventList : public ReadAttribute { +class ReadRefrigeratorAlarmEventList : public ReadAttribute { public: - ReadRvcCleanModeEventList() + ReadRefrigeratorAlarmEventList() : ReadAttribute("event-list") { } - ~ReadRvcCleanModeEventList() + ~ReadRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode EventList read Error", error); + LogNSError("RefrigeratorAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59247,25 +58914,25 @@ class ReadRvcCleanModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeEventList() + SubscribeAttributeRefrigeratorAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcCleanModeEventList() + ~SubscribeAttributeRefrigeratorAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59279,7 +58946,7 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59293,36 +58960,37 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcCleanModeAttributeList : public ReadAttribute { +class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { public: - ReadRvcCleanModeAttributeList() + ReadRefrigeratorAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcCleanModeAttributeList() + ~ReadRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode AttributeList read Error", error); + LogNSError("RefrigeratorAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59331,25 +58999,25 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAttributeList() + SubscribeAttributeRefrigeratorAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcCleanModeAttributeList() + ~SubscribeAttributeRefrigeratorAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59363,7 +59031,7 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59376,35 +59044,38 @@ class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcCleanModeFeatureMap : public ReadAttribute { +class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { public: - ReadRvcCleanModeFeatureMap() + ReadRefrigeratorAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcCleanModeFeatureMap() + ~ReadRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode FeatureMap read Error", error); + LogNSError("RefrigeratorAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59413,25 +59084,25 @@ class ReadRvcCleanModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeFeatureMap() + SubscribeAttributeRefrigeratorAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcCleanModeFeatureMap() + ~SubscribeAttributeRefrigeratorAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59445,7 +59116,7 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59458,35 +59129,38 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcCleanModeClusterRevision : public ReadAttribute { +class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { public: - ReadRvcCleanModeClusterRevision() + ReadRefrigeratorAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcCleanModeClusterRevision() + ~ReadRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode ClusterRevision read Error", error); + LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59495,25 +59169,25 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeClusterRevision() + SubscribeAttributeRefrigeratorAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcCleanModeClusterRevision() + ~SubscribeAttributeRefrigeratorAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcCleanMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcCleanMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59527,7 +59201,7 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59540,20 +59214,20 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster TemperatureControl | 0x0056 | +| Cluster DishwasherMode | 0x0059 | |------------------------------------------------------------------------------| | Commands: | | -| * SetTemperature | 0x00 | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * TemperatureSetpoint | 0x0000 | -| * MinTemperature | 0x0001 | -| * MaxTemperature | 0x0002 | -| * Step | 0x0003 | -| * SelectedTemperatureLevel | 0x0004 | -| * SupportedTemperatureLevels | 0x0005 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -59566,68 +59240,60 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Command SetTemperature + * Command ChangeToMode */ -class TemperatureControlSetTemperature : public ClusterCommand { +class DishwasherModeChangeToMode : public ClusterCommand { public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") + DishwasherModeChangeToMode() + : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperature", INT16_MIN, INT16_MAX, &mRequest.targetTemperature); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TargetTemperatureLevel", 0, UINT8_MAX, &mRequest.targetTemperatureLevel); + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperature.HasValue()) { - params.targetTemperature = [NSNumber numberWithShort:mRequest.targetTemperature.Value()]; - } else { - params.targetTemperature = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.targetTemperatureLevel.HasValue()) { - params.targetTemperatureLevel = [NSNumber numberWithUnsignedChar:mRequest.targetTemperatureLevel.Value()]; - } else { - params.targetTemperatureLevel = nil; - } + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setTemperatureWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster changeToModeWithParams:params completion: + ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -59635,34 +59301,34 @@ class TemperatureControlSetTemperature : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TemperatureSetpoint + * Attribute SupportedModes */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +class ReadDishwasherModeSupportedModes : public ReadAttribute { public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") + ReadDishwasherModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadTemperatureControlTemperatureSetpoint() + ~ReadDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + LogNSError("DishwasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59671,25 +59337,25 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + SubscribeAttributeDishwasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() + ~SubscribeAttributeDishwasherModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::TemperatureSetpoint::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59700,10 +59366,10 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.TemperatureSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59720,34 +59386,34 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinTemperature + * Attribute CurrentMode */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class ReadDishwasherModeCurrentMode : public ReadAttribute { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + ReadDishwasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadTemperatureControlMinTemperature() + ~ReadDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MinTemperature read Error", error); + LogNSError("DishwasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59756,25 +59422,25 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + SubscribeAttributeDishwasherModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeTemperatureControlMinTemperature() + ~SubscribeAttributeDishwasherModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59785,10 +59451,10 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinTemperatureWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59805,34 +59471,34 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxTemperature + * Attribute StartUpMode */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { +class ReadDishwasherModeStartUpMode : public ReadAttribute { public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") + ReadDishwasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadTemperatureControlMaxTemperature() + ~ReadDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl MaxTemperature read Error", error); + LogNSError("DishwasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59841,110 +59507,69 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +class WriteDishwasherModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + WriteDishwasherModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlMaxTemperature() + ~WriteDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeMaxTemperatureWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute Step - */ -class ReadTemperatureControlStep : public ReadAttribute { -public: - ReadTemperatureControlStep() - : ReadAttribute("step") - { - } - - ~ReadTemperatureControlStep() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl Step read Error", error); + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + SubscribeAttributeDishwasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeTemperatureControlStep() + ~SubscribeAttributeDishwasherModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59955,10 +59580,10 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStepWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59975,34 +59600,34 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedTemperatureLevel + * Attribute OnMode */ -class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +class ReadDishwasherModeOnMode : public ReadAttribute { public: - ReadTemperatureControlSelectedTemperatureLevel() - : ReadAttribute("selected-temperature-level") + ReadDishwasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadTemperatureControlSelectedTemperatureLevel() + ~ReadDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedTemperatureLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + LogNSError("DishwasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60011,110 +59636,69 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +class WriteDishwasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeTemperatureControlSelectedTemperatureLevel() - : SubscribeAttribute("selected-temperature-level") + WriteDishwasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + ~WriteDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute SupportedTemperatureLevels - */ -class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { -public: - ReadTemperatureControlSupportedTemperatureLevels() - : ReadAttribute("supported-temperature-levels") - { - } - - ~ReadTemperatureControlSupportedTemperatureLevels() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DishwasherMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - : SubscribeAttribute("supported-temperature-levels") + SubscribeAttributeDishwasherModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + ~SubscribeAttributeDishwasherModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SupportedTemperatureLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60125,10 +59709,10 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60147,32 +59731,32 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su /* * Attribute GeneratedCommandList */ -class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { +class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureControlGeneratedCommandList() + ReadDishwasherModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTemperatureControlGeneratedCommandList() + ~ReadDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl GeneratedCommandList read Error", error); + LogNSError("DishwasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60181,25 +59765,25 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlGeneratedCommandList() + SubscribeAttributeDishwasherModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureControlGeneratedCommandList() + ~SubscribeAttributeDishwasherModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60213,7 +59797,7 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60232,32 +59816,32 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { +class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureControlAcceptedCommandList() + ReadDishwasherModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureControlAcceptedCommandList() + ~ReadDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AcceptedCommandList read Error", error); + LogNSError("DishwasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60266,25 +59850,25 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAcceptedCommandList() + SubscribeAttributeDishwasherModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureControlAcceptedCommandList() + ~SubscribeAttributeDishwasherModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60298,7 +59882,7 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60317,32 +59901,32 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadTemperatureControlEventList : public ReadAttribute { +class ReadDishwasherModeEventList : public ReadAttribute { public: - ReadTemperatureControlEventList() + ReadDishwasherModeEventList() : ReadAttribute("event-list") { } - ~ReadTemperatureControlEventList() + ~ReadDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl EventList read Error", error); + LogNSError("DishwasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60351,25 +59935,25 @@ class ReadTemperatureControlEventList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlEventList() + SubscribeAttributeDishwasherModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureControlEventList() + ~SubscribeAttributeDishwasherModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60383,7 +59967,7 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"DishwasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60402,32 +59986,32 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadTemperatureControlAttributeList : public ReadAttribute { +class ReadDishwasherModeAttributeList : public ReadAttribute { public: - ReadTemperatureControlAttributeList() + ReadDishwasherModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTemperatureControlAttributeList() + ~ReadDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AttributeList read Error", error); + LogNSError("DishwasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60436,25 +60020,25 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAttributeList() + SubscribeAttributeDishwasherModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureControlAttributeList() + ~SubscribeAttributeDishwasherModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60468,7 +60052,7 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"DishwasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60487,32 +60071,32 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadTemperatureControlFeatureMap : public ReadAttribute { +class ReadDishwasherModeFeatureMap : public ReadAttribute { public: - ReadTemperatureControlFeatureMap() + ReadDishwasherModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTemperatureControlFeatureMap() + ~ReadDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl FeatureMap read Error", error); + LogNSError("DishwasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60521,25 +60105,25 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlFeatureMap() + SubscribeAttributeDishwasherModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureControlFeatureMap() + ~SubscribeAttributeDishwasherModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60553,7 +60137,7 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60572,32 +60156,32 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadTemperatureControlClusterRevision : public ReadAttribute { +class ReadDishwasherModeClusterRevision : public ReadAttribute { public: - ReadTemperatureControlClusterRevision() + ReadDishwasherModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTemperatureControlClusterRevision() + ~ReadDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl ClusterRevision read Error", error); + LogNSError("DishwasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60606,25 +60190,25 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlClusterRevision() + SubscribeAttributeDishwasherModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureControlClusterRevision() + ~SubscribeAttributeDishwasherModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60638,7 +60222,7 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60653,16 +60237,13 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | +| Cluster AirQuality | 0x005B | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 0x0003 | +| * AirQuality | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -60671,210 +60252,37 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute Mask - */ -class ReadRefrigeratorAlarmMask : public ReadAttribute { -public: - ReadRefrigeratorAlarmMask() - : ReadAttribute("mask") - { - } - - ~ReadRefrigeratorAlarmMask() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAlarm Mask read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAlarmMask() - : SubscribeAttribute("mask") - { - } - - ~SubscribeAttributeRefrigeratorAlarmMask() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Mask::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaskWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute State - */ -class ReadRefrigeratorAlarmState : public ReadAttribute { -public: - ReadRefrigeratorAlarmState() - : ReadAttribute("state") - { - } - - ~ReadRefrigeratorAlarmState() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RefrigeratorAlarm State read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { -public: - SubscribeAttributeRefrigeratorAlarmState() - : SubscribeAttribute("state") - { - } - - ~SubscribeAttributeRefrigeratorAlarmState() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::State::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Supported + * Attribute AirQuality */ -class ReadRefrigeratorAlarmSupported : public ReadAttribute { +class ReadAirQualityAirQuality : public ReadAttribute { public: - ReadRefrigeratorAlarmSupported() - : ReadAttribute("supported") + ReadAirQualityAirQuality() + : ReadAttribute("air-quality") { } - ~ReadRefrigeratorAlarmSupported() + ~ReadAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm Supported read Error", error); + LogNSError("AirQuality AirQuality read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60883,25 +60291,25 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeAirQualityAirQuality() + : SubscribeAttribute("air-quality") { } - ~SubscribeAttributeRefrigeratorAlarmSupported() + ~SubscribeAttributeAirQualityAirQuality() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60912,10 +60320,10 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeAirQualityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + NSLog(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60928,38 +60336,35 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { +class ReadAirQualityGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmGeneratedCommandList() + ReadAirQualityGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAlarmGeneratedCommandList() + ~ReadAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); + LogNSError("AirQuality GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60968,25 +60373,25 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + SubscribeAttributeAirQualityGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + ~SubscribeAttributeAirQualityGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61000,7 +60405,7 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61013,38 +60418,35 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { +class ReadAirQualityAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAlarmAcceptedCommandList() + ReadAirQualityAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAlarmAcceptedCommandList() + ~ReadAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); + LogNSError("AirQuality AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61053,25 +60455,25 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + SubscribeAttributeAirQualityAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + ~SubscribeAttributeAirQualityAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61085,7 +60487,7 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61098,38 +60500,37 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRefrigeratorAlarmEventList : public ReadAttribute { +class ReadAirQualityEventList : public ReadAttribute { public: - ReadRefrigeratorAlarmEventList() + ReadAirQualityEventList() : ReadAttribute("event-list") { } - ~ReadRefrigeratorAlarmEventList() + ~ReadAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm EventList read Error", error); + LogNSError("AirQuality EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61138,25 +60539,25 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmEventList() + SubscribeAttributeAirQualityEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAlarmEventList() + ~SubscribeAttributeAirQualityEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61170,7 +60571,7 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61184,37 +60585,36 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { +class ReadAirQualityAttributeList : public ReadAttribute { public: - ReadRefrigeratorAlarmAttributeList() + ReadAirQualityAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAlarmAttributeList() + ~ReadAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm AttributeList read Error", error); + LogNSError("AirQuality AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61223,25 +60623,25 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAttributeList() + SubscribeAttributeAirQualityAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAlarmAttributeList() + ~SubscribeAttributeAirQualityAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61255,7 +60655,7 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61268,38 +60668,35 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { +class ReadAirQualityFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAlarmFeatureMap() + ReadAirQualityFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAlarmFeatureMap() + ~ReadAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm FeatureMap read Error", error); + LogNSError("AirQuality FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61308,25 +60705,25 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmFeatureMap() + SubscribeAttributeAirQualityFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAlarmFeatureMap() + ~SubscribeAttributeAirQualityFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61340,7 +60737,7 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61353,38 +60750,35 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { +class ReadAirQualityClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAlarmClusterRevision() + ReadAirQualityClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAlarmClusterRevision() + ~ReadAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); + LogNSError("AirQuality ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61393,25 +60787,25 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmClusterRevision() + SubscribeAttributeAirQualityClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAlarmClusterRevision() + ~SubscribeAttributeAirQualityClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RefrigeratorAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RefrigeratorAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61425,7 +60819,7 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61438,20 +60832,26 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DishwasherMode | 0x0059 | +| Cluster SmokeCoAlarm | 0x005C | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * SelfTestRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * ExpressedState | 0x0000 | +| * SmokeState | 0x0001 | +| * COState | 0x0002 | +| * BatteryAlert | 0x0003 | +| * DeviceMuted | 0x0004 | +| * TestInProgress | 0x0005 | +| * HardwareFaultAlert | 0x0006 | +| * EndOfServiceAlert | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * ContaminationState | 0x000A | +| * SmokeSensitivityLevel | 0x000B | +| * ExpiryDate | 0x000C | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -61460,99 +60860,92 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SmokeAlarm | 0x0000 | +| * COAlarm | 0x0001 | +| * LowBattery | 0x0002 | +| * HardwareFault | 0x0003 | +| * EndOfService | 0x0004 | +| * SelfTestComplete | 0x0005 | +| * AlarmMuted | 0x0006 | +| * MuteEnded | 0x0007 | +| * InterconnectSmokeAlarm | 0x0008 | +| * InterconnectCOAlarm | 0x0009 | +| * AllClear | 0x000A | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeToMode + * Command SelfTestRequest */ -class DishwasherModeChangeToMode : public ClusterCommand { +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - DishwasherModeChangeToMode() - : ClusterCommand("change-to-mode") + SmokeCoAlarmSelfTestRequest() + : ClusterCommand("self-test-request") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster selfTestRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedModes + * Attribute ExpressedState */ -class ReadDishwasherModeSupportedModes : public ReadAttribute { +class ReadSmokeCoAlarmExpressedState : public ReadAttribute { public: - ReadDishwasherModeSupportedModes() - : ReadAttribute("supported-modes") + ReadSmokeCoAlarmExpressedState() + : ReadAttribute("expressed-state") { } - ~ReadDishwasherModeSupportedModes() + ~ReadSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode SupportedModes read Error", error); + LogNSError("SmokeCOAlarm ExpressedState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61561,25 +60954,25 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeSmokeCoAlarmExpressedState() + : SubscribeAttribute("expressed-state") { } - ~SubscribeAttributeDishwasherModeSupportedModes() + ~SubscribeAttributeSmokeCoAlarmExpressedState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61590,10 +60983,10 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeExpressedStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61606,38 +60999,35 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CurrentMode + * Attribute SmokeState */ -class ReadDishwasherModeCurrentMode : public ReadAttribute { +class ReadSmokeCoAlarmSmokeState : public ReadAttribute { public: - ReadDishwasherModeCurrentMode() - : ReadAttribute("current-mode") + ReadSmokeCoAlarmSmokeState() + : ReadAttribute("smoke-state") { } - ~ReadDishwasherModeCurrentMode() + ~ReadSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode CurrentMode read Error", error); + LogNSError("SmokeCOAlarm SmokeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61646,25 +61036,25 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeSmokeCoAlarmSmokeState() + : SubscribeAttribute("smoke-state") { } - ~SubscribeAttributeDishwasherModeCurrentMode() + ~SubscribeAttributeSmokeCoAlarmSmokeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61675,10 +61065,10 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeSmokeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61691,109 +61081,62 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute StartUpMode + * Attribute COState */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { +class ReadSmokeCoAlarmCOState : public ReadAttribute { public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadSmokeCoAlarmCOState() + : ReadAttribute("costate") { } - ~ReadDishwasherModeStartUpMode() + ~ReadSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeStartUpMode : public WriteAttribute { -public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeStartUpMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); + LogNSError("SmokeCOAlarm COState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeSmokeCoAlarmCOState() + : SubscribeAttribute("costate") { } - ~SubscribeAttributeDishwasherModeStartUpMode() + ~SubscribeAttributeSmokeCoAlarmCOState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61804,10 +61147,10 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeCOStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61820,109 +61163,62 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OnMode + * Attribute BatteryAlert */ -class ReadDishwasherModeOnMode : public ReadAttribute { +class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") + ReadSmokeCoAlarmBatteryAlert() + : ReadAttribute("battery-alert") { } - ~ReadDishwasherModeOnMode() + ~ReadSmokeCoAlarmBatteryAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeOnMode : public WriteAttribute { -public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeOnMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); + LogNSError("SmokeCOAlarm BatteryAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeSmokeCoAlarmBatteryAlert() + : SubscribeAttribute("battery-alert") { } - ~SubscribeAttributeDishwasherModeOnMode() + ~SubscribeAttributeSmokeCoAlarmBatteryAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61933,10 +61229,10 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeBatteryAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61949,38 +61245,35 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute DeviceMuted */ -class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { public: - ReadDishwasherModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadSmokeCoAlarmDeviceMuted() + : ReadAttribute("device-muted") { } - ~ReadDishwasherModeGeneratedCommandList() + ~ReadSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm DeviceMuted read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61989,25 +61282,25 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSmokeCoAlarmDeviceMuted() + : SubscribeAttribute("device-muted") { } - ~SubscribeAttributeDishwasherModeGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmDeviceMuted() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62018,10 +61311,10 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeDeviceMutedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62034,38 +61327,35 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute TestInProgress */ -class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { public: - ReadDishwasherModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSmokeCoAlarmTestInProgress() + : ReadAttribute("test-in-progress") { } - ~ReadDishwasherModeAcceptedCommandList() + ~ReadSmokeCoAlarmTestInProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm TestInProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62074,25 +61364,25 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSmokeCoAlarmTestInProgress() + : SubscribeAttribute("test-in-progress") { } - ~SubscribeAttributeDishwasherModeAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmTestInProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62103,10 +61393,10 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTestInProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62119,38 +61409,35 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute HardwareFaultAlert */ -class ReadDishwasherModeEventList : public ReadAttribute { +class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { public: - ReadDishwasherModeEventList() - : ReadAttribute("event-list") + ReadSmokeCoAlarmHardwareFaultAlert() + : ReadAttribute("hardware-fault-alert") { } - ~ReadDishwasherModeEventList() + ~ReadSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode EventList read Error", error); + LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62159,25 +61446,25 @@ class ReadDishwasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + : SubscribeAttribute("hardware-fault-alert") { } - ~SubscribeAttributeDishwasherModeEventList() + ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62188,10 +61475,10 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeHardwareFaultAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62204,38 +61491,35 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute EndOfServiceAlert */ -class ReadDishwasherModeAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { public: - ReadDishwasherModeAttributeList() - : ReadAttribute("attribute-list") + ReadSmokeCoAlarmEndOfServiceAlert() + : ReadAttribute("end-of-service-alert") { } - ~ReadDishwasherModeAttributeList() + ~ReadSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AttributeList read Error", error); + LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62244,25 +61528,25 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + : SubscribeAttribute("end-of-service-alert") { } - ~SubscribeAttributeDishwasherModeAttributeList() + ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62273,10 +61557,10 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeEndOfServiceAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62289,38 +61573,35 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute InterconnectSmokeAlarm */ -class ReadDishwasherModeFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { public: - ReadDishwasherModeFeatureMap() - : ReadAttribute("feature-map") + ReadSmokeCoAlarmInterconnectSmokeAlarm() + : ReadAttribute("interconnect-smoke-alarm") { } - ~ReadDishwasherModeFeatureMap() + ~ReadSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode FeatureMap read Error", error); + LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62329,25 +61610,25 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + : SubscribeAttribute("interconnect-smoke-alarm") { } - ~SubscribeAttributeDishwasherModeFeatureMap() + ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62358,10 +61639,10 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62374,38 +61655,35 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute InterconnectCOAlarm */ -class ReadDishwasherModeClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { public: - ReadDishwasherModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadSmokeCoAlarmInterconnectCOAlarm() + : ReadAttribute("interconnect-coalarm") { } - ~ReadDishwasherModeClusterRevision() + ~ReadSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62414,25 +61692,25 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + : SubscribeAttribute("interconnect-coalarm") { } - ~SubscribeAttributeDishwasherModeClusterRevision() + ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62443,10 +61721,10 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeInterconnectCOAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62459,54 +61737,117 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster AirQuality | 0x005B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AirQuality | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +/* + * Attribute ContaminationState + */ +class ReadSmokeCoAlarmContaminationState : public ReadAttribute { +public: + ReadSmokeCoAlarmContaminationState() + : ReadAttribute("contamination-state") + { + } + + ~ReadSmokeCoAlarmContaminationState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm ContaminationState read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmContaminationState() + : SubscribeAttribute("contamination-state") + { + } + + ~SubscribeAttributeSmokeCoAlarmContaminationState() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeContaminationStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; /* - * Attribute AirQuality + * Attribute SmokeSensitivityLevel */ -class ReadAirQualityAirQuality : public ReadAttribute { +class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { public: - ReadAirQualityAirQuality() - : ReadAttribute("air-quality") + ReadSmokeCoAlarmSmokeSensitivityLevel() + : ReadAttribute("smoke-sensitivity-level") { } - ~ReadAirQualityAirQuality() + ~ReadSmokeCoAlarmSmokeSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAirQualityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AirQuality read Error", error); + LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62515,25 +61856,66 @@ class ReadAirQualityAirQuality : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { +class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { public: - SubscribeAttributeAirQualityAirQuality() - : SubscribeAttribute("air-quality") + WriteSmokeCoAlarmSmokeSensitivityLevel() + : WriteAttribute("smoke-sensitivity-level") { + AddArgument("attr-name", "smoke-sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeAirQualityAirQuality() + ~WriteSmokeCoAlarmSmokeSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AirQuality::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + : SubscribeAttribute("smoke-sensitivity-level") + { + } + + ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62544,10 +61926,92 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAirQualityWithParams:params + [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ExpiryDate + */ +class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +public: + ReadSmokeCoAlarmExpiryDate() + : ReadAttribute("expiry-date") + { + } + + ~ReadSmokeCoAlarmExpiryDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmExpiryDate() + : SubscribeAttribute("expiry-date") + { + } + + ~SubscribeAttributeSmokeCoAlarmExpiryDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeExpiryDateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62563,32 +62027,32 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadAirQualityGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { public: - ReadAirQualityGeneratedCommandList() + ReadSmokeCoAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAirQualityGeneratedCommandList() + ~ReadSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62597,25 +62061,25 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityGeneratedCommandList() + SubscribeAttributeSmokeCoAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAirQualityGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62629,7 +62093,7 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62645,32 +62109,32 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadAirQualityAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { public: - ReadAirQualityAcceptedCommandList() + ReadSmokeCoAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAirQualityAcceptedCommandList() + ~ReadSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62679,25 +62143,25 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAcceptedCommandList() + SubscribeAttributeSmokeCoAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAirQualityAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62711,7 +62175,7 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62729,32 +62193,32 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadAirQualityEventList : public ReadAttribute { +class ReadSmokeCoAlarmEventList : public ReadAttribute { public: - ReadAirQualityEventList() + ReadSmokeCoAlarmEventList() : ReadAttribute("event-list") { } - ~ReadAirQualityEventList() + ~ReadSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality EventList read Error", error); + LogNSError("SmokeCOAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62763,25 +62227,25 @@ class ReadAirQualityEventList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityEventList() + SubscribeAttributeSmokeCoAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAirQualityEventList() + ~SubscribeAttributeSmokeCoAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62795,7 +62259,7 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62813,32 +62277,32 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadAirQualityAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmAttributeList : public ReadAttribute { public: - ReadAirQualityAttributeList() + ReadSmokeCoAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAirQualityAttributeList() + ~ReadSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality AttributeList read Error", error); + LogNSError("SmokeCOAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62847,25 +62311,25 @@ class ReadAirQualityAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAttributeList() + SubscribeAttributeSmokeCoAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAirQualityAttributeList() + ~SubscribeAttributeSmokeCoAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62879,7 +62343,7 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62895,32 +62359,32 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadAirQualityFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { public: - ReadAirQualityFeatureMap() + ReadSmokeCoAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAirQualityFeatureMap() + ~ReadSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality FeatureMap read Error", error); + LogNSError("SmokeCOAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62929,25 +62393,25 @@ class ReadAirQualityFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAirQualityFeatureMap() + SubscribeAttributeSmokeCoAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAirQualityFeatureMap() + ~SubscribeAttributeSmokeCoAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62961,7 +62425,7 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62977,32 +62441,32 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadAirQualityClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { public: - ReadAirQualityClusterRevision() + ReadSmokeCoAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAirQualityClusterRevision() + ~ReadSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AirQuality ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63011,25 +62475,25 @@ class ReadAirQualityClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAirQualityClusterRevision() + SubscribeAttributeSmokeCoAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAirQualityClusterRevision() + ~SubscribeAttributeSmokeCoAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AirQuality::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AirQuality::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63043,7 +62507,7 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63056,26 +62520,19 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | +| Cluster DishwasherAlarm | 0x005D | |------------------------------------------------------------------------------| | Commands: | | -| * SelfTestRequest | 0x00 | +| * Reset | 0x00 | +| * ModifyEnabledAlarms | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * ExpressedState | 0x0000 | -| * SmokeState | 0x0001 | -| * COState | 0x0002 | -| * BatteryAlert | 0x0003 | -| * DeviceMuted | 0x0004 | -| * TestInProgress | 0x0005 | -| * HardwareFaultAlert | 0x0006 | -| * EndOfServiceAlert | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * ContaminationState | 0x000A | -| * SmokeSensitivityLevel | 0x000B | -| * ExpiryDate | 0x000C | +| * Mask | 0x0000 | +| * Latch | 0x0001 | +| * State | 0x0002 | +| * Supported | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -63084,92 +62541,147 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * SmokeAlarm | 0x0000 | -| * COAlarm | 0x0001 | -| * LowBattery | 0x0002 | -| * HardwareFault | 0x0003 | -| * EndOfService | 0x0004 | -| * SelfTestComplete | 0x0005 | -| * AlarmMuted | 0x0006 | -| * MuteEnded | 0x0007 | -| * InterconnectSmokeAlarm | 0x0008 | -| * InterconnectCOAlarm | 0x0009 | -| * AllClear | 0x000A | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command SelfTestRequest + * Command Reset */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand { +class DishwasherAlarmReset : public ClusterCommand { public: - SmokeCoAlarmSelfTestRequest() - : ClusterCommand("self-test-request") + DishwasherAlarmReset() + : ClusterCommand("reset") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selfTestRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ExpressedState + * Command ModifyEnabledAlarms */ -class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { public: - ReadSmokeCoAlarmExpressedState() - : ReadAttribute("expressed-state") + DishwasherAlarmModifyEnabledAlarms() + : ClusterCommand("modify-enabled-alarms") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadSmokeCoAlarmExpressedState() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster modifyEnabledAlarmsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute Mask + */ +class ReadDishwasherAlarmMask : public ReadAttribute { +public: + ReadDishwasherAlarmMask() + : ReadAttribute("mask") + { + } + + ~ReadDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpressedState read Error", error); + LogNSError("DishwasherAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63178,25 +62690,25 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpressedState() - : SubscribeAttribute("expressed-state") + SubscribeAttributeDishwasherAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeSmokeCoAlarmExpressedState() + ~SubscribeAttributeDishwasherAlarmMask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpressedState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63207,10 +62719,10 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpressedStateWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63223,35 +62735,38 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SmokeState + * Attribute Latch */ -class ReadSmokeCoAlarmSmokeState : public ReadAttribute { +class ReadDishwasherAlarmLatch : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeState() - : ReadAttribute("smoke-state") + ReadDishwasherAlarmLatch() + : ReadAttribute("latch") { } - ~ReadSmokeCoAlarmSmokeState() + ~ReadDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm SmokeState read Error", error); + LogNSError("DishwasherAlarm Latch read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63260,25 +62775,25 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeState() - : SubscribeAttribute("smoke-state") + SubscribeAttributeDishwasherAlarmLatch() + : SubscribeAttribute("latch") { } - ~SubscribeAttributeSmokeCoAlarmSmokeState() + ~SubscribeAttributeDishwasherAlarmLatch() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63289,10 +62804,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeStateWithParams:params + [cluster subscribeAttributeLatchWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63305,35 +62820,38 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute COState + * Attribute State */ -class ReadSmokeCoAlarmCOState : public ReadAttribute { +class ReadDishwasherAlarmState : public ReadAttribute { public: - ReadSmokeCoAlarmCOState() - : ReadAttribute("costate") + ReadDishwasherAlarmState() + : ReadAttribute("state") { } - ~ReadSmokeCoAlarmCOState() + ~ReadDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm COState read Error", error); + LogNSError("DishwasherAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63342,25 +62860,25 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmCOState() - : SubscribeAttribute("costate") + SubscribeAttributeDishwasherAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeSmokeCoAlarmCOState() + ~SubscribeAttributeDishwasherAlarmState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63371,10 +62889,10 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCOStateWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63387,35 +62905,38 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatteryAlert + * Attribute Supported */ -class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +class ReadDishwasherAlarmSupported : public ReadAttribute { public: - ReadSmokeCoAlarmBatteryAlert() - : ReadAttribute("battery-alert") + ReadDishwasherAlarmSupported() + : ReadAttribute("supported") { } - ~ReadSmokeCoAlarmBatteryAlert() + ~ReadDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm BatteryAlert read Error", error); + LogNSError("DishwasherAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63424,25 +62945,25 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmBatteryAlert() - : SubscribeAttribute("battery-alert") + SubscribeAttributeDishwasherAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeSmokeCoAlarmBatteryAlert() + ~SubscribeAttributeDishwasherAlarmSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::BatteryAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63453,10 +62974,10 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryAlertWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63469,35 +62990,38 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute DeviceMuted + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { +class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmDeviceMuted() - : ReadAttribute("device-muted") + ReadDishwasherAlarmGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmDeviceMuted() + ~ReadDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63506,25 +63030,25 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmDeviceMuted() - : SubscribeAttribute("device-muted") + SubscribeAttributeDishwasherAlarmGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmDeviceMuted() + ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63535,10 +63059,10 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceMutedWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63551,35 +63075,38 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TestInProgress + * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmTestInProgress() - : ReadAttribute("test-in-progress") + ReadDishwasherAlarmAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmTestInProgress() + ~ReadDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm TestInProgress read Error", error); + LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63588,25 +63115,25 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmTestInProgress() - : SubscribeAttribute("test-in-progress") + SubscribeAttributeDishwasherAlarmAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmTestInProgress() + ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::TestInProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63617,10 +63144,10 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestInProgressWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63633,35 +63160,38 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute HardwareFaultAlert + * Attribute EventList */ -class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { +class ReadDishwasherAlarmEventList : public ReadAttribute { public: - ReadSmokeCoAlarmHardwareFaultAlert() - : ReadAttribute("hardware-fault-alert") + ReadDishwasherAlarmEventList() + : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmHardwareFaultAlert() + ~ReadDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + LogNSError("DishwasherAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63670,25 +63200,25 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() - : SubscribeAttribute("hardware-fault-alert") + SubscribeAttributeDishwasherAlarmEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + ~SubscribeAttributeDishwasherAlarmEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::HardwareFaultAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63699,10 +63229,10 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareFaultAlertWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63715,35 +63245,38 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EndOfServiceAlert + * Attribute AttributeList */ -class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { +class ReadDishwasherAlarmAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmEndOfServiceAlert() - : ReadAttribute("end-of-service-alert") + ReadDishwasherAlarmAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmEndOfServiceAlert() + ~ReadDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + LogNSError("DishwasherAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63752,25 +63285,25 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() - : SubscribeAttribute("end-of-service-alert") + SubscribeAttributeDishwasherAlarmAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + ~SubscribeAttributeDishwasherAlarmAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EndOfServiceAlert::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63781,10 +63314,10 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndOfServiceAlertWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63797,35 +63330,38 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InterconnectSmokeAlarm + * Attribute FeatureMap */ -class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { +class ReadDishwasherAlarmFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectSmokeAlarm() - : ReadAttribute("interconnect-smoke-alarm") + ReadDishwasherAlarmFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmInterconnectSmokeAlarm() + ~ReadDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + LogNSError("DishwasherAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63834,25 +63370,25 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() - : SubscribeAttribute("interconnect-smoke-alarm") + SubscribeAttributeDishwasherAlarmFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + ~SubscribeAttributeDishwasherAlarmFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63863,10 +63399,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63879,35 +63415,38 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InterconnectCOAlarm + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { +class ReadDishwasherAlarmClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectCOAlarm() - : ReadAttribute("interconnect-coalarm") + ReadDishwasherAlarmClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmInterconnectCOAlarm() + ~ReadDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + LogNSError("DishwasherAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63916,25 +63455,25 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() - : SubscribeAttribute("interconnect-coalarm") + SubscribeAttributeDishwasherAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + ~SubscribeAttributeDishwasherAlarmClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::InterconnectCOAlarm::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63945,10 +63484,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63961,185 +63500,85 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib } }; -/* - * Attribute ContaminationState - */ -class ReadSmokeCoAlarmContaminationState : public ReadAttribute { -public: - ReadSmokeCoAlarmContaminationState() - : ReadAttribute("contamination-state") - { - } - - ~ReadSmokeCoAlarmContaminationState() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeContaminationStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("SmokeCOAlarm ContaminationState read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { -public: - SubscribeAttributeSmokeCoAlarmContaminationState() - : SubscribeAttribute("contamination-state") - { - } - - ~SubscribeAttributeSmokeCoAlarmContaminationState() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ContaminationState::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeContaminationStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenMode | 0x005E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ - return CHIP_NO_ERROR; - } -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeSensitivityLevel + * Attribute SupportedModes */ -class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { +class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeSensitivityLevel() - : ReadAttribute("smoke-sensitivity-level") + ReadMicrowaveOvenModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadSmokeCoAlarmSmokeSensitivityLevel() + ~ReadMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { -public: - WriteSmokeCoAlarmSmokeSensitivityLevel() - : WriteAttribute("smoke-sensitivity-level") - { - AddArgument("attr-name", "smoke-sensitivity-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteSmokeCoAlarmSmokeSensitivityLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); + LogNSError("MicrowaveOvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() - : SubscribeAttribute("smoke-sensitivity-level") + SubscribeAttributeMicrowaveOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + ~SubscribeAttributeMicrowaveOvenModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::SmokeSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64150,10 +63589,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64166,35 +63605,38 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ExpiryDate + * Attribute CurrentMode */ -class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { public: - ReadSmokeCoAlarmExpiryDate() - : ReadAttribute("expiry-date") + ReadMicrowaveOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadSmokeCoAlarmExpiryDate() + ~ReadMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + LogNSError("MicrowaveOvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64203,25 +63645,25 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpiryDate() - : SubscribeAttribute("expiry-date") + SubscribeAttributeMicrowaveOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeSmokeCoAlarmExpiryDate() + ~SubscribeAttributeMicrowaveOvenModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ExpiryDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64232,10 +63674,10 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiryDateWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64248,35 +63690,38 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmGeneratedCommandList() + ReadMicrowaveOvenModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmGeneratedCommandList() + ~ReadMicrowaveOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64285,25 +63730,25 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64317,7 +63762,7 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64330,35 +63775,38 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmAcceptedCommandList() + ReadMicrowaveOvenModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmAcceptedCommandList() + ~ReadMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64367,25 +63815,25 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64399,7 +63847,7 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64412,37 +63860,38 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadSmokeCoAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenModeEventList : public ReadAttribute { public: - ReadSmokeCoAlarmEventList() + ReadMicrowaveOvenModeEventList() : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmEventList() + ~ReadMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EventList read Error", error); + LogNSError("MicrowaveOvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64451,25 +63900,25 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEventList() + SubscribeAttributeMicrowaveOvenModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmEventList() + ~SubscribeAttributeMicrowaveOvenModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64483,7 +63932,7 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64497,36 +63946,37 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadSmokeCoAlarmAttributeList : public ReadAttribute { +class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmAttributeList() + ReadMicrowaveOvenModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmAttributeList() + ~ReadMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm AttributeList read Error", error); + LogNSError("MicrowaveOvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64535,25 +63985,25 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAttributeList() + SubscribeAttributeMicrowaveOvenModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmAttributeList() + ~SubscribeAttributeMicrowaveOvenModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64567,7 +64017,7 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64580,35 +64030,38 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmFeatureMap() + ReadMicrowaveOvenModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmFeatureMap() + ~ReadMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm FeatureMap read Error", error); + LogNSError("MicrowaveOvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64617,25 +64070,25 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmFeatureMap() + SubscribeAttributeMicrowaveOvenModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmFeatureMap() + ~SubscribeAttributeMicrowaveOvenModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64649,7 +64102,7 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64662,35 +64115,38 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmClusterRevision() + ReadMicrowaveOvenModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmClusterRevision() + ~ReadMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64699,25 +64155,25 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmClusterRevision() + SubscribeAttributeMicrowaveOvenModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmClusterRevision() + ~SubscribeAttributeMicrowaveOvenModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SmokeCoAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64731,7 +64187,7 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64744,19 +64200,26 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DishwasherAlarm | 0x005D | +| Cluster MicrowaveOvenControl | 0x005F | |------------------------------------------------------------------------------| | Commands: | | -| * Reset | 0x00 | -| * ModifyEnabledAlarms | 0x01 | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * Latch | 0x0001 | -| * State | 0x0002 | -| * Supported | 0x0003 | +| * CookTime | 0x0000 | +| * MaxCookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | +| * SupportedWatts | 0x0006 | +| * SelectedWattIndex | 0x0007 | +| * WattRating | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -64765,112 +64228,155 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command Reset + * Command SetCookingParameters */ -class DishwasherAlarmReset : public ClusterCommand { +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - DishwasherAlarmReset() - : ClusterCommand("reset") + MicrowaveOvenControlSetCookingParameters() + : ClusterCommand("set-cooking-parameters") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Alarms", 0, UINT32_MAX, &mRequest.alarms); + AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("WattSettingIndex", 0, UINT8_MAX, &mRequest.wattSettingIndex); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("StartAfterSetting", 0, 1, &mRequest.startAfterSetting); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::Reset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.alarms = [NSNumber numberWithUnsignedInt:mRequest.alarms.Raw()]; + if (mRequest.cookMode.HasValue()) { + params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; + } else { + params.cookMode = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.cookTime.HasValue()) { + params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; + } else { + params.cookTime = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.powerSetting.HasValue()) { + params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; + } else { + params.powerSetting = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.wattSettingIndex.HasValue()) { + params.wattSettingIndex = [NSNumber numberWithUnsignedChar:mRequest.wattSettingIndex.Value()]; + } else { + params.wattSettingIndex = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.startAfterSetting.HasValue()) { + params.startAfterSetting = [NSNumber numberWithBool:mRequest.startAfterSetting.Value()]; + } else { + params.startAfterSetting = nil; + } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setCookingParametersWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command ModifyEnabledAlarms + * Command AddMoreTime */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { +class MicrowaveOvenControlAddMoreTime : public ClusterCommand { public: - DishwasherAlarmModifyEnabledAlarms() - : ClusterCommand("modify-enabled-alarms") + MicrowaveOvenControlAddMoreTime() + : ClusterCommand("add-more-time") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Mask", 0, UINT32_MAX, &mRequest.mask); + AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.mask = [NSNumber numberWithUnsignedInt:mRequest.mask.Raw()]; + params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster modifyEnabledAlarmsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster addMoreTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -64878,34 +64384,34 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute CookTime */ -class ReadDishwasherAlarmMask : public ReadAttribute { +class ReadMicrowaveOvenControlCookTime : public ReadAttribute { public: - ReadDishwasherAlarmMask() - : ReadAttribute("mask") + ReadMicrowaveOvenControlCookTime() + : ReadAttribute("cook-time") { } - ~ReadDishwasherAlarmMask() + ~ReadMicrowaveOvenControlCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Mask read Error", error); + LogNSError("MicrowaveOvenControl CookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64914,25 +64420,25 @@ class ReadDishwasherAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeMicrowaveOvenControlCookTime() + : SubscribeAttribute("cook-time") { } - ~SubscribeAttributeDishwasherAlarmMask() + ~SubscribeAttributeMicrowaveOvenControlCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64943,10 +64449,10 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64963,34 +64469,34 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Latch + * Attribute MaxCookTime */ -class ReadDishwasherAlarmLatch : public ReadAttribute { +class ReadMicrowaveOvenControlMaxCookTime : public ReadAttribute { public: - ReadDishwasherAlarmLatch() - : ReadAttribute("latch") + ReadMicrowaveOvenControlMaxCookTime() + : ReadAttribute("max-cook-time") { } - ~ReadDishwasherAlarmLatch() + ~ReadMicrowaveOvenControlMaxCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLatchWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Latch read Error", error); + LogNSError("MicrowaveOvenControl MaxCookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64999,25 +64505,25 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmLatch() - : SubscribeAttribute("latch") + SubscribeAttributeMicrowaveOvenControlMaxCookTime() + : SubscribeAttribute("max-cook-time") { } - ~SubscribeAttributeDishwasherAlarmLatch() + ~SubscribeAttributeMicrowaveOvenControlMaxCookTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Latch::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65028,10 +64534,10 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLatchWithParams:params + [cluster subscribeAttributeMaxCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65048,34 +64554,34 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute PowerSetting */ -class ReadDishwasherAlarmState : public ReadAttribute { +class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { public: - ReadDishwasherAlarmState() - : ReadAttribute("state") + ReadMicrowaveOvenControlPowerSetting() + : ReadAttribute("power-setting") { } - ~ReadDishwasherAlarmState() + ~ReadMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm State read Error", error); + LogNSError("MicrowaveOvenControl PowerSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65084,25 +64590,25 @@ class ReadDishwasherAlarmState : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeMicrowaveOvenControlPowerSetting() + : SubscribeAttribute("power-setting") { } - ~SubscribeAttributeDishwasherAlarmState() + ~SubscribeAttributeMicrowaveOvenControlPowerSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::State::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65113,10 +64619,10 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributePowerSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65133,34 +64639,34 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute MinPower */ -class ReadDishwasherAlarmSupported : public ReadAttribute { +class ReadMicrowaveOvenControlMinPower : public ReadAttribute { public: - ReadDishwasherAlarmSupported() - : ReadAttribute("supported") + ReadMicrowaveOvenControlMinPower() + : ReadAttribute("min-power") { } - ~ReadDishwasherAlarmSupported() + ~ReadMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Supported read Error", error); + LogNSError("MicrowaveOvenControl MinPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65169,25 +64675,25 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeMicrowaveOvenControlMinPower() + : SubscribeAttribute("min-power") { } - ~SubscribeAttributeDishwasherAlarmSupported() + ~SubscribeAttributeMicrowaveOvenControlMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::Supported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65198,10 +64704,10 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeMinPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65218,34 +64724,34 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute MaxPower */ -class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { public: - ReadDishwasherAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMicrowaveOvenControlMaxPower() + : ReadAttribute("max-power") { } - ~ReadDishwasherAlarmGeneratedCommandList() + ~ReadMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl MaxPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65254,25 +64760,25 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMicrowaveOvenControlMaxPower() + : SubscribeAttribute("max-power") { } - ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenControlMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65283,10 +64789,10 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65303,34 +64809,34 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PowerStep */ -class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { public: - ReadDishwasherAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMicrowaveOvenControlPowerStep() + : ReadAttribute("power-step") { } - ~ReadDishwasherAlarmAcceptedCommandList() + ~ReadMicrowaveOvenControlPowerStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl PowerStep read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65339,25 +64845,25 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMicrowaveOvenControlPowerStep() + : SubscribeAttribute("power-step") { } - ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenControlPowerStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65368,10 +64874,10 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePowerStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65388,34 +64894,34 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute SupportedWatts */ -class ReadDishwasherAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenControlSupportedWatts : public ReadAttribute { public: - ReadDishwasherAlarmEventList() - : ReadAttribute("event-list") + ReadMicrowaveOvenControlSupportedWatts() + : ReadAttribute("supported-watts") { } - ~ReadDishwasherAlarmEventList() + ~ReadMicrowaveOvenControlSupportedWatts() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWattsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm EventList read Error", error); + LogNSError("MicrowaveOvenControl SupportedWatts read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65424,25 +64930,25 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlSupportedWatts : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMicrowaveOvenControlSupportedWatts() + : SubscribeAttribute("supported-watts") { } - ~SubscribeAttributeDishwasherAlarmEventList() + ~SubscribeAttributeMicrowaveOvenControlSupportedWatts() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65453,10 +64959,10 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSupportedWattsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65473,34 +64979,34 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute SelectedWattIndex */ -class ReadDishwasherAlarmAttributeList : public ReadAttribute { +class ReadMicrowaveOvenControlSelectedWattIndex : public ReadAttribute { public: - ReadDishwasherAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadMicrowaveOvenControlSelectedWattIndex() + : ReadAttribute("selected-watt-index") { } - ~ReadDishwasherAlarmAttributeList() + ~ReadMicrowaveOvenControlSelectedWattIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedWattIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AttributeList read Error", error); + LogNSError("MicrowaveOvenControl SelectedWattIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65509,25 +65015,25 @@ class ReadDishwasherAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() + : SubscribeAttribute("selected-watt-index") { } - ~SubscribeAttributeDishwasherAlarmAttributeList() + ~SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65538,10 +65044,10 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSelectedWattIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65558,34 +65064,34 @@ class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute WattRating */ -class ReadDishwasherAlarmFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenControlWattRating : public ReadAttribute { public: - ReadDishwasherAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadMicrowaveOvenControlWattRating() + : ReadAttribute("watt-rating") { } - ~ReadDishwasherAlarmFeatureMap() + ~ReadMicrowaveOvenControlWattRating() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::WattRating::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWattRatingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm FeatureMap read Error", error); + LogNSError("MicrowaveOvenControl WattRating read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65594,25 +65100,25 @@ class ReadDishwasherAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMicrowaveOvenControlWattRating() + : SubscribeAttribute("watt-rating") { } - ~SubscribeAttributeDishwasherAlarmFeatureMap() + ~SubscribeAttributeMicrowaveOvenControlWattRating() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::WattRating::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65623,10 +65129,10 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeWattRatingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); + NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65643,34 +65149,34 @@ class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadDishwasherAlarmClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadMicrowaveOvenControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDishwasherAlarmClusterRevision() + ~ReadMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm ClusterRevision read Error", error); + LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65679,25 +65185,25 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherAlarmClusterRevision() + ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DishwasherAlarm::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DishwasherAlarm::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65708,10 +65214,10 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65724,58 +65230,38 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenMode | 0x005E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute AcceptedCommandList */ -class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { +class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenModeSupportedModes() - : ReadAttribute("supported-modes") + ReadMicrowaveOvenControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMicrowaveOvenModeSupportedModes() + ~ReadMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode SupportedModes read Error", error); + LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65784,25 +65270,25 @@ class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMicrowaveOvenModeSupportedModes() + ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65813,10 +65299,10 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65833,34 +65319,34 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute EventList */ -class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { +class ReadMicrowaveOvenControlEventList : public ReadAttribute { public: - ReadMicrowaveOvenModeCurrentMode() - : ReadAttribute("current-mode") + ReadMicrowaveOvenControlEventList() + : ReadAttribute("event-list") { } - ~ReadMicrowaveOvenModeCurrentMode() + ~ReadMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode CurrentMode read Error", error); + LogNSError("MicrowaveOvenControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65869,25 +65355,25 @@ class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeMicrowaveOvenControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMicrowaveOvenModeCurrentMode() + ~SubscribeAttributeMicrowaveOvenControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65898,10 +65384,10 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65918,34 +65404,34 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { public: - ReadMicrowaveOvenModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMicrowaveOvenControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMicrowaveOvenModeGeneratedCommandList() + ~ReadMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65954,25 +65440,25 @@ class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMicrowaveOvenControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65983,10 +65469,10 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66003,34 +65489,34 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMicrowaveOvenControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenModeAcceptedCommandList() + ~ReadMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66039,25 +65525,25 @@ class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMicrowaveOvenControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66068,10 +65554,10 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66088,34 +65574,34 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadMicrowaveOvenModeEventList : public ReadAttribute { +class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenModeEventList() - : ReadAttribute("event-list") + ReadMicrowaveOvenControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenModeEventList() + ~ReadMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode EventList read Error", error); + LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66124,25 +65610,25 @@ class ReadMicrowaveOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMicrowaveOvenControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenModeEventList() + ~SubscribeAttributeMicrowaveOvenControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66153,10 +65639,10 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66170,37 +65656,264 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OperationalState | 0x0060 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Command Pause */ -class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { +class OperationalStatePause : public ClusterCommand { public: - ReadMicrowaveOvenModeAttributeList() - : ReadAttribute("attribute-list") + OperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } - ~ReadMicrowaveOvenModeAttributeList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Stop + */ +class OperationalStateStop : public ClusterCommand { +public: + OperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Start + */ +class OperationalStateStart : public ClusterCommand { +public: + OperationalStateStart() + : ClusterCommand("start") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Resume + */ +class OperationalStateResume : public ClusterCommand { +public: + OperationalStateResume() + : ClusterCommand("resume") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute PhaseList + */ +class ReadOperationalStatePhaseList : public ReadAttribute { +public: + ReadOperationalStatePhaseList() + : ReadAttribute("phase-list") + { + } + + ~ReadOperationalStatePhaseList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode AttributeList read Error", error); + LogNSError("OperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66209,25 +65922,25 @@ class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeMicrowaveOvenModeAttributeList() + ~SubscribeAttributeOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66238,10 +65951,10 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66254,38 +65967,35 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute CurrentPhase */ -class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { +class ReadOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenModeFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenModeFeatureMap() + ~ReadOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode FeatureMap read Error", error); + LogNSError("OperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66294,25 +66004,25 @@ class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenModeFeatureMap() + ~SubscribeAttributeOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66323,10 +66033,10 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66339,38 +66049,35 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute CountdownTime */ -class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { +class ReadOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenModeClusterRevision() + ~ReadOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); + LogNSError("OperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66379,25 +66086,25 @@ class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenModeClusterRevision() + ~SubscribeAttributeOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66408,10 +66115,10 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66424,218 +66131,35 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenControl | 0x005F | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetCookingParameters | 0x00 | -| * AddMoreTime | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CookTime | 0x0000 | -| * MaxCookTime | 0x0001 | -| * PowerSetting | 0x0002 | -| * MinPower | 0x0003 | -| * MaxPower | 0x0004 | -| * PowerStep | 0x0005 | -| * SupportedWatts | 0x0006 | -| * SelectedWattIndex | 0x0007 | -| * WattRating | 0x0008 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetCookingParameters - */ -class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { -public: - MicrowaveOvenControlSetCookingParameters() - : ClusterCommand("set-cooking-parameters") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookMode", 0, UINT8_MAX, &mRequest.cookMode); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("CookTime", 0, UINT32_MAX, &mRequest.cookTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PowerSetting", 0, UINT8_MAX, &mRequest.powerSetting); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("WattSettingIndex", 0, UINT8_MAX, &mRequest.wattSettingIndex); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("StartAfterSetting", 0, 1, &mRequest.startAfterSetting); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookMode.HasValue()) { - params.cookMode = [NSNumber numberWithUnsignedChar:mRequest.cookMode.Value()]; - } else { - params.cookMode = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.cookTime.HasValue()) { - params.cookTime = [NSNumber numberWithUnsignedInt:mRequest.cookTime.Value()]; - } else { - params.cookTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.powerSetting.HasValue()) { - params.powerSetting = [NSNumber numberWithUnsignedChar:mRequest.powerSetting.Value()]; - } else { - params.powerSetting = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.wattSettingIndex.HasValue()) { - params.wattSettingIndex = [NSNumber numberWithUnsignedChar:mRequest.wattSettingIndex.Value()]; - } else { - params.wattSettingIndex = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.startAfterSetting.HasValue()) { - params.startAfterSetting = [NSNumber numberWithBool:mRequest.startAfterSetting.Value()]; - } else { - params.startAfterSetting = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCookingParametersWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command AddMoreTime - */ -class MicrowaveOvenControlAddMoreTime : public ClusterCommand { -public: - MicrowaveOvenControlAddMoreTime() - : ClusterCommand("add-more-time") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeToAdd", 0, UINT32_MAX, &mRequest.timeToAdd); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.timeToAdd = [NSNumber numberWithUnsignedInt:mRequest.timeToAdd]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addMoreTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CookTime + * Attribute OperationalStateList */ -class ReadMicrowaveOvenControlCookTime : public ReadAttribute { +class ReadOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenControlCookTime() - : ReadAttribute("cook-time") + ReadOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenControlCookTime() + ~ReadOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl CookTime read Error", error); + LogNSError("OperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66644,25 +66168,25 @@ class ReadMicrowaveOvenControlCookTime : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlCookTime() - : SubscribeAttribute("cook-time") + SubscribeAttributeOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenControlCookTime() + ~SubscribeAttributeOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::CookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66673,10 +66197,10 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCookTimeWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66689,38 +66213,35 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxCookTime + * Attribute OperationalState */ -class ReadMicrowaveOvenControlMaxCookTime : public ReadAttribute { +class ReadOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenControlMaxCookTime() - : ReadAttribute("max-cook-time") + ReadOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenControlMaxCookTime() + ~ReadOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MaxCookTime read Error", error); + LogNSError("OperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66729,25 +66250,25 @@ class ReadMicrowaveOvenControlMaxCookTime : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMaxCookTime() - : SubscribeAttribute("max-cook-time") + SubscribeAttributeOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenControlMaxCookTime() + ~SubscribeAttributeOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66758,10 +66279,10 @@ class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCookTimeWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); + NSLog(@"OperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66774,38 +66295,35 @@ class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PowerSetting + * Attribute OperationalError */ -class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { +class ReadOperationalStateOperationalError : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerSetting() - : ReadAttribute("power-setting") + ReadOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadMicrowaveOvenControlPowerSetting() + ~ReadOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl PowerSetting read Error", error); + LogNSError("OperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66814,25 +66332,25 @@ class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerSetting() - : SubscribeAttribute("power-setting") + SubscribeAttributeOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeMicrowaveOvenControlPowerSetting() + ~SubscribeAttributeOperationalStateOperationalError() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66843,10 +66361,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerSettingWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66859,38 +66377,35 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MinPower + * Attribute GeneratedCommandList */ -class ReadMicrowaveOvenControlMinPower : public ReadAttribute { +class ReadOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenControlMinPower() - : ReadAttribute("min-power") + ReadOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadMicrowaveOvenControlMinPower() + ~ReadOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MinPower read Error", error); + LogNSError("OperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66899,25 +66414,25 @@ class ReadMicrowaveOvenControlMinPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { +class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMinPower() - : SubscribeAttribute("min-power") + SubscribeAttributeOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMicrowaveOvenControlMinPower() + ~SubscribeAttributeOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66928,10 +66443,10 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPowerWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66944,38 +66459,35 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MaxPower + * Attribute AcceptedCommandList */ -class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { +class ReadOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenControlMaxPower() - : ReadAttribute("max-power") + ReadOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMicrowaveOvenControlMaxPower() + ~ReadOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl MaxPower read Error", error); + LogNSError("OperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66984,25 +66496,25 @@ class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMaxPower() - : SubscribeAttribute("max-power") + SubscribeAttributeOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMicrowaveOvenControlMaxPower() + ~SubscribeAttributeOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67013,10 +66525,10 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPowerWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67029,38 +66541,37 @@ class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute PowerStep + * Attribute EventList */ -class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { +class ReadOperationalStateEventList : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerStep() - : ReadAttribute("power-step") + ReadOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadMicrowaveOvenControlPowerStep() + ~ReadOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl PowerStep read Error", error); + LogNSError("OperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67069,25 +66580,25 @@ class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { +class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerStep() - : SubscribeAttribute("power-step") + SubscribeAttributeOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMicrowaveOvenControlPowerStep() + ~SubscribeAttributeOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::PowerStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67098,10 +66609,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerStepWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67115,37 +66626,36 @@ class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribut }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedWatts + * Attribute AttributeList */ -class ReadMicrowaveOvenControlSupportedWatts : public ReadAttribute { +class ReadOperationalStateAttributeList : public ReadAttribute { public: - ReadMicrowaveOvenControlSupportedWatts() - : ReadAttribute("supported-watts") + ReadOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMicrowaveOvenControlSupportedWatts() + ~ReadOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWattsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl SupportedWatts read Error", error); + LogNSError("OperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67154,25 +66664,25 @@ class ReadMicrowaveOvenControlSupportedWatts : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlSupportedWatts : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlSupportedWatts() - : SubscribeAttribute("supported-watts") + SubscribeAttributeOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMicrowaveOvenControlSupportedWatts() + ~SubscribeAttributeOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67183,10 +66693,10 @@ class SubscribeAttributeMicrowaveOvenControlSupportedWatts : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWattsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); + NSLog(@"OperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67199,38 +66709,35 @@ class SubscribeAttributeMicrowaveOvenControlSupportedWatts : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SelectedWattIndex + * Attribute FeatureMap */ -class ReadMicrowaveOvenControlSelectedWattIndex : public ReadAttribute { +class ReadOperationalStateFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenControlSelectedWattIndex() - : ReadAttribute("selected-watt-index") + ReadOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenControlSelectedWattIndex() + ~ReadOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedWattIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl SelectedWattIndex read Error", error); + LogNSError("OperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67239,25 +66746,25 @@ class ReadMicrowaveOvenControlSelectedWattIndex : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public SubscribeAttribute { +class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() - : SubscribeAttribute("selected-watt-index") + SubscribeAttributeOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() + ~SubscribeAttributeOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67268,10 +66775,10 @@ class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedWattIndexWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67284,38 +66791,35 @@ class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute WattRating + * Attribute ClusterRevision */ -class ReadMicrowaveOvenControlWattRating : public ReadAttribute { +class ReadOperationalStateClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenControlWattRating() - : ReadAttribute("watt-rating") + ReadOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenControlWattRating() + ~ReadOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::WattRating::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWattRatingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl WattRating read Error", error); + LogNSError("OperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67324,25 +66828,25 @@ class ReadMicrowaveOvenControlWattRating : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribute { +class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlWattRating() - : SubscribeAttribute("watt-rating") + SubscribeAttributeOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenControlWattRating() + ~SubscribeAttributeOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::WattRating::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67353,10 +66857,10 @@ class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWattRatingWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67369,123 +66873,215 @@ class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RvcOperationalState | 0x0061 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Pause | 0x00 | +| * Resume | 0x03 | +| * GoHome | 0x80 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | +\*----------------------------------------------------------------------------*/ /* - * Attribute GeneratedCommandList + * Command Pause */ -class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { +class RvcOperationalStatePause : public ClusterCommand { public: - ReadMicrowaveOvenControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadMicrowaveOvenControlGeneratedCommandList() + RvcOperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { +/* + * Command Resume + */ +class RvcOperationalStateResume : public ClusterCommand { public: - SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + RvcOperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command GoHome + */ +class RvcOperationalStateGoHome : public ClusterCommand { +public: + RvcOperationalStateGoHome() + : ClusterCommand("go-home") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::GoHome::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRRVCOperationalStateClusterGoHomeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goHomeWithParams:params completion: + ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute PhaseList */ -class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { +class ReadRvcOperationalStatePhaseList : public ReadAttribute { public: - ReadMicrowaveOvenControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRvcOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadMicrowaveOvenControlAcceptedCommandList() + ~ReadRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); + LogNSError("RVCOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67494,25 +67090,25 @@ class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRvcOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + ~SubscribeAttributeRvcOperationalStatePhaseList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67523,10 +67119,10 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67539,38 +67135,35 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CurrentPhase */ -class ReadMicrowaveOvenControlEventList : public ReadAttribute { +class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenControlEventList() - : ReadAttribute("event-list") + ReadRvcOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenControlEventList() + ~ReadRvcOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl EventList read Error", error); + LogNSError("RVCOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67579,25 +67172,25 @@ class ReadMicrowaveOvenControlEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRvcOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenControlEventList() + ~SubscribeAttributeRvcOperationalStateCurrentPhase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67608,10 +67201,10 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67624,38 +67217,35 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute CountdownTime */ -class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { +class ReadRvcOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenControlAttributeList() - : ReadAttribute("attribute-list") + ReadRvcOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenControlAttributeList() + ~ReadRvcOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl AttributeList read Error", error); + LogNSError("RVCOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67664,25 +67254,25 @@ class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRvcOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenControlAttributeList() + ~SubscribeAttributeRvcOperationalStateCountdownTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67693,10 +67283,10 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67709,38 +67299,35 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute OperationalStateList */ -class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { +class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenControlFeatureMap() - : ReadAttribute("feature-map") + ReadRvcOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenControlFeatureMap() + ~ReadRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl FeatureMap read Error", error); + LogNSError("RVCOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67749,25 +67336,25 @@ class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRvcOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenControlFeatureMap() + ~SubscribeAttributeRvcOperationalStateOperationalStateList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67778,10 +67365,10 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67794,38 +67381,35 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute OperationalState */ -class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { +class ReadRvcOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadRvcOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenControlClusterRevision() + ~ReadRvcOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); + LogNSError("RVCOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67834,25 +67418,25 @@ class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRvcOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenControlClusterRevision() + ~SubscribeAttributeRvcOperationalStateOperationalState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MicrowaveOvenControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67863,10 +67447,10 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67879,265 +67463,117 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster OperationalState | 0x0060 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ - /* - * Command Pause + * Attribute OperationalError */ -class OperationalStatePause : public ClusterCommand { +class ReadRvcOperationalStateOperationalError : public ReadAttribute { public: - OperationalStatePause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadRvcOperationalStateOperationalError() + : ReadAttribute("operational-error") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Pause::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command Stop - */ -class OperationalStateStop : public ClusterCommand { -public: - OperationalStateStop() - : ClusterCommand("stop") + ~ReadRvcOperationalStateOperationalError() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RVCOperationalState OperationalError read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command Start - */ -class OperationalStateStart : public ClusterCommand { +class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { public: - OperationalStateStart() - : ClusterCommand("start") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeRvcOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Start::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterStartParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command Resume - */ -class OperationalStateResume : public ClusterCommand { -public: - OperationalStateResume() - : ClusterCommand("resume") + ~SubscribeAttributeRvcOperationalStateOperationalError() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::Commands::Resume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeOperationalErrorWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Attribute PhaseList + * Attribute GeneratedCommandList */ -class ReadOperationalStatePhaseList : public ReadAttribute { +class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadRvcOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalStatePhaseList() + ~ReadRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState PhaseList read Error", error); + LogNSError("RVCOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68146,25 +67582,25 @@ class ReadOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeRvcOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalStatePhaseList() + ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68175,10 +67611,10 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.PhaseList response %@", [value description]); + NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68192,34 +67628,34 @@ class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { }; /* - * Attribute CurrentPhase + * Attribute AcceptedCommandList */ -class ReadOperationalStateCurrentPhase : public ReadAttribute { +class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadRvcOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalStateCurrentPhase() + ~ReadRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CurrentPhase read Error", error); + LogNSError("RVCOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68228,25 +67664,25 @@ class ReadOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeRvcOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalStateCurrentPhase() + ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68257,10 +67693,10 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CurrentPhase response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68273,35 +67709,37 @@ class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CountdownTime + * Attribute EventList */ -class ReadOperationalStateCountdownTime : public ReadAttribute { +class ReadRvcOperationalStateEventList : public ReadAttribute { public: - ReadOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadRvcOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalStateCountdownTime() + ~ReadRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState CountdownTime read Error", error); + LogNSError("RVCOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68310,25 +67748,25 @@ class ReadOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeRvcOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalStateCountdownTime() + ~SubscribeAttributeRvcOperationalStateEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68339,10 +67777,10 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.CountdownTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68355,35 +67793,37 @@ class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalStateList + * Attribute AttributeList */ -class ReadOperationalStateOperationalStateList : public ReadAttribute { +class ReadRvcOperationalStateAttributeList : public ReadAttribute { public: - ReadOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadRvcOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalStateOperationalStateList() + ~ReadRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalStateList read Error", error); + LogNSError("RVCOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68392,25 +67832,25 @@ class ReadOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeRvcOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalStateOperationalStateList() + ~SubscribeAttributeRvcOperationalStateAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68421,10 +67861,10 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalStateList response %@", [value description]); + NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68438,34 +67878,34 @@ class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeA }; /* - * Attribute OperationalState + * Attribute FeatureMap */ -class ReadOperationalStateOperationalState : public ReadAttribute { +class ReadRvcOperationalStateFeatureMap : public ReadAttribute { public: - ReadOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadRvcOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalStateOperationalState() + ~ReadRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalState read Error", error); + LogNSError("RVCOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68474,25 +67914,25 @@ class ReadOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + SubscribeAttributeRvcOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalStateOperationalState() + ~SubscribeAttributeRvcOperationalStateFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68503,10 +67943,10 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalState response %@", [value description]); + NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68520,34 +67960,34 @@ class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttri }; /* - * Attribute OperationalError + * Attribute ClusterRevision */ -class ReadOperationalStateOperationalError : public ReadAttribute { +class ReadRvcOperationalStateClusterRevision : public ReadAttribute { public: - ReadOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadRvcOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalStateOperationalError() + ~ReadRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState OperationalError read Error", error); + LogNSError("RVCOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68556,25 +67996,25 @@ class ReadOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeRvcOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalStateOperationalError() + ~SubscribeAttributeRvcOperationalStateClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68585,10 +68025,10 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68601,35 +68041,679 @@ class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttri } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ScenesManagement | 0x0062 | +|------------------------------------------------------------------------------| +| Commands: | | +| * AddScene | 0x00 | +| * ViewScene | 0x01 | +| * RemoveScene | 0x02 | +| * RemoveAllScenes | 0x03 | +| * StoreScene | 0x04 | +| * RecallScene | 0x05 | +| * GetSceneMembership | 0x06 | +| * CopyScene | 0x40 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LastConfiguredBy | 0x0000 | +| * SceneTableSize | 0x0001 | +| * FabricSceneInfo | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Command AddScene */ -class ReadOperationalStateGeneratedCommandList : public ReadAttribute { +class ScenesManagementAddScene : public ClusterCommand { public: - ReadOperationalStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ScenesManagementAddScene() + : ClusterCommand("add-scene") + , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TransitionTime", 0, UINT32_MAX, &mRequest.transitionTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneName", &mRequest.sceneName); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadOperationalStateGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::AddScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.transitionTime = [NSNumber numberWithUnsignedInt:mRequest.transitionTime]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.extensionFieldSets) { + MTRScenesManagementClusterExtensionFieldSet * newElement_0; + newElement_0 = [MTRScenesManagementClusterExtensionFieldSet new]; + newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.attributeValueList) { + MTRScenesManagementClusterAttributeValuePairStruct * newElement_2; + newElement_2 = [MTRScenesManagementClusterAttributeValuePairStruct new]; + newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; + if (entry_2.valueUnsigned8.HasValue()) { + newElement_2.valueUnsigned8 = [NSNumber numberWithUnsignedChar:entry_2.valueUnsigned8.Value()]; + } else { + newElement_2.valueUnsigned8 = nil; + } + if (entry_2.valueSigned8.HasValue()) { + newElement_2.valueSigned8 = [NSNumber numberWithChar:entry_2.valueSigned8.Value()]; + } else { + newElement_2.valueSigned8 = nil; + } + if (entry_2.valueUnsigned16.HasValue()) { + newElement_2.valueUnsigned16 = [NSNumber numberWithUnsignedShort:entry_2.valueUnsigned16.Value()]; + } else { + newElement_2.valueUnsigned16 = nil; + } + if (entry_2.valueSigned16.HasValue()) { + newElement_2.valueSigned16 = [NSNumber numberWithShort:entry_2.valueSigned16.Value()]; + } else { + newElement_2.valueSigned16 = nil; + } + if (entry_2.valueUnsigned32.HasValue()) { + newElement_2.valueUnsigned32 = [NSNumber numberWithUnsignedInt:entry_2.valueUnsigned32.Value()]; + } else { + newElement_2.valueUnsigned32 = nil; + } + if (entry_2.valueSigned32.HasValue()) { + newElement_2.valueSigned32 = [NSNumber numberWithInt:entry_2.valueSigned32.Value()]; + } else { + newElement_2.valueSigned32 = nil; + } + if (entry_2.valueUnsigned64.HasValue()) { + newElement_2.valueUnsigned64 = [NSNumber numberWithUnsignedLongLong:entry_2.valueUnsigned64.Value()]; + } else { + newElement_2.valueUnsigned64 = nil; + } + if (entry_2.valueSigned64.HasValue()) { + newElement_2.valueSigned64 = [NSNumber numberWithLongLong:entry_2.valueSigned64.Value()]; + } else { + newElement_2.valueSigned64 = nil; + } + [array_2 addObject:newElement_2]; + } + newElement_0.attributeValueList = array_2; + } + [array_0 addObject:newElement_0]; + } + params.extensionFieldSets = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addSceneWithParams:params completion: + ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::AddScene::Type mRequest; + TypedComplexArgument> mComplex_ExtensionFieldSets; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ViewScene + */ +class ScenesManagementViewScene : public ClusterCommand { +public: + ScenesManagementViewScene() + : ClusterCommand("view-scene") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::ViewScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster viewSceneWithParams:params completion: + ^(MTRScenesManagementClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveScene + */ +class ScenesManagementRemoveScene : public ClusterCommand { +public: + ScenesManagementRemoveScene() + : ClusterCommand("remove-scene") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeSceneWithParams:params completion: + ^(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveAllScenes + */ +class ScenesManagementRemoveAllScenes : public ClusterCommand { +public: + ScenesManagementRemoveAllScenes() + : ClusterCommand("remove-all-scenes") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeAllScenesWithParams:params completion: + ^(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StoreScene + */ +class ScenesManagementStoreScene : public ClusterCommand { +public: + ScenesManagementStoreScene() + : ClusterCommand("store-scene") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::StoreScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster storeSceneWithParams:params completion: + ^(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RecallScene + */ +class ScenesManagementRecallScene : public ClusterCommand { +public: + ScenesManagementRecallScene() + : ClusterCommand("recall-scene") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TransitionTime", 0, UINT32_MAX, &mRequest.transitionTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RecallScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.transitionTime.HasValue()) { + if (mRequest.transitionTime.Value().IsNull()) { + params.transitionTime = nil; + } else { + params.transitionTime = [NSNumber numberWithUnsignedInt:mRequest.transitionTime.Value().Value()]; + } + } else { + params.transitionTime = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster recallSceneWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetSceneMembership + */ +class ScenesManagementGetSceneMembership : public ClusterCommand { +public: + ScenesManagementGetSceneMembership() + : ClusterCommand("get-scene-membership") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getSceneMembershipWithParams:params completion: + ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CopyScene + */ +class ScenesManagementCopyScene : public ClusterCommand { +public: + ScenesManagementCopyScene() + : ClusterCommand("copy-scene") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::CopyScene::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRScenesManagementClusterCopySceneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.mode = [NSNumber numberWithUnsignedChar:mRequest.mode.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierFrom]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierFrom]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifierTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierTo]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.sceneIdentifierTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierTo]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster copySceneWithParams:params completion: + ^(MTRScenesManagementClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute LastConfiguredBy + */ +class ReadScenesManagementLastConfiguredBy : public ReadAttribute { +public: + ReadScenesManagementLastConfiguredBy() + : ReadAttribute("last-configured-by") + { + } + + ~ReadScenesManagementLastConfiguredBy() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState GeneratedCommandList read Error", error); + LogNSError("ScenesManagement LastConfiguredBy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68638,25 +68722,25 @@ class ReadOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementLastConfiguredBy : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeScenesManagementLastConfiguredBy() + : SubscribeAttribute("last-configured-by") { } - ~SubscribeAttributeOperationalStateGeneratedCommandList() + ~SubscribeAttributeScenesManagementLastConfiguredBy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68667,10 +68751,10 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeLastConfiguredByWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68683,35 +68767,38 @@ class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute SceneTableSize */ -class ReadOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadScenesManagementSceneTableSize : public ReadAttribute { public: - ReadOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadScenesManagementSceneTableSize() + : ReadAttribute("scene-table-size") { } - ~ReadOperationalStateAcceptedCommandList() + ~ReadScenesManagementSceneTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState AcceptedCommandList read Error", error); + LogNSError("ScenesManagement SceneTableSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68720,25 +68807,25 @@ class ReadOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementSceneTableSize : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeScenesManagementSceneTableSize() + : SubscribeAttribute("scene-table-size") { } - ~SubscribeAttributeOperationalStateAcceptedCommandList() + ~SubscribeAttributeScenesManagementSceneTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68749,10 +68836,10 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSceneTableSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68765,37 +68852,42 @@ class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute FabricSceneInfo */ -class ReadOperationalStateEventList : public ReadAttribute { +class ReadScenesManagementFabricSceneInfo : public ReadAttribute { public: - ReadOperationalStateEventList() - : ReadAttribute("event-list") + ReadScenesManagementFabricSceneInfo() + : ReadAttribute("fabric-scene-info") { } - ~ReadOperationalStateEventList() + ~ReadScenesManagementFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState EventList read Error", error); + LogNSError("ScenesManagement FabricSceneInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68804,25 +68896,25 @@ class ReadOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementFabricSceneInfo : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeScenesManagementFabricSceneInfo() + : SubscribeAttribute("fabric-scene-info") { } - ~SubscribeAttributeOperationalStateEventList() + ~SubscribeAttributeScenesManagementFabricSceneInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68833,10 +68925,10 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFabricSceneInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.EventList response %@", [value description]); + NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68850,36 +68942,37 @@ class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadOperationalStateAttributeList : public ReadAttribute { +class ReadScenesManagementGeneratedCommandList : public ReadAttribute { public: - ReadOperationalStateAttributeList() - : ReadAttribute("attribute-list") + ReadScenesManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalStateAttributeList() + ~ReadScenesManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState AttributeList read Error", error); + LogNSError("ScenesManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68888,25 +68981,25 @@ class ReadOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeScenesManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeScenesManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalStateAttributeList() + ~SubscribeAttributeScenesManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68917,10 +69010,10 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.AttributeList response %@", [value description]); + NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68933,35 +69026,38 @@ class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadOperationalStateFeatureMap : public ReadAttribute { +class ReadScenesManagementAcceptedCommandList : public ReadAttribute { public: - ReadOperationalStateFeatureMap() - : ReadAttribute("feature-map") + ReadScenesManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalStateFeatureMap() + ~ReadScenesManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState FeatureMap read Error", error); + LogNSError("ScenesManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68970,25 +69066,25 @@ class ReadOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeScenesManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeScenesManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalStateFeatureMap() + ~SubscribeAttributeScenesManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68999,10 +69095,10 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69015,35 +69111,38 @@ class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadOperationalStateClusterRevision : public ReadAttribute { +class ReadScenesManagementEventList : public ReadAttribute { public: - ReadOperationalStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadScenesManagementEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalStateClusterRevision() + ~ReadScenesManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalState ClusterRevision read Error", error); + LogNSError("ScenesManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69052,25 +69151,25 @@ class ReadOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeScenesManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeScenesManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalStateClusterRevision() + ~SubscribeAttributeScenesManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69081,10 +69180,10 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalState.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69097,177 +69196,323 @@ class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster RvcOperationalState | 0x0061 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Pause | 0x00 | -| * Resume | 0x03 | -| * GoHome | 0x80 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Command Pause + * Attribute AttributeList */ -class RvcOperationalStatePause : public ClusterCommand { +class ReadScenesManagementAttributeList : public ReadAttribute { public: - RvcOperationalStatePause() - : ClusterCommand("pause") + ReadScenesManagementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadScenesManagementAttributeList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Pause::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ScenesManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command Resume - */ -class RvcOperationalStateResume : public ClusterCommand { +class SubscribeAttributeScenesManagementAttributeList : public SubscribeAttribute { public: - RvcOperationalStateResume() - : ClusterCommand("resume") + SubscribeAttributeScenesManagementAttributeList() + : SubscribeAttribute("attribute-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeScenesManagementAttributeList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::Resume::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } +}; -private: +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute FeatureMap + */ +class ReadScenesManagementFeatureMap : public ReadAttribute { +public: + ReadScenesManagementFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadScenesManagementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ScenesManagement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeScenesManagementFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeScenesManagementFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeScenesManagementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + /* - * Command GoHome + * Attribute ClusterRevision */ -class RvcOperationalStateGoHome : public ClusterCommand { +class ReadScenesManagementClusterRevision : public ReadAttribute { public: - RvcOperationalStateGoHome() - : ClusterCommand("go-home") + ReadScenesManagementClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadScenesManagementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ScenesManagement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeScenesManagementClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeScenesManagementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster HepaFilterMonitoring | 0x0071 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCondition | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * LastChangedTime | 0x0004 | +| * ReplacementProductList | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetCondition + */ +class HepaFilterMonitoringResetCondition : public ClusterCommand { +public: + HepaFilterMonitoringResetCondition() + : ClusterCommand("reset-condition") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcOperationalState::Commands::GoHome::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCOperationalStateClusterGoHomeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goHomeWithParams:params completion: - ^(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetConditionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -69275,37 +69520,35 @@ class RvcOperationalStateGoHome : public ClusterCommand { private: }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute PhaseList + * Attribute Condition */ -class ReadRvcOperationalStatePhaseList : public ReadAttribute { +class ReadHepaFilterMonitoringCondition : public ReadAttribute { public: - ReadRvcOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadHepaFilterMonitoringCondition() + : ReadAttribute("condition") { } - ~ReadRvcOperationalStatePhaseList() + ~ReadHepaFilterMonitoringCondition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState PhaseList read Error", error); + LogNSError("HEPAFilterMonitoring Condition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69314,25 +69557,25 @@ class ReadRvcOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeHepaFilterMonitoringCondition() + : SubscribeAttribute("condition") { } - ~SubscribeAttributeRvcOperationalStatePhaseList() + ~SubscribeAttributeHepaFilterMonitoringCondition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::PhaseList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69343,10 +69586,10 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeConditionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69360,34 +69603,34 @@ class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute }; /* - * Attribute CurrentPhase + * Attribute DegradationDirection */ -class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { +class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { public: - ReadRvcOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadHepaFilterMonitoringDegradationDirection() + : ReadAttribute("degradation-direction") { } - ~ReadRvcOperationalStateCurrentPhase() + ~ReadHepaFilterMonitoringDegradationDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPhaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CurrentPhase read Error", error); + LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69396,25 +69639,25 @@ class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeHepaFilterMonitoringDegradationDirection() + : SubscribeAttribute("degradation-direction") { } - ~SubscribeAttributeRvcOperationalStateCurrentPhase() + ~SubscribeAttributeHepaFilterMonitoringDegradationDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CurrentPhase::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69425,10 +69668,10 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeDegradationDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69442,34 +69685,34 @@ class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttrib }; /* - * Attribute CountdownTime + * Attribute ChangeIndication */ -class ReadRvcOperationalStateCountdownTime : public ReadAttribute { +class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { public: - ReadRvcOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadHepaFilterMonitoringChangeIndication() + : ReadAttribute("change-indication") { } - ~ReadRvcOperationalStateCountdownTime() + ~ReadHepaFilterMonitoringChangeIndication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCountdownTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState CountdownTime read Error", error); + LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69478,25 +69721,25 @@ class ReadRvcOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeHepaFilterMonitoringChangeIndication() + : SubscribeAttribute("change-indication") { } - ~SubscribeAttributeRvcOperationalStateCountdownTime() + ~SubscribeAttributeHepaFilterMonitoringChangeIndication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::CountdownTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69507,10 +69750,10 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeChangeIndicationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.CountdownTime response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69524,34 +69767,34 @@ class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttri }; /* - * Attribute OperationalStateList + * Attribute InPlaceIndicator */ -class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { +class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { public: - ReadRvcOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadHepaFilterMonitoringInPlaceIndicator() + : ReadAttribute("in-place-indicator") { } - ~ReadRvcOperationalStateOperationalStateList() + ~ReadHepaFilterMonitoringInPlaceIndicator() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalStateList read Error", error); + LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69560,25 +69803,25 @@ class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() + : SubscribeAttribute("in-place-indicator") { } - ~SubscribeAttributeRvcOperationalStateOperationalStateList() + ~SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalStateList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69589,10 +69832,10 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeInPlaceIndicatorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69606,34 +69849,34 @@ class SubscribeAttributeRvcOperationalStateOperationalStateList : public Subscri }; /* - * Attribute OperationalState + * Attribute LastChangedTime */ -class ReadRvcOperationalStateOperationalState : public ReadAttribute { +class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { public: - ReadRvcOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadHepaFilterMonitoringLastChangedTime() + : ReadAttribute("last-changed-time") { } - ~ReadRvcOperationalStateOperationalState() + ~ReadHepaFilterMonitoringLastChangedTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalState read Error", error); + LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69642,25 +69885,69 @@ class ReadRvcOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { +class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + WriteHepaFilterMonitoringLastChangedTime() + : WriteAttribute("last-changed-time") { + AddArgument("attr-name", "last-changed-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRvcOperationalStateOperationalState() + ~WriteHepaFilterMonitoringLastChangedTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { +public: + SubscribeAttributeHepaFilterMonitoringLastChangedTime() + : SubscribeAttribute("last-changed-time") + { + } + + ~SubscribeAttributeHepaFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69671,10 +69958,10 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeLastChangedTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69688,34 +69975,34 @@ class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAt }; /* - * Attribute OperationalError + * Attribute ReplacementProductList */ -class ReadRvcOperationalStateOperationalError : public ReadAttribute { +class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { public: - ReadRvcOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadHepaFilterMonitoringReplacementProductList() + : ReadAttribute("replacement-product-list") { } - ~ReadRvcOperationalStateOperationalError() + ~ReadHepaFilterMonitoringReplacementProductList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState OperationalError read Error", error); + LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69724,25 +70011,25 @@ class ReadRvcOperationalStateOperationalError : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeHepaFilterMonitoringReplacementProductList() + : SubscribeAttribute("replacement-product-list") { } - ~SubscribeAttributeRvcOperationalStateOperationalError() + ~SubscribeAttributeHepaFilterMonitoringReplacementProductList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::OperationalError::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69753,10 +70040,10 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeReplacementProductListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69772,32 +70059,32 @@ class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAt /* * Attribute GeneratedCommandList */ -class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateGeneratedCommandList() + ReadHepaFilterMonitoringGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcOperationalStateGeneratedCommandList() + ~ReadHepaFilterMonitoringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState GeneratedCommandList read Error", error); + LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69806,25 +70093,25 @@ class ReadRvcOperationalStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateGeneratedCommandList() + SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcOperationalStateGeneratedCommandList() + ~SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69838,7 +70125,7 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69854,32 +70141,32 @@ class SubscribeAttributeRvcOperationalStateGeneratedCommandList : public Subscri /* * Attribute AcceptedCommandList */ -class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { public: - ReadRvcOperationalStateAcceptedCommandList() + ReadHepaFilterMonitoringAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcOperationalStateAcceptedCommandList() + ~ReadHepaFilterMonitoringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AcceptedCommandList read Error", error); + LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69888,25 +70175,25 @@ class ReadRvcOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAcceptedCommandList() + SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcOperationalStateAcceptedCommandList() + ~SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69920,7 +70207,7 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -69938,32 +70225,32 @@ class SubscribeAttributeRvcOperationalStateAcceptedCommandList : public Subscrib /* * Attribute EventList */ -class ReadRvcOperationalStateEventList : public ReadAttribute { +class ReadHepaFilterMonitoringEventList : public ReadAttribute { public: - ReadRvcOperationalStateEventList() + ReadHepaFilterMonitoringEventList() : ReadAttribute("event-list") { } - ~ReadRvcOperationalStateEventList() + ~ReadHepaFilterMonitoringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState EventList read Error", error); + LogNSError("HEPAFilterMonitoring EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -69972,25 +70259,25 @@ class ReadRvcOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateEventList() + SubscribeAttributeHepaFilterMonitoringEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcOperationalStateEventList() + ~SubscribeAttributeHepaFilterMonitoringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70004,7 +70291,7 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.EventList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70022,32 +70309,32 @@ class SubscribeAttributeRvcOperationalStateEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadRvcOperationalStateAttributeList : public ReadAttribute { +class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { public: - ReadRvcOperationalStateAttributeList() + ReadHepaFilterMonitoringAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcOperationalStateAttributeList() + ~ReadHepaFilterMonitoringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState AttributeList read Error", error); + LogNSError("HEPAFilterMonitoring AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70056,25 +70343,25 @@ class ReadRvcOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateAttributeList() + SubscribeAttributeHepaFilterMonitoringAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcOperationalStateAttributeList() + ~SubscribeAttributeHepaFilterMonitoringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70088,7 +70375,7 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.AttributeList response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70104,32 +70391,32 @@ class SubscribeAttributeRvcOperationalStateAttributeList : public SubscribeAttri /* * Attribute FeatureMap */ -class ReadRvcOperationalStateFeatureMap : public ReadAttribute { +class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { public: - ReadRvcOperationalStateFeatureMap() + ReadHepaFilterMonitoringFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcOperationalStateFeatureMap() + ~ReadHepaFilterMonitoringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState FeatureMap read Error", error); + LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70138,25 +70425,25 @@ class ReadRvcOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateFeatureMap() + SubscribeAttributeHepaFilterMonitoringFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcOperationalStateFeatureMap() + ~SubscribeAttributeHepaFilterMonitoringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70170,7 +70457,7 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.FeatureMap response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70186,32 +70473,32 @@ class SubscribeAttributeRvcOperationalStateFeatureMap : public SubscribeAttribut /* * Attribute ClusterRevision */ -class ReadRvcOperationalStateClusterRevision : public ReadAttribute { +class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { public: - ReadRvcOperationalStateClusterRevision() + ReadHepaFilterMonitoringClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcOperationalStateClusterRevision() + ~ReadHepaFilterMonitoringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCOperationalState ClusterRevision read Error", error); + LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70220,25 +70507,25 @@ class ReadRvcOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcOperationalStateClusterRevision() + SubscribeAttributeHepaFilterMonitoringClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcOperationalStateClusterRevision() + ~SubscribeAttributeHepaFilterMonitoringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RvcOperationalState::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RvcOperationalState::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRVCOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70252,7 +70539,7 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70265,24 +70552,19 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } }; -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ScenesManagement | 0x0062 | +| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | |------------------------------------------------------------------------------| | Commands: | | -| * AddScene | 0x00 | -| * ViewScene | 0x01 | -| * RemoveScene | 0x02 | -| * RemoveAllScenes | 0x03 | -| * StoreScene | 0x04 | -| * RecallScene | 0x05 | -| * GetSceneMembership | 0x06 | -| * CopyScene | 0x40 | +| * ResetCondition | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * LastConfiguredBy | 0x0000 | -| * SceneTableSize | 0x0001 | -| * FabricSceneInfo | 0x0002 | +| * Condition | 0x0000 | +| * DegradationDirection | 0x0001 | +| * ChangeIndication | 0x0002 | +| * InPlaceIndicator | 0x0003 | +| * LastChangedTime | 0x0004 | +| * ReplacementProductList | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -70293,651 +70575,325 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command AddScene + * Command ResetCondition */ -class ScenesManagementAddScene : public ClusterCommand { +class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { public: - ScenesManagementAddScene() - : ClusterCommand("add-scene") - , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) + ActivatedCarbonFilterMonitoringResetCondition() + : ClusterCommand("reset-condition") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TransitionTime", 0, UINT32_MAX, &mRequest.transitionTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneName", &mRequest.sceneName); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExtensionFieldSets", &mComplex_ExtensionFieldSets); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::AddScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterAddSceneParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.transitionTime = [NSNumber numberWithUnsignedInt:mRequest.transitionTime]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneName = [[NSString alloc] initWithBytes:mRequest.sceneName.data() length:mRequest.sceneName.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.extensionFieldSets) { - MTRScenesManagementClusterExtensionFieldSet * newElement_0; - newElement_0 = [MTRScenesManagementClusterExtensionFieldSet new]; - newElement_0.clusterID = [NSNumber numberWithUnsignedInt:entry_0.clusterID]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.attributeValueList) { - MTRScenesManagementClusterAttributeValuePairStruct * newElement_2; - newElement_2 = [MTRScenesManagementClusterAttributeValuePairStruct new]; - newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID]; - if (entry_2.valueUnsigned8.HasValue()) { - newElement_2.valueUnsigned8 = [NSNumber numberWithUnsignedChar:entry_2.valueUnsigned8.Value()]; - } else { - newElement_2.valueUnsigned8 = nil; - } - if (entry_2.valueSigned8.HasValue()) { - newElement_2.valueSigned8 = [NSNumber numberWithChar:entry_2.valueSigned8.Value()]; - } else { - newElement_2.valueSigned8 = nil; - } - if (entry_2.valueUnsigned16.HasValue()) { - newElement_2.valueUnsigned16 = [NSNumber numberWithUnsignedShort:entry_2.valueUnsigned16.Value()]; - } else { - newElement_2.valueUnsigned16 = nil; - } - if (entry_2.valueSigned16.HasValue()) { - newElement_2.valueSigned16 = [NSNumber numberWithShort:entry_2.valueSigned16.Value()]; - } else { - newElement_2.valueSigned16 = nil; - } - if (entry_2.valueUnsigned32.HasValue()) { - newElement_2.valueUnsigned32 = [NSNumber numberWithUnsignedInt:entry_2.valueUnsigned32.Value()]; - } else { - newElement_2.valueUnsigned32 = nil; - } - if (entry_2.valueSigned32.HasValue()) { - newElement_2.valueSigned32 = [NSNumber numberWithInt:entry_2.valueSigned32.Value()]; - } else { - newElement_2.valueSigned32 = nil; - } - if (entry_2.valueUnsigned64.HasValue()) { - newElement_2.valueUnsigned64 = [NSNumber numberWithUnsignedLongLong:entry_2.valueUnsigned64.Value()]; - } else { - newElement_2.valueUnsigned64 = nil; - } - if (entry_2.valueSigned64.HasValue()) { - newElement_2.valueSigned64 = [NSNumber numberWithLongLong:entry_2.valueSigned64.Value()]; - } else { - newElement_2.valueSigned64 = nil; - } - [array_2 addObject:newElement_2]; - } - newElement_0.attributeValueList = array_2; - } - [array_0 addObject:newElement_0]; - } - params.extensionFieldSets = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addSceneWithParams:params completion: - ^(MTRScenesManagementClusterAddSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::AddSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster resetConditionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ScenesManagement::Commands::AddScene::Type mRequest; - TypedComplexArgument> mComplex_ExtensionFieldSets; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command ViewScene + * Attribute Condition */ -class ScenesManagementViewScene : public ClusterCommand { +class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { public: - ScenesManagementViewScene() - : ClusterCommand("view-scene") + ReadActivatedCarbonFilterMonitoringCondition() + : ReadAttribute("condition") + { + } + + ~ReadActivatedCarbonFilterMonitoringCondition() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::ViewScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster viewSceneWithParams:params completion: - ^(MTRScenesManagementClusterViewSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::ViewSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command RemoveScene - */ -class ScenesManagementRemoveScene : public ClusterCommand { +class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public SubscribeAttribute { public: - ScenesManagementRemoveScene() - : ClusterCommand("remove-scene") + SubscribeAttributeActivatedCarbonFilterMonitoringCondition() + : SubscribeAttribute("condition") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeActivatedCarbonFilterMonitoringCondition() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeSceneWithParams:params completion: - ^(MTRScenesManagementClusterRemoveSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeConditionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::RemoveScene::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command RemoveAllScenes + * Attribute DegradationDirection */ -class ScenesManagementRemoveAllScenes : public ClusterCommand { +class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttribute { public: - ScenesManagementRemoveAllScenes() - : ClusterCommand("remove-all-scenes") + ReadActivatedCarbonFilterMonitoringDegradationDirection() + : ReadAttribute("degradation-direction") + { + } + + ~ReadActivatedCarbonFilterMonitoringDegradationDirection() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeAllScenesWithParams:params completion: - ^(MTRScenesManagementClusterRemoveAllScenesResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command StoreScene - */ -class ScenesManagementStoreScene : public ClusterCommand { +class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : public SubscribeAttribute { public: - ScenesManagementStoreScene() - : ClusterCommand("store-scene") + SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() + : SubscribeAttribute("degradation-direction") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::StoreScene::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster storeSceneWithParams:params completion: - ^(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeDegradationDirectionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command RecallScene + * Attribute ChangeIndication */ -class ScenesManagementRecallScene : public ClusterCommand { +class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute { public: - ScenesManagementRecallScene() - : ClusterCommand("recall-scene") + ReadActivatedCarbonFilterMonitoringChangeIndication() + : ReadAttribute("change-indication") + { + } + + ~ReadActivatedCarbonFilterMonitoringChangeIndication() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("TransitionTime", 0, UINT32_MAX, &mRequest.transitionTime); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::RecallScene::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.transitionTime.HasValue()) { - if (mRequest.transitionTime.Value().IsNull()) { - params.transitionTime = nil; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - params.transitionTime = [NSNumber numberWithUnsignedInt:mRequest.transitionTime.Value().Value()]; + LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - } else { - params.transitionTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster recallSceneWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetSceneMembership - */ -class ScenesManagementGetSceneMembership : public ClusterCommand { +class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public SubscribeAttribute { public: - ScenesManagementGetSceneMembership() - : ClusterCommand("get-scene-membership") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() + : SubscribeAttribute("change-indication") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getSceneMembershipWithParams:params completion: - ^(MTRScenesManagementClusterGetSceneMembershipResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CopyScene - */ -class ScenesManagementCopyScene : public ClusterCommand { -public: - ScenesManagementCopyScene() - : ClusterCommand("copy-scene") + ~SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupIdentifierFrom", 0, UINT16_MAX, &mRequest.groupIdentifierFrom); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneIdentifierFrom", 0, UINT8_MAX, &mRequest.sceneIdentifierFrom); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupIdentifierTo", 0, UINT16_MAX, &mRequest.groupIdentifierTo); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SceneIdentifierTo", 0, UINT8_MAX, &mRequest.sceneIdentifierTo); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ScenesManagement::Commands::CopyScene::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRScenesManagementClusterCopySceneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.mode = [NSNumber numberWithUnsignedChar:mRequest.mode.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierFrom]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierFrom]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.groupIdentifierTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierTo]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.sceneIdentifierTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierTo]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster copySceneWithParams:params completion: - ^(MTRScenesManagementClusterCopySceneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeChangeIndicationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute LastConfiguredBy + * Attribute InPlaceIndicator */ -class ReadScenesManagementLastConfiguredBy : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute { public: - ReadScenesManagementLastConfiguredBy() - : ReadAttribute("last-configured-by") + ReadActivatedCarbonFilterMonitoringInPlaceIndicator() + : ReadAttribute("in-place-indicator") { } - ~ReadScenesManagementLastConfiguredBy() + ~ReadActivatedCarbonFilterMonitoringInPlaceIndicator() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConfiguredByWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement LastConfiguredBy read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -70946,25 +70902,25 @@ class ReadScenesManagementLastConfiguredBy : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementLastConfiguredBy : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementLastConfiguredBy() - : SubscribeAttribute("last-configured-by") + SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() + : SubscribeAttribute("in-place-indicator") { } - ~SubscribeAttributeScenesManagementLastConfiguredBy() + ~SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::LastConfiguredBy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70975,10 +70931,10 @@ class SubscribeAttributeScenesManagementLastConfiguredBy : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastConfiguredByWithParams:params + [cluster subscribeAttributeInPlaceIndicatorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.LastConfiguredBy response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -70991,38 +70947,35 @@ class SubscribeAttributeScenesManagementLastConfiguredBy : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SceneTableSize + * Attribute LastChangedTime */ -class ReadScenesManagementSceneTableSize : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute { public: - ReadScenesManagementSceneTableSize() - : ReadAttribute("scene-table-size") + ReadActivatedCarbonFilterMonitoringLastChangedTime() + : ReadAttribute("last-changed-time") { } - ~ReadScenesManagementSceneTableSize() + ~ReadActivatedCarbonFilterMonitoringLastChangedTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSceneTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement SceneTableSize read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71031,25 +70984,69 @@ class ReadScenesManagementSceneTableSize : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementSceneTableSize : public SubscribeAttribute { +class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribute { public: - SubscribeAttributeScenesManagementSceneTableSize() - : SubscribeAttribute("scene-table-size") + WriteActivatedCarbonFilterMonitoringLastChangedTime() + : WriteAttribute("last-changed-time") { + AddArgument("attr-name", "last-changed-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeScenesManagementSceneTableSize() + ~WriteActivatedCarbonFilterMonitoringLastChangedTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::SceneTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { +public: + SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + : SubscribeAttribute("last-changed-time") + { + } + + ~SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71060,10 +71057,10 @@ class SubscribeAttributeScenesManagementSceneTableSize : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSceneTableSizeWithParams:params + [cluster subscribeAttributeLastChangedTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.SceneTableSize response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71076,42 +71073,35 @@ class SubscribeAttributeScenesManagementSceneTableSize : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FabricSceneInfo + * Attribute ReplacementProductList */ -class ReadScenesManagementFabricSceneInfo : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAttribute { public: - ReadScenesManagementFabricSceneInfo() - : ReadAttribute("fabric-scene-info") + ReadActivatedCarbonFilterMonitoringReplacementProductList() + : ReadAttribute("replacement-product-list") { } - ~ReadScenesManagementFabricSceneInfo() + ~ReadActivatedCarbonFilterMonitoringReplacementProductList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeFabricSceneInfoWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement FabricSceneInfo read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71120,25 +71110,25 @@ class ReadScenesManagementFabricSceneInfo : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementFabricSceneInfo : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementFabricSceneInfo() - : SubscribeAttribute("fabric-scene-info") + SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() + : SubscribeAttribute("replacement-product-list") { } - ~SubscribeAttributeScenesManagementFabricSceneInfo() + ~SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FabricSceneInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71149,10 +71139,10 @@ class SubscribeAttributeScenesManagementFabricSceneInfo : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFabricSceneInfoWithParams:params + [cluster subscribeAttributeReplacementProductListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.FabricSceneInfo response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71165,38 +71155,35 @@ class SubscribeAttributeScenesManagementFabricSceneInfo : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadScenesManagementGeneratedCommandList : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttribute { public: - ReadScenesManagementGeneratedCommandList() + ReadActivatedCarbonFilterMonitoringGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadScenesManagementGeneratedCommandList() + ~ReadActivatedCarbonFilterMonitoringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement GeneratedCommandList read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71205,25 +71192,25 @@ class ReadScenesManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementGeneratedCommandList() + SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeScenesManagementGeneratedCommandList() + ~SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71237,7 +71224,7 @@ class SubscribeAttributeScenesManagementGeneratedCommandList : public SubscribeA [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71250,38 +71237,35 @@ class SubscribeAttributeScenesManagementGeneratedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadScenesManagementAcceptedCommandList : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttribute { public: - ReadScenesManagementAcceptedCommandList() + ReadActivatedCarbonFilterMonitoringAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadScenesManagementAcceptedCommandList() + ~ReadActivatedCarbonFilterMonitoringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement AcceptedCommandList read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71290,25 +71274,25 @@ class ReadScenesManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementAcceptedCommandList() + SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeScenesManagementAcceptedCommandList() + ~SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71322,7 +71306,7 @@ class SubscribeAttributeScenesManagementAcceptedCommandList : public SubscribeAt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71335,38 +71319,37 @@ class SubscribeAttributeScenesManagementAcceptedCommandList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadScenesManagementEventList : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { public: - ReadScenesManagementEventList() + ReadActivatedCarbonFilterMonitoringEventList() : ReadAttribute("event-list") { } - ~ReadScenesManagementEventList() + ~ReadActivatedCarbonFilterMonitoringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.EventList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement EventList read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71375,25 +71358,25 @@ class ReadScenesManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementEventList : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementEventList() + SubscribeAttributeActivatedCarbonFilterMonitoringEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeScenesManagementEventList() + ~SubscribeAttributeActivatedCarbonFilterMonitoringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71407,7 +71390,7 @@ class SubscribeAttributeScenesManagementEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.EventList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71421,37 +71404,36 @@ class SubscribeAttributeScenesManagementEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadScenesManagementAttributeList : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { public: - ReadScenesManagementAttributeList() + ReadActivatedCarbonFilterMonitoringAttributeList() : ReadAttribute("attribute-list") { } - ~ReadScenesManagementAttributeList() + ~ReadActivatedCarbonFilterMonitoringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.AttributeList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement AttributeList read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71460,25 +71442,25 @@ class ReadScenesManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementAttributeList() + SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeScenesManagementAttributeList() + ~SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71492,7 +71474,7 @@ class SubscribeAttributeScenesManagementAttributeList : public SubscribeAttribut [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.AttributeList response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71505,38 +71487,35 @@ class SubscribeAttributeScenesManagementAttributeList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadScenesManagementFeatureMap : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { public: - ReadScenesManagementFeatureMap() + ReadActivatedCarbonFilterMonitoringFeatureMap() : ReadAttribute("feature-map") { } - ~ReadScenesManagementFeatureMap() + ~ReadActivatedCarbonFilterMonitoringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement FeatureMap read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71545,25 +71524,25 @@ class ReadScenesManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementFeatureMap() + SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeScenesManagementFeatureMap() + ~SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71577,7 +71556,7 @@ class SubscribeAttributeScenesManagementFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.FeatureMap response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71590,38 +71569,35 @@ class SubscribeAttributeScenesManagementFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadScenesManagementClusterRevision : public ReadAttribute { +class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute { public: - ReadScenesManagementClusterRevision() + ReadActivatedCarbonFilterMonitoringClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadScenesManagementClusterRevision() + ~ReadActivatedCarbonFilterMonitoringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ScenesManagement ClusterRevision read Error", error); + LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71630,25 +71606,25 @@ class ReadScenesManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeScenesManagementClusterRevision() + SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeScenesManagementClusterRevision() + ~SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ScenesManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ScenesManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterScenesManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71662,7 +71638,7 @@ class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttrib [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ScenesManagement.ClusterRevision response %@", [value description]); + NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71675,21 +71651,22 @@ class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster HepaFilterMonitoring | 0x0071 | +| Cluster BooleanStateConfiguration | 0x0080 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * SuppressAlarm | 0x00 | +| * EnableDisableAlarm | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * LastChangedTime | 0x0004 | -| * ReplacementProductList | 0x0005 | +| * CurrentSensitivityLevel | 0x0000 | +| * SupportedSensitivityLevels | 0x0001 | +| * DefaultSensitivityLevel | 0x0002 | +| * AlarmsActive | 0x0003 | +| * AlarmsSuppressed | 0x0004 | +| * AlarmsEnabled | 0x0005 | +| * AlarmsSupported | 0x0006 | +| * SensorFault | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -71698,81 +71675,133 @@ class SubscribeAttributeScenesManagementClusterRevision : public SubscribeAttrib | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * AlarmsStateChanged | 0x0000 | +| * SensorFault | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command SuppressAlarm */ -class HepaFilterMonitoringResetCondition : public ClusterCommand { +class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { public: - HepaFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") + BooleanStateConfigurationSuppressAlarm() + : ClusterCommand("suppress-alarm") { + AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetConditionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster suppressAlarmWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; }; /* - * Attribute Condition + * Command EnableDisableAlarm */ -class ReadHepaFilterMonitoringCondition : public ReadAttribute { +class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { public: - ReadHepaFilterMonitoringCondition() - : ReadAttribute("condition") + BooleanStateConfigurationEnableDisableAlarm() + : ClusterCommand("enable-disable-alarm") { + AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); + ClusterCommand::AddArguments(); } - ~ReadHepaFilterMonitoringCondition() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.alarmsToEnableDisable = [NSNumber numberWithUnsignedChar:mRequest.alarmsToEnableDisable.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableDisableAlarmWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; +}; + +/* + * Attribute CurrentSensitivityLevel + */ +class ReadBooleanStateConfigurationCurrentSensitivityLevel : public ReadAttribute { +public: + ReadBooleanStateConfigurationCurrentSensitivityLevel() + : ReadAttribute("current-sensitivity-level") + { + } + + ~ReadBooleanStateConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring Condition read Error", error); + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71781,25 +71810,66 @@ class ReadHepaFilterMonitoringCondition : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribute { +class WriteBooleanStateConfigurationCurrentSensitivityLevel : public WriteAttribute { public: - SubscribeAttributeHepaFilterMonitoringCondition() - : SubscribeAttribute("condition") + WriteBooleanStateConfigurationCurrentSensitivityLevel() + : WriteAttribute("current-sensitivity-level") { + AddArgument("attr-name", "current-sensitivity-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeHepaFilterMonitoringCondition() + ~WriteBooleanStateConfigurationCurrentSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeCurrentSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BooleanStateConfiguration CurrentSensitivityLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() + : SubscribeAttribute("current-sensitivity-level") + { + } + + ~SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71810,10 +71880,10 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeCurrentSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.Condition response %@", [value description]); + NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71827,34 +71897,34 @@ class SubscribeAttributeHepaFilterMonitoringCondition : public SubscribeAttribut }; /* - * Attribute DegradationDirection + * Attribute SupportedSensitivityLevels */ -class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadBooleanStateConfigurationSupportedSensitivityLevels : public ReadAttribute { public: - ReadHepaFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadBooleanStateConfigurationSupportedSensitivityLevels() + : ReadAttribute("supported-sensitivity-levels") { } - ~ReadHepaFilterMonitoringDegradationDirection() + ~ReadBooleanStateConfigurationSupportedSensitivityLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedSensitivityLevelsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring DegradationDirection read Error", error); + LogNSError("BooleanStateConfiguration SupportedSensitivityLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71863,25 +71933,25 @@ class ReadHepaFilterMonitoringDegradationDirection : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() + : SubscribeAttribute("supported-sensitivity-levels") { } - ~SubscribeAttributeHepaFilterMonitoringDegradationDirection() + ~SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71892,10 +71962,10 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeSupportedSensitivityLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.DegradationDirection response %@", [value description]); + NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71909,34 +71979,34 @@ class SubscribeAttributeHepaFilterMonitoringDegradationDirection : public Subscr }; /* - * Attribute ChangeIndication + * Attribute DefaultSensitivityLevel */ -class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { +class ReadBooleanStateConfigurationDefaultSensitivityLevel : public ReadAttribute { public: - ReadHepaFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadBooleanStateConfigurationDefaultSensitivityLevel() + : ReadAttribute("default-sensitivity-level") { } - ~ReadHepaFilterMonitoringChangeIndication() + ~ReadBooleanStateConfigurationDefaultSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ChangeIndication read Error", error); + LogNSError("BooleanStateConfiguration DefaultSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -71945,25 +72015,25 @@ class ReadHepaFilterMonitoringChangeIndication : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() + : SubscribeAttribute("default-sensitivity-level") { } - ~SubscribeAttributeHepaFilterMonitoringChangeIndication() + ~SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71974,10 +72044,10 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeDefaultSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -71991,34 +72061,34 @@ class SubscribeAttributeHepaFilterMonitoringChangeIndication : public SubscribeA }; /* - * Attribute InPlaceIndicator + * Attribute AlarmsActive */ -class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsActive : public ReadAttribute { public: - ReadHepaFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadBooleanStateConfigurationAlarmsActive() + : ReadAttribute("alarms-active") { } - ~ReadHepaFilterMonitoringInPlaceIndicator() + ~ReadBooleanStateConfigurationAlarmsActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("BooleanStateConfiguration AlarmsActive read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72027,25 +72097,25 @@ class ReadHepaFilterMonitoringInPlaceIndicator : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeBooleanStateConfigurationAlarmsActive() + : SubscribeAttribute("alarms-active") { } - ~SubscribeAttributeHepaFilterMonitoringInPlaceIndicator() + ~SubscribeAttributeBooleanStateConfigurationAlarmsActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72056,10 +72126,10 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeAlarmsActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72073,34 +72143,34 @@ class SubscribeAttributeHepaFilterMonitoringInPlaceIndicator : public SubscribeA }; /* - * Attribute LastChangedTime + * Attribute AlarmsSuppressed */ -class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { +class ReadBooleanStateConfigurationAlarmsSuppressed : public ReadAttribute { public: - ReadHepaFilterMonitoringLastChangedTime() - : ReadAttribute("last-changed-time") + ReadBooleanStateConfigurationAlarmsSuppressed() + : ReadAttribute("alarms-suppressed") { } - ~ReadHepaFilterMonitoringLastChangedTime() + ~ReadBooleanStateConfigurationAlarmsSuppressed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSuppressedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring LastChangedTime read Error", error); + LogNSError("BooleanStateConfiguration AlarmsSuppressed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72109,69 +72179,189 @@ class ReadHepaFilterMonitoringLastChangedTime : public ReadAttribute { } }; -class WriteHepaFilterMonitoringLastChangedTime : public WriteAttribute { +class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public SubscribeAttribute { public: - WriteHepaFilterMonitoringLastChangedTime() - : WriteAttribute("last-changed-time") + SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() + : SubscribeAttribute("alarms-suppressed") { - AddArgument("attr-name", "last-changed-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteHepaFilterMonitoringLastChangedTime() + ~SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAlarmsSuppressedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("HEPAFilterMonitoring LastChangedTime write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AlarmsEnabled + */ +class ReadBooleanStateConfigurationAlarmsEnabled : public ReadAttribute { +public: + ReadBooleanStateConfigurationAlarmsEnabled() + : ReadAttribute("alarms-enabled") + { + } + + ~ReadBooleanStateConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::DataModel::Nullable mValue; +class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() + : SubscribeAttribute("alarms-enabled") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAlarmsEnabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAttribute { +/* + * Attribute AlarmsSupported + */ +class ReadBooleanStateConfigurationAlarmsSupported : public ReadAttribute { public: - SubscribeAttributeHepaFilterMonitoringLastChangedTime() - : SubscribeAttribute("last-changed-time") + ReadBooleanStateConfigurationAlarmsSupported() + : ReadAttribute("alarms-supported") { } - ~SubscribeAttributeHepaFilterMonitoringLastChangedTime() + ~ReadBooleanStateConfigurationAlarmsSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAlarmsSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BooleanStateConfiguration AlarmsSupported read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public SubscribeAttribute { +public: + SubscribeAttributeBooleanStateConfigurationAlarmsSupported() + : SubscribeAttribute("alarms-supported") + { + } + + ~SubscribeAttributeBooleanStateConfigurationAlarmsSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72182,10 +72372,10 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastChangedTimeWithParams:params + [cluster subscribeAttributeAlarmsSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.LastChangedTime response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72199,34 +72389,34 @@ class SubscribeAttributeHepaFilterMonitoringLastChangedTime : public SubscribeAt }; /* - * Attribute ReplacementProductList + * Attribute SensorFault */ -class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { +class ReadBooleanStateConfigurationSensorFault : public ReadAttribute { public: - ReadHepaFilterMonitoringReplacementProductList() - : ReadAttribute("replacement-product-list") + ReadBooleanStateConfigurationSensorFault() + : ReadAttribute("sensor-fault") { } - ~ReadHepaFilterMonitoringReplacementProductList() + ~ReadBooleanStateConfigurationSensorFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSensorFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ReplacementProductList read Error", error); + LogNSError("BooleanStateConfiguration SensorFault read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72235,25 +72425,25 @@ class ReadHepaFilterMonitoringReplacementProductList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringReplacementProductList() - : SubscribeAttribute("replacement-product-list") + SubscribeAttributeBooleanStateConfigurationSensorFault() + : SubscribeAttribute("sensor-fault") { } - ~SubscribeAttributeHepaFilterMonitoringReplacementProductList() + ~SubscribeAttributeBooleanStateConfigurationSensorFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72264,10 +72454,10 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReplacementProductListWithParams:params + [cluster subscribeAttributeSensorFaultWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ReplacementProductList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72283,32 +72473,32 @@ class SubscribeAttributeHepaFilterMonitoringReplacementProductList : public Subs /* * Attribute GeneratedCommandList */ -class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadBooleanStateConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadHepaFilterMonitoringGeneratedCommandList() + ReadBooleanStateConfigurationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadHepaFilterMonitoringGeneratedCommandList() + ~ReadBooleanStateConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("BooleanStateConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72317,25 +72507,25 @@ class ReadHepaFilterMonitoringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() + SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeHepaFilterMonitoringGeneratedCommandList() + ~SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72349,7 +72539,7 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72365,32 +72555,32 @@ class SubscribeAttributeHepaFilterMonitoringGeneratedCommandList : public Subscr /* * Attribute AcceptedCommandList */ -class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadBooleanStateConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadHepaFilterMonitoringAcceptedCommandList() + ReadBooleanStateConfigurationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadHepaFilterMonitoringAcceptedCommandList() + ~ReadBooleanStateConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("BooleanStateConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72399,25 +72589,25 @@ class ReadHepaFilterMonitoringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() + SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeHepaFilterMonitoringAcceptedCommandList() + ~SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72431,7 +72621,7 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72449,32 +72639,32 @@ class SubscribeAttributeHepaFilterMonitoringAcceptedCommandList : public Subscri /* * Attribute EventList */ -class ReadHepaFilterMonitoringEventList : public ReadAttribute { +class ReadBooleanStateConfigurationEventList : public ReadAttribute { public: - ReadHepaFilterMonitoringEventList() + ReadBooleanStateConfigurationEventList() : ReadAttribute("event-list") { } - ~ReadHepaFilterMonitoringEventList() + ~ReadBooleanStateConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring EventList read Error", error); + LogNSError("BooleanStateConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72483,25 +72673,25 @@ class ReadHepaFilterMonitoringEventList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringEventList() + SubscribeAttributeBooleanStateConfigurationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeHepaFilterMonitoringEventList() + ~SubscribeAttributeBooleanStateConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72515,7 +72705,7 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.EventList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72533,32 +72723,32 @@ class SubscribeAttributeHepaFilterMonitoringEventList : public SubscribeAttribut /* * Attribute AttributeList */ -class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { +class ReadBooleanStateConfigurationAttributeList : public ReadAttribute { public: - ReadHepaFilterMonitoringAttributeList() + ReadBooleanStateConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadHepaFilterMonitoringAttributeList() + ~ReadBooleanStateConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring AttributeList read Error", error); + LogNSError("BooleanStateConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72567,25 +72757,25 @@ class ReadHepaFilterMonitoringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringAttributeList() + SubscribeAttributeBooleanStateConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeHepaFilterMonitoringAttributeList() + ~SubscribeAttributeBooleanStateConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72599,7 +72789,7 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.AttributeList response %@", [value description]); + NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72615,32 +72805,32 @@ class SubscribeAttributeHepaFilterMonitoringAttributeList : public SubscribeAttr /* * Attribute FeatureMap */ -class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { +class ReadBooleanStateConfigurationFeatureMap : public ReadAttribute { public: - ReadHepaFilterMonitoringFeatureMap() + ReadBooleanStateConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadHepaFilterMonitoringFeatureMap() + ~ReadBooleanStateConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring FeatureMap read Error", error); + LogNSError("BooleanStateConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72649,25 +72839,25 @@ class ReadHepaFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringFeatureMap() + SubscribeAttributeBooleanStateConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeHepaFilterMonitoringFeatureMap() + ~SubscribeAttributeBooleanStateConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72681,7 +72871,7 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72697,32 +72887,32 @@ class SubscribeAttributeHepaFilterMonitoringFeatureMap : public SubscribeAttribu /* * Attribute ClusterRevision */ -class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { +class ReadBooleanStateConfigurationClusterRevision : public ReadAttribute { public: - ReadHepaFilterMonitoringClusterRevision() + ReadBooleanStateConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadHepaFilterMonitoringClusterRevision() + ~ReadBooleanStateConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("HEPAFilterMonitoring ClusterRevision read Error", error); + LogNSError("BooleanStateConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72731,25 +72921,25 @@ class ReadHepaFilterMonitoringClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBooleanStateConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeHepaFilterMonitoringClusterRevision() + SubscribeAttributeBooleanStateConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeHepaFilterMonitoringClusterRevision() + ~SubscribeAttributeBooleanStateConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::HepaFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::HepaFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterHEPAFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72763,7 +72953,7 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"HEPAFilterMonitoring.ClusterRevision response %@", [value description]); + NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72777,18 +72967,24 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt }; /*----------------------------------------------------------------------------*\ -| Cluster ActivatedCarbonFilterMonitoring | 0x0072 | +| Cluster ValveConfigurationAndControl | 0x0081 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCondition | 0x00 | +| * Open | 0x00 | +| * Close | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Condition | 0x0000 | -| * DegradationDirection | 0x0001 | -| * ChangeIndication | 0x0002 | -| * InPlaceIndicator | 0x0003 | -| * LastChangedTime | 0x0004 | -| * ReplacementProductList | 0x0005 | +| * OpenDuration | 0x0000 | +| * DefaultOpenDuration | 0x0001 | +| * AutoCloseTime | 0x0002 | +| * RemainingDuration | 0x0003 | +| * CurrentState | 0x0004 | +| * TargetState | 0x0005 | +| * CurrentLevel | 0x0006 | +| * TargetLevel | 0x0007 | +| * DefaultOpenLevel | 0x0008 | +| * ValveFault | 0x0009 | +| * LevelStep | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -72797,81 +72993,144 @@ class SubscribeAttributeHepaFilterMonitoringClusterRevision : public SubscribeAt | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * ValveStateChanged | 0x0000 | +| * ValveFault | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ResetCondition + * Command Open */ -class ActivatedCarbonFilterMonitoringResetCondition : public ClusterCommand { +class ValveConfigurationAndControlOpen : public ClusterCommand { public: - ActivatedCarbonFilterMonitoringResetCondition() - : ClusterCommand("reset-condition") + ValveConfigurationAndControlOpen() + : ClusterCommand("open") { + AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); + AddArgument("TargetLevel", 0, UINT8_MAX, &mRequest.targetLevel); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.openDuration.HasValue()) { + if (mRequest.openDuration.Value().IsNull()) { + params.openDuration = nil; + } else { + params.openDuration = [NSNumber numberWithUnsignedInt:mRequest.openDuration.Value().Value()]; + } + } else { + params.openDuration = nil; + } + if (mRequest.targetLevel.HasValue()) { + params.targetLevel = [NSNumber numberWithUnsignedChar:mRequest.targetLevel.Value()]; + } else { + params.targetLevel = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetConditionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster openWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type mRequest; }; /* - * Attribute Condition + * Command Close */ -class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { +class ValveConfigurationAndControlClose : public ClusterCommand { public: - ReadActivatedCarbonFilterMonitoringCondition() - : ReadAttribute("condition") + ValveConfigurationAndControlClose() + : ClusterCommand("close") { + ClusterCommand::AddArguments(); } - ~ReadActivatedCarbonFilterMonitoringCondition() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster closeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute OpenDuration + */ +class ReadValveConfigurationAndControlOpenDuration : public ReadAttribute { +public: + ReadValveConfigurationAndControlOpenDuration() + : ReadAttribute("open-duration") + { + } + + ~ReadValveConfigurationAndControlOpenDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConditionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring Condition read Error", error); + LogNSError("ValveConfigurationAndControl OpenDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72880,25 +73139,25 @@ class ReadActivatedCarbonFilterMonitoringCondition : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlOpenDuration : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringCondition() - : SubscribeAttribute("condition") + SubscribeAttributeValveConfigurationAndControlOpenDuration() + : SubscribeAttribute("open-duration") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringCondition() + ~SubscribeAttributeValveConfigurationAndControlOpenDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::Condition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72909,10 +73168,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConditionWithParams:params + [cluster subscribeAttributeOpenDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.Condition response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -72926,34 +73185,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringCondition : public Subscr }; /* - * Attribute DegradationDirection + * Attribute DefaultOpenDuration */ -class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttribute { +class ReadValveConfigurationAndControlDefaultOpenDuration : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringDegradationDirection() - : ReadAttribute("degradation-direction") + ReadValveConfigurationAndControlDefaultOpenDuration() + : ReadAttribute("default-open-duration") { } - ~ReadActivatedCarbonFilterMonitoringDegradationDirection() + ~ReadValveConfigurationAndControlDefaultOpenDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDegradationDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring DegradationDirection read Error", error); + LogNSError("ValveConfigurationAndControl DefaultOpenDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -72962,25 +73221,69 @@ class ReadActivatedCarbonFilterMonitoringDegradationDirection : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : public SubscribeAttribute { +class WriteValveConfigurationAndControlDefaultOpenDuration : public WriteAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() - : SubscribeAttribute("degradation-direction") + WriteValveConfigurationAndControlDefaultOpenDuration() + : WriteAttribute("default-open-duration") { + AddArgument("attr-name", "default-open-duration"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection() + ~WriteValveConfigurationAndControlDefaultOpenDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::DegradationDirection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeDefaultOpenDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl DefaultOpenDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() + : SubscribeAttribute("default-open-duration") + { + } + + ~SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72991,10 +73294,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDegradationDirectionWithParams:params + [cluster subscribeAttributeDefaultOpenDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.DegradationDirection response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73008,34 +73311,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringDegradationDirection : pu }; /* - * Attribute ChangeIndication + * Attribute AutoCloseTime */ -class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute { +class ReadValveConfigurationAndControlAutoCloseTime : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringChangeIndication() - : ReadAttribute("change-indication") + ReadValveConfigurationAndControlAutoCloseTime() + : ReadAttribute("auto-close-time") { } - ~ReadActivatedCarbonFilterMonitoringChangeIndication() + ~ReadValveConfigurationAndControlAutoCloseTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChangeIndicationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAutoCloseTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ChangeIndication read Error", error); + LogNSError("ValveConfigurationAndControl AutoCloseTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73044,25 +73347,25 @@ class ReadActivatedCarbonFilterMonitoringChangeIndication : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() - : SubscribeAttribute("change-indication") + SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + : SubscribeAttribute("auto-close-time") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication() + ~SubscribeAttributeValveConfigurationAndControlAutoCloseTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ChangeIndication::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73073,10 +73376,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChangeIndicationWithParams:params + [cluster subscribeAttributeAutoCloseTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ChangeIndication response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73090,34 +73393,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringChangeIndication : public }; /* - * Attribute InPlaceIndicator + * Attribute RemainingDuration */ -class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute { +class ReadValveConfigurationAndControlRemainingDuration : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringInPlaceIndicator() - : ReadAttribute("in-place-indicator") + ReadValveConfigurationAndControlRemainingDuration() + : ReadAttribute("remaining-duration") { } - ~ReadActivatedCarbonFilterMonitoringInPlaceIndicator() + ~ReadValveConfigurationAndControlRemainingDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInPlaceIndicatorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring InPlaceIndicator read Error", error); + LogNSError("ValveConfigurationAndControl RemainingDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73126,25 +73429,25 @@ class ReadActivatedCarbonFilterMonitoringInPlaceIndicator : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() - : SubscribeAttribute("in-place-indicator") + SubscribeAttributeValveConfigurationAndControlRemainingDuration() + : SubscribeAttribute("remaining-duration") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator() + ~SubscribeAttributeValveConfigurationAndControlRemainingDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::InPlaceIndicator::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73155,10 +73458,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInPlaceIndicatorWithParams:params + [cluster subscribeAttributeRemainingDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.InPlaceIndicator response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73172,105 +73475,61 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringInPlaceIndicator : public }; /* - * Attribute LastChangedTime + * Attribute CurrentState */ -class ReadActivatedCarbonFilterMonitoringLastChangedTime : public ReadAttribute { +class ReadValveConfigurationAndControlCurrentState : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringLastChangedTime() - : ReadAttribute("last-changed-time") + ReadValveConfigurationAndControlCurrentState() + : ReadAttribute("current-state") { } - ~ReadActivatedCarbonFilterMonitoringLastChangedTime() + ~ReadValveConfigurationAndControlCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastChangedTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteActivatedCarbonFilterMonitoringLastChangedTime : public WriteAttribute { -public: - WriteActivatedCarbonFilterMonitoringLastChangedTime() - : WriteAttribute("last-changed-time") - { - AddArgument("attr-name", "last-changed-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteActivatedCarbonFilterMonitoringLastChangedTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLastChangedTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ActivatedCarbonFilterMonitoring LastChangedTime write Error", error); + LogNSError("ValveConfigurationAndControl CurrentState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlCurrentState : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() - : SubscribeAttribute("last-changed-time") + SubscribeAttributeValveConfigurationAndControlCurrentState() + : SubscribeAttribute("current-state") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime() + ~SubscribeAttributeValveConfigurationAndControlCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::LastChangedTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73281,10 +73540,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastChangedTimeWithParams:params + [cluster subscribeAttributeCurrentStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.LastChangedTime response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73298,34 +73557,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringLastChangedTime : public }; /* - * Attribute ReplacementProductList + * Attribute TargetState */ -class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAttribute { +class ReadValveConfigurationAndControlTargetState : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringReplacementProductList() - : ReadAttribute("replacement-product-list") + ReadValveConfigurationAndControlTargetState() + : ReadAttribute("target-state") { } - ~ReadActivatedCarbonFilterMonitoringReplacementProductList() + ~ReadValveConfigurationAndControlTargetState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReplacementProductListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ReplacementProductList read Error", error); + LogNSError("ValveConfigurationAndControl TargetState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73334,25 +73593,25 @@ class ReadActivatedCarbonFilterMonitoringReplacementProductList : public ReadAtt } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlTargetState : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() - : SubscribeAttribute("replacement-product-list") + SubscribeAttributeValveConfigurationAndControlTargetState() + : SubscribeAttribute("target-state") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList() + ~SubscribeAttributeValveConfigurationAndControlTargetState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ReplacementProductList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73363,10 +73622,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReplacementProductListWithParams:params + [cluster subscribeAttributeTargetStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ReplacementProductList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73380,34 +73639,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringReplacementProductList : }; /* - * Attribute GeneratedCommandList + * Attribute CurrentLevel */ -class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttribute { +class ReadValveConfigurationAndControlCurrentLevel : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadValveConfigurationAndControlCurrentLevel() + : ReadAttribute("current-level") { } - ~ReadActivatedCarbonFilterMonitoringGeneratedCommandList() + ~ReadValveConfigurationAndControlCurrentLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring GeneratedCommandList read Error", error); + LogNSError("ValveConfigurationAndControl CurrentLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73416,25 +73675,25 @@ class ReadActivatedCarbonFilterMonitoringGeneratedCommandList : public ReadAttri } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeValveConfigurationAndControlCurrentLevel() + : SubscribeAttribute("current-level") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList() + ~SubscribeAttributeValveConfigurationAndControlCurrentLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73445,10 +73704,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCurrentLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73462,34 +73721,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringGeneratedCommandList : pu }; /* - * Attribute AcceptedCommandList + * Attribute TargetLevel */ -class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttribute { +class ReadValveConfigurationAndControlTargetLevel : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadValveConfigurationAndControlTargetLevel() + : ReadAttribute("target-level") { } - ~ReadActivatedCarbonFilterMonitoringAcceptedCommandList() + ~ReadValveConfigurationAndControlTargetLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring AcceptedCommandList read Error", error); + LogNSError("ValveConfigurationAndControl TargetLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73498,25 +73757,25 @@ class ReadActivatedCarbonFilterMonitoringAcceptedCommandList : public ReadAttrib } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlTargetLevel : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeValveConfigurationAndControlTargetLevel() + : SubscribeAttribute("target-level") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList() + ~SubscribeAttributeValveConfigurationAndControlTargetLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73527,10 +73786,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTargetLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73543,37 +73802,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAcceptedCommandList : pub } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute DefaultOpenLevel */ -class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { +class ReadValveConfigurationAndControlDefaultOpenLevel : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringEventList() - : ReadAttribute("event-list") + ReadValveConfigurationAndControlDefaultOpenLevel() + : ReadAttribute("default-open-level") { } - ~ReadActivatedCarbonFilterMonitoringEventList() + ~ReadValveConfigurationAndControlDefaultOpenLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultOpenLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring EventList read Error", error); + LogNSError("ValveConfigurationAndControl DefaultOpenLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73582,25 +73839,66 @@ class ReadActivatedCarbonFilterMonitoringEventList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public SubscribeAttribute { +class WriteValveConfigurationAndControlDefaultOpenLevel : public WriteAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringEventList() - : SubscribeAttribute("event-list") + WriteValveConfigurationAndControlDefaultOpenLevel() + : WriteAttribute("default-open-level") { + AddArgument("attr-name", "default-open-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeActivatedCarbonFilterMonitoringEventList() + ~WriteValveConfigurationAndControlDefaultOpenLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultOpenLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ValveConfigurationAndControl DefaultOpenLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::Percent mValue; +}; + +class SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel : public SubscribeAttribute { +public: + SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() + : SubscribeAttribute("default-open-level") + { + } + + ~SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73611,10 +73909,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeDefaultOpenLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73627,37 +73925,35 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringEventList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ValveFault */ -class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { +class ReadValveConfigurationAndControlValveFault : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringAttributeList() - : ReadAttribute("attribute-list") + ReadValveConfigurationAndControlValveFault() + : ReadAttribute("valve-fault") { } - ~ReadActivatedCarbonFilterMonitoringAttributeList() + ~ReadValveConfigurationAndControlValveFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeValveFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring AttributeList read Error", error); + LogNSError("ValveConfigurationAndControl ValveFault read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73666,25 +73962,25 @@ class ReadActivatedCarbonFilterMonitoringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlValveFault : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeValveConfigurationAndControlValveFault() + : SubscribeAttribute("valve-fault") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList() + ~SubscribeAttributeValveConfigurationAndControlValveFault() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73695,10 +73991,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeValveFaultWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73712,34 +74008,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringAttributeList : public Su }; /* - * Attribute FeatureMap + * Attribute LevelStep */ -class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { +class ReadValveConfigurationAndControlLevelStep : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringFeatureMap() - : ReadAttribute("feature-map") + ReadValveConfigurationAndControlLevelStep() + : ReadAttribute("level-step") { } - ~ReadActivatedCarbonFilterMonitoringFeatureMap() + ~ReadValveConfigurationAndControlLevelStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::LevelStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.LevelStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring FeatureMap read Error", error); + LogNSError("ValveConfigurationAndControl LevelStep read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73748,25 +74044,25 @@ class ReadActivatedCarbonFilterMonitoringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlLevelStep : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeValveConfigurationAndControlLevelStep() + : SubscribeAttribute("level-step") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap() + ~SubscribeAttributeValveConfigurationAndControlLevelStep() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::LevelStep::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73777,10 +74073,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLevelStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.FeatureMap response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.LevelStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73794,34 +74090,34 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringFeatureMap : public Subsc }; /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute { +class ReadValveConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadActivatedCarbonFilterMonitoringClusterRevision() - : ReadAttribute("cluster-revision") + ReadValveConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadActivatedCarbonFilterMonitoringClusterRevision() + ~ReadValveConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ActivatedCarbonFilterMonitoring ClusterRevision read Error", error); + LogNSError("ValveConfigurationAndControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -73830,25 +74126,25 @@ class ReadActivatedCarbonFilterMonitoringClusterRevision : public ReadAttribute } }; -class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision() + ~SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ActivatedCarbonFilterMonitoring::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActivatedCarbonFilterMonitoring alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73859,10 +74155,10 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ActivatedCarbonFilterMonitoring.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -73875,225 +74171,62 @@ class SubscribeAttributeActivatedCarbonFilterMonitoringClusterRevision : public } }; -/*----------------------------------------------------------------------------*\ -| Cluster BooleanStateConfiguration | 0x0080 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SuppressAlarm | 0x00 | -| * EnableDisableAlarm | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentSensitivityLevel | 0x0000 | -| * SupportedSensitivityLevels | 0x0001 | -| * DefaultSensitivityLevel | 0x0002 | -| * AlarmsActive | 0x0003 | -| * AlarmsSuppressed | 0x0004 | -| * AlarmsEnabled | 0x0005 | -| * AlarmsSupported | 0x0006 | -| * SensorFault | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * AlarmsStateChanged | 0x0000 | -| * SensorFault | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command SuppressAlarm - */ -class BooleanStateConfigurationSuppressAlarm : public ClusterCommand { -public: - BooleanStateConfigurationSuppressAlarm() - : ClusterCommand("suppress-alarm") - { - AddArgument("AlarmsToSuppress", 0, UINT8_MAX, &mRequest.alarmsToSuppress); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.alarmsToSuppress = [NSNumber numberWithUnsignedChar:mRequest.alarmsToSuppress.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster suppressAlarmWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type mRequest; -}; - -/* - * Command EnableDisableAlarm - */ -class BooleanStateConfigurationEnableDisableAlarm : public ClusterCommand { -public: - BooleanStateConfigurationEnableDisableAlarm() - : ClusterCommand("enable-disable-alarm") - { - AddArgument("AlarmsToEnableDisable", 0, UINT8_MAX, &mRequest.alarmsToEnableDisable); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.alarmsToEnableDisable = [NSNumber numberWithUnsignedChar:mRequest.alarmsToEnableDisable.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enableDisableAlarmWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type mRequest; -}; - /* - * Attribute CurrentSensitivityLevel + * Attribute AcceptedCommandList */ -class ReadBooleanStateConfigurationCurrentSensitivityLevel : public ReadAttribute { +class ReadValveConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadBooleanStateConfigurationCurrentSensitivityLevel() - : ReadAttribute("current-sensitivity-level") + ReadValveConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBooleanStateConfigurationCurrentSensitivityLevel() + ~ReadValveConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration CurrentSensitivityLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBooleanStateConfigurationCurrentSensitivityLevel : public WriteAttribute { -public: - WriteBooleanStateConfigurationCurrentSensitivityLevel() - : WriteAttribute("current-sensitivity-level") - { - AddArgument("attr-name", "current-sensitivity-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBooleanStateConfigurationCurrentSensitivityLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeCurrentSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BooleanStateConfiguration CurrentSensitivityLevel write Error", error); + LogNSError("ValveConfigurationAndControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() - : SubscribeAttribute("current-sensitivity-level") + SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel() + ~SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::CurrentSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74104,10 +74237,10 @@ class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentSensitivityLevelWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.CurrentSensitivityLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74120,35 +74253,37 @@ class SubscribeAttributeBooleanStateConfigurationCurrentSensitivityLevel : publi } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedSensitivityLevels + * Attribute EventList */ -class ReadBooleanStateConfigurationSupportedSensitivityLevels : public ReadAttribute { +class ReadValveConfigurationAndControlEventList : public ReadAttribute { public: - ReadBooleanStateConfigurationSupportedSensitivityLevels() - : ReadAttribute("supported-sensitivity-levels") + ReadValveConfigurationAndControlEventList() + : ReadAttribute("event-list") { } - ~ReadBooleanStateConfigurationSupportedSensitivityLevels() + ~ReadValveConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedSensitivityLevelsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration SupportedSensitivityLevels read Error", error); + LogNSError("ValveConfigurationAndControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74157,25 +74292,25 @@ class ReadBooleanStateConfigurationSupportedSensitivityLevels : public ReadAttri } }; -class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlEventList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() - : SubscribeAttribute("supported-sensitivity-levels") + SubscribeAttributeValveConfigurationAndControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels() + ~SubscribeAttributeValveConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SupportedSensitivityLevels::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74186,10 +74321,10 @@ class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedSensitivityLevelsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.SupportedSensitivityLevels response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74202,35 +74337,37 @@ class SubscribeAttributeBooleanStateConfigurationSupportedSensitivityLevels : pu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute DefaultSensitivityLevel + * Attribute AttributeList */ -class ReadBooleanStateConfigurationDefaultSensitivityLevel : public ReadAttribute { +class ReadValveConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadBooleanStateConfigurationDefaultSensitivityLevel() - : ReadAttribute("default-sensitivity-level") + ReadValveConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBooleanStateConfigurationDefaultSensitivityLevel() + ~ReadValveConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration DefaultSensitivityLevel read Error", error); + LogNSError("ValveConfigurationAndControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74239,25 +74376,25 @@ class ReadBooleanStateConfigurationDefaultSensitivityLevel : public ReadAttribut } }; -class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() - : SubscribeAttribute("default-sensitivity-level") + SubscribeAttributeValveConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel() + ~SubscribeAttributeValveConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::DefaultSensitivityLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74268,10 +74405,10 @@ class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultSensitivityLevelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.DefaultSensitivityLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74285,34 +74422,34 @@ class SubscribeAttributeBooleanStateConfigurationDefaultSensitivityLevel : publi }; /* - * Attribute AlarmsActive + * Attribute FeatureMap */ -class ReadBooleanStateConfigurationAlarmsActive : public ReadAttribute { +class ReadValveConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadBooleanStateConfigurationAlarmsActive() - : ReadAttribute("alarms-active") + ReadValveConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBooleanStateConfigurationAlarmsActive() + ~ReadValveConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAlarmsActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AlarmsActive read Error", error); + LogNSError("ValveConfigurationAndControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74321,25 +74458,25 @@ class ReadBooleanStateConfigurationAlarmsActive : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAlarmsActive() - : SubscribeAttribute("alarms-active") + SubscribeAttributeValveConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBooleanStateConfigurationAlarmsActive() + ~SubscribeAttributeValveConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsActive::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74350,10 +74487,10 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAlarmsActiveWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsActive response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74367,34 +74504,34 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsActive : public Subscribe }; /* - * Attribute AlarmsSuppressed + * Attribute ClusterRevision */ -class ReadBooleanStateConfigurationAlarmsSuppressed : public ReadAttribute { +class ReadValveConfigurationAndControlClusterRevision : public ReadAttribute { public: - ReadBooleanStateConfigurationAlarmsSuppressed() - : ReadAttribute("alarms-suppressed") + ReadValveConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBooleanStateConfigurationAlarmsSuppressed() + ~ReadValveConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAlarmsSuppressedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AlarmsSuppressed read Error", error); + LogNSError("ValveConfigurationAndControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74403,25 +74540,25 @@ class ReadBooleanStateConfigurationAlarmsSuppressed : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public SubscribeAttribute { +class SubscribeAttributeValveConfigurationAndControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() - : SubscribeAttribute("alarms-suppressed") + SubscribeAttributeValveConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed() + ~SubscribeAttributeValveConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSuppressed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74432,10 +74569,10 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAlarmsSuppressedWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsSuppressed response %@", [value description]); + NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74448,35 +74585,71 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsSuppressed : public Subsc } }; +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalPowerMeasurement | 0x0090 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PowerMode | 0x0000 | +| * NumberOfMeasurementTypes | 0x0001 | +| * Accuracy | 0x0002 | +| * Ranges | 0x0003 | +| * Voltage | 0x0004 | +| * ActiveCurrent | 0x0005 | +| * ReactiveCurrent | 0x0006 | +| * ApparentCurrent | 0x0007 | +| * ActivePower | 0x0008 | +| * ReactivePower | 0x0009 | +| * ApparentPower | 0x000A | +| * RMSVoltage | 0x000B | +| * RMSCurrent | 0x000C | +| * RMSPower | 0x000D | +| * Frequency | 0x000E | +| * HarmonicCurrents | 0x000F | +| * HarmonicPhases | 0x0010 | +| * PowerFactor | 0x0011 | +| * NeutralCurrent | 0x0012 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * MeasurementPeriodRanges | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AlarmsEnabled + * Attribute PowerMode */ -class ReadBooleanStateConfigurationAlarmsEnabled : public ReadAttribute { +class ReadElectricalPowerMeasurementPowerMode : public ReadAttribute { public: - ReadBooleanStateConfigurationAlarmsEnabled() - : ReadAttribute("alarms-enabled") + ReadElectricalPowerMeasurementPowerMode() + : ReadAttribute("power-mode") { } - ~ReadBooleanStateConfigurationAlarmsEnabled() + ~ReadElectricalPowerMeasurementPowerMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAlarmsEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.PowerMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AlarmsEnabled read Error", error); + LogNSError("ElectricalPowerMeasurement PowerMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74485,25 +74658,25 @@ class ReadBooleanStateConfigurationAlarmsEnabled : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementPowerMode : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() - : SubscribeAttribute("alarms-enabled") + SubscribeAttributeElectricalPowerMeasurementPowerMode() + : SubscribeAttribute("power-mode") { } - ~SubscribeAttributeBooleanStateConfigurationAlarmsEnabled() + ~SubscribeAttributeElectricalPowerMeasurementPowerMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74514,10 +74687,10 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAlarmsEnabledWithParams:params + [cluster subscribeAttributePowerModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsEnabled response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.PowerMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74531,34 +74704,34 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsEnabled : public Subscrib }; /* - * Attribute AlarmsSupported + * Attribute NumberOfMeasurementTypes */ -class ReadBooleanStateConfigurationAlarmsSupported : public ReadAttribute { +class ReadElectricalPowerMeasurementNumberOfMeasurementTypes : public ReadAttribute { public: - ReadBooleanStateConfigurationAlarmsSupported() - : ReadAttribute("alarms-supported") + ReadElectricalPowerMeasurementNumberOfMeasurementTypes() + : ReadAttribute("number-of-measurement-types") { } - ~ReadBooleanStateConfigurationAlarmsSupported() + ~ReadElectricalPowerMeasurementNumberOfMeasurementTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAlarmsSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfMeasurementTypesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.NumberOfMeasurementTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AlarmsSupported read Error", error); + LogNSError("ElectricalPowerMeasurement NumberOfMeasurementTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74567,25 +74740,25 @@ class ReadBooleanStateConfigurationAlarmsSupported : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAlarmsSupported() - : SubscribeAttribute("alarms-supported") + SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes() + : SubscribeAttribute("number-of-measurement-types") { } - ~SubscribeAttributeBooleanStateConfigurationAlarmsSupported() + ~SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AlarmsSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74596,10 +74769,10 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAlarmsSupportedWithParams:params + [cluster subscribeAttributeNumberOfMeasurementTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AlarmsSupported response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.NumberOfMeasurementTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74613,34 +74786,34 @@ class SubscribeAttributeBooleanStateConfigurationAlarmsSupported : public Subscr }; /* - * Attribute SensorFault + * Attribute Accuracy */ -class ReadBooleanStateConfigurationSensorFault : public ReadAttribute { +class ReadElectricalPowerMeasurementAccuracy : public ReadAttribute { public: - ReadBooleanStateConfigurationSensorFault() - : ReadAttribute("sensor-fault") + ReadElectricalPowerMeasurementAccuracy() + : ReadAttribute("accuracy") { } - ~ReadBooleanStateConfigurationSensorFault() + ~ReadElectricalPowerMeasurementAccuracy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Accuracy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSensorFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAccuracyWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Accuracy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration SensorFault read Error", error); + LogNSError("ElectricalPowerMeasurement Accuracy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74649,25 +74822,25 @@ class ReadBooleanStateConfigurationSensorFault : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementAccuracy : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationSensorFault() - : SubscribeAttribute("sensor-fault") + SubscribeAttributeElectricalPowerMeasurementAccuracy() + : SubscribeAttribute("accuracy") { } - ~SubscribeAttributeBooleanStateConfigurationSensorFault() + ~SubscribeAttributeElectricalPowerMeasurementAccuracy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::SensorFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Accuracy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74678,10 +74851,10 @@ class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSensorFaultWithParams:params + [cluster subscribeAttributeAccuracyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.SensorFault response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Accuracy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74695,34 +74868,34 @@ class SubscribeAttributeBooleanStateConfigurationSensorFault : public SubscribeA }; /* - * Attribute GeneratedCommandList + * Attribute Ranges */ -class ReadBooleanStateConfigurationGeneratedCommandList : public ReadAttribute { +class ReadElectricalPowerMeasurementRanges : public ReadAttribute { public: - ReadBooleanStateConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadElectricalPowerMeasurementRanges() + : ReadAttribute("ranges") { } - ~ReadBooleanStateConfigurationGeneratedCommandList() + ~ReadElectricalPowerMeasurementRanges() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Ranges::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRangesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Ranges response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration GeneratedCommandList read Error", error); + LogNSError("ElectricalPowerMeasurement Ranges read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74731,25 +74904,25 @@ class ReadBooleanStateConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementRanges : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeElectricalPowerMeasurementRanges() + : SubscribeAttribute("ranges") { } - ~SubscribeAttributeBooleanStateConfigurationGeneratedCommandList() + ~SubscribeAttributeElectricalPowerMeasurementRanges() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Ranges::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74760,10 +74933,10 @@ class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeRangesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.Ranges response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74777,34 +74950,34 @@ class SubscribeAttributeBooleanStateConfigurationGeneratedCommandList : public S }; /* - * Attribute AcceptedCommandList + * Attribute Voltage */ -class ReadBooleanStateConfigurationAcceptedCommandList : public ReadAttribute { +class ReadElectricalPowerMeasurementVoltage : public ReadAttribute { public: - ReadBooleanStateConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadElectricalPowerMeasurementVoltage() + : ReadAttribute("voltage") { } - ~ReadBooleanStateConfigurationAcceptedCommandList() + ~ReadElectricalPowerMeasurementVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Voltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Voltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AcceptedCommandList read Error", error); + LogNSError("ElectricalPowerMeasurement Voltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74813,25 +74986,25 @@ class ReadBooleanStateConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementVoltage : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeElectricalPowerMeasurementVoltage() + : SubscribeAttribute("voltage") { } - ~SubscribeAttributeBooleanStateConfigurationAcceptedCommandList() + ~SubscribeAttributeElectricalPowerMeasurementVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Voltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74842,10 +75015,10 @@ class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Voltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74858,37 +75031,35 @@ class SubscribeAttributeBooleanStateConfigurationAcceptedCommandList : public Su } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ActiveCurrent */ -class ReadBooleanStateConfigurationEventList : public ReadAttribute { +class ReadElectricalPowerMeasurementActiveCurrent : public ReadAttribute { public: - ReadBooleanStateConfigurationEventList() - : ReadAttribute("event-list") + ReadElectricalPowerMeasurementActiveCurrent() + : ReadAttribute("active-current") { } - ~ReadBooleanStateConfigurationEventList() + ~ReadElectricalPowerMeasurementActiveCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActiveCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ActiveCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration EventList read Error", error); + LogNSError("ElectricalPowerMeasurement ActiveCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74897,25 +75068,25 @@ class ReadBooleanStateConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementActiveCurrent : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeElectricalPowerMeasurementActiveCurrent() + : SubscribeAttribute("active-current") { } - ~SubscribeAttributeBooleanStateConfigurationEventList() + ~SubscribeAttributeElectricalPowerMeasurementActiveCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActiveCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74926,10 +75097,10 @@ class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeActiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ActiveCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -74942,37 +75113,35 @@ class SubscribeAttributeBooleanStateConfigurationEventList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ReactiveCurrent */ -class ReadBooleanStateConfigurationAttributeList : public ReadAttribute { +class ReadElectricalPowerMeasurementReactiveCurrent : public ReadAttribute { public: - ReadBooleanStateConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadElectricalPowerMeasurementReactiveCurrent() + : ReadAttribute("reactive-current") { } - ~ReadBooleanStateConfigurationAttributeList() + ~ReadElectricalPowerMeasurementReactiveCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactiveCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ReactiveCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration AttributeList read Error", error); + LogNSError("ElectricalPowerMeasurement ReactiveCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -74981,25 +75150,25 @@ class ReadBooleanStateConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementReactiveCurrent : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeElectricalPowerMeasurementReactiveCurrent() + : SubscribeAttribute("reactive-current") { } - ~SubscribeAttributeBooleanStateConfigurationAttributeList() + ~SubscribeAttributeElectricalPowerMeasurementReactiveCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactiveCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75010,10 +75179,10 @@ class SubscribeAttributeBooleanStateConfigurationAttributeList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeReactiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ReactiveCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75027,34 +75196,34 @@ class SubscribeAttributeBooleanStateConfigurationAttributeList : public Subscrib }; /* - * Attribute FeatureMap + * Attribute ApparentCurrent */ -class ReadBooleanStateConfigurationFeatureMap : public ReadAttribute { +class ReadElectricalPowerMeasurementApparentCurrent : public ReadAttribute { public: - ReadBooleanStateConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadElectricalPowerMeasurementApparentCurrent() + : ReadAttribute("apparent-current") { } - ~ReadBooleanStateConfigurationFeatureMap() + ~ReadElectricalPowerMeasurementApparentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApparentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ApparentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration FeatureMap read Error", error); + LogNSError("ElectricalPowerMeasurement ApparentCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75063,25 +75232,25 @@ class ReadBooleanStateConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementApparentCurrent : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeElectricalPowerMeasurementApparentCurrent() + : SubscribeAttribute("apparent-current") { } - ~SubscribeAttributeBooleanStateConfigurationFeatureMap() + ~SubscribeAttributeElectricalPowerMeasurementApparentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75092,10 +75261,10 @@ class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeApparentCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.FeatureMap response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ApparentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75109,34 +75278,34 @@ class SubscribeAttributeBooleanStateConfigurationFeatureMap : public SubscribeAt }; /* - * Attribute ClusterRevision + * Attribute ActivePower */ -class ReadBooleanStateConfigurationClusterRevision : public ReadAttribute { +class ReadElectricalPowerMeasurementActivePower : public ReadAttribute { public: - ReadBooleanStateConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadElectricalPowerMeasurementActivePower() + : ReadAttribute("active-power") { } - ~ReadBooleanStateConfigurationClusterRevision() + ~ReadElectricalPowerMeasurementActivePower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActivePower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ActivePower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanStateConfiguration ClusterRevision read Error", error); + LogNSError("ElectricalPowerMeasurement ActivePower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75145,25 +75314,25 @@ class ReadBooleanStateConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementActivePower : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeElectricalPowerMeasurementActivePower() + : SubscribeAttribute("active-power") { } - ~SubscribeAttributeBooleanStateConfigurationClusterRevision() + ~SubscribeAttributeElectricalPowerMeasurementActivePower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BooleanStateConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BooleanStateConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActivePower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanStateConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75174,228 +75343,10 @@ class SubscribeAttributeBooleanStateConfigurationClusterRevision : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeActivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanStateConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ValveConfigurationAndControl | 0x0081 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Open | 0x00 | -| * Close | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OpenDuration | 0x0000 | -| * DefaultOpenDuration | 0x0001 | -| * AutoCloseTime | 0x0002 | -| * RemainingDuration | 0x0003 | -| * CurrentState | 0x0004 | -| * TargetState | 0x0005 | -| * CurrentLevel | 0x0006 | -| * TargetLevel | 0x0007 | -| * DefaultOpenLevel | 0x0008 | -| * ValveFault | 0x0009 | -| * LevelStep | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * ValveStateChanged | 0x0000 | -| * ValveFault | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command Open - */ -class ValveConfigurationAndControlOpen : public ClusterCommand { -public: - ValveConfigurationAndControlOpen() - : ClusterCommand("open") - { - AddArgument("OpenDuration", 0, UINT32_MAX, &mRequest.openDuration); - AddArgument("TargetLevel", 0, UINT8_MAX, &mRequest.targetLevel); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.openDuration.HasValue()) { - if (mRequest.openDuration.Value().IsNull()) { - params.openDuration = nil; - } else { - params.openDuration = [NSNumber numberWithUnsignedInt:mRequest.openDuration.Value().Value()]; - } - } else { - params.openDuration = nil; - } - if (mRequest.targetLevel.HasValue()) { - params.targetLevel = [NSNumber numberWithUnsignedChar:mRequest.targetLevel.Value()]; - } else { - params.targetLevel = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster openWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type mRequest; -}; - -/* - * Command Close - */ -class ValveConfigurationAndControlClose : public ClusterCommand { -public: - ValveConfigurationAndControlClose() - : ClusterCommand("close") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster closeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Attribute OpenDuration - */ -class ReadValveConfigurationAndControlOpenDuration : public ReadAttribute { -public: - ReadValveConfigurationAndControlOpenDuration() - : ReadAttribute("open-duration") - { - } - - ~ReadValveConfigurationAndControlOpenDuration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ValveConfigurationAndControl OpenDuration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeValveConfigurationAndControlOpenDuration : public SubscribeAttribute { -public: - SubscribeAttributeValveConfigurationAndControlOpenDuration() - : SubscribeAttribute("open-duration") - { - } - - ~SubscribeAttributeValveConfigurationAndControlOpenDuration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::OpenDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOpenDurationWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.OpenDuration response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ActivePower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75409,105 +75360,61 @@ class SubscribeAttributeValveConfigurationAndControlOpenDuration : public Subscr }; /* - * Attribute DefaultOpenDuration + * Attribute ReactivePower */ -class ReadValveConfigurationAndControlDefaultOpenDuration : public ReadAttribute { +class ReadElectricalPowerMeasurementReactivePower : public ReadAttribute { public: - ReadValveConfigurationAndControlDefaultOpenDuration() - : ReadAttribute("default-open-duration") + ReadElectricalPowerMeasurementReactivePower() + : ReadAttribute("reactive-power") { } - ~ReadValveConfigurationAndControlDefaultOpenDuration() + ~ReadElectricalPowerMeasurementReactivePower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactivePower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultOpenDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ReactivePower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl DefaultOpenDuration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteValveConfigurationAndControlDefaultOpenDuration : public WriteAttribute { -public: - WriteValveConfigurationAndControlDefaultOpenDuration() - : WriteAttribute("default-open-duration") - { - AddArgument("attr-name", "default-open-duration"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteValveConfigurationAndControlDefaultOpenDuration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeDefaultOpenDurationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ValveConfigurationAndControl DefaultOpenDuration write Error", error); + LogNSError("ElectricalPowerMeasurement ReactivePower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementReactivePower : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() - : SubscribeAttribute("default-open-duration") + SubscribeAttributeElectricalPowerMeasurementReactivePower() + : SubscribeAttribute("reactive-power") { } - ~SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration() + ~SubscribeAttributeElectricalPowerMeasurementReactivePower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactivePower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75518,10 +75425,10 @@ class SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultOpenDurationWithParams:params + [cluster subscribeAttributeReactivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.DefaultOpenDuration response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ReactivePower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75535,34 +75442,34 @@ class SubscribeAttributeValveConfigurationAndControlDefaultOpenDuration : public }; /* - * Attribute AutoCloseTime + * Attribute ApparentPower */ -class ReadValveConfigurationAndControlAutoCloseTime : public ReadAttribute { +class ReadElectricalPowerMeasurementApparentPower : public ReadAttribute { public: - ReadValveConfigurationAndControlAutoCloseTime() - : ReadAttribute("auto-close-time") + ReadElectricalPowerMeasurementApparentPower() + : ReadAttribute("apparent-power") { } - ~ReadValveConfigurationAndControlAutoCloseTime() + ~ReadElectricalPowerMeasurementApparentPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoCloseTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.ApparentPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl AutoCloseTime read Error", error); + LogNSError("ElectricalPowerMeasurement ApparentPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75571,25 +75478,25 @@ class ReadValveConfigurationAndControlAutoCloseTime : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementApparentPower : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlAutoCloseTime() - : SubscribeAttribute("auto-close-time") + SubscribeAttributeElectricalPowerMeasurementApparentPower() + : SubscribeAttribute("apparent-power") { } - ~SubscribeAttributeValveConfigurationAndControlAutoCloseTime() + ~SubscribeAttributeElectricalPowerMeasurementApparentPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AutoCloseTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75600,10 +75507,10 @@ class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAutoCloseTimeWithParams:params + [cluster subscribeAttributeApparentPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AutoCloseTime response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ApparentPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75617,34 +75524,34 @@ class SubscribeAttributeValveConfigurationAndControlAutoCloseTime : public Subsc }; /* - * Attribute RemainingDuration + * Attribute RMSVoltage */ -class ReadValveConfigurationAndControlRemainingDuration : public ReadAttribute { +class ReadElectricalPowerMeasurementRMSVoltage : public ReadAttribute { public: - ReadValveConfigurationAndControlRemainingDuration() - : ReadAttribute("remaining-duration") + ReadElectricalPowerMeasurementRMSVoltage() + : ReadAttribute("rmsvoltage") { } - ~ReadValveConfigurationAndControlRemainingDuration() + ~ReadElectricalPowerMeasurementRMSVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRMSVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.RMSVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl RemainingDuration read Error", error); + LogNSError("ElectricalPowerMeasurement RMSVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75653,25 +75560,25 @@ class ReadValveConfigurationAndControlRemainingDuration : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementRMSVoltage : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlRemainingDuration() - : SubscribeAttribute("remaining-duration") + SubscribeAttributeElectricalPowerMeasurementRMSVoltage() + : SubscribeAttribute("rmsvoltage") { } - ~SubscribeAttributeValveConfigurationAndControlRemainingDuration() + ~SubscribeAttributeElectricalPowerMeasurementRMSVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::RemainingDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75682,10 +75589,10 @@ class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingDurationWithParams:params + [cluster subscribeAttributeRMSVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.RemainingDuration response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.RMSVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75699,34 +75606,34 @@ class SubscribeAttributeValveConfigurationAndControlRemainingDuration : public S }; /* - * Attribute CurrentState + * Attribute RMSCurrent */ -class ReadValveConfigurationAndControlCurrentState : public ReadAttribute { +class ReadElectricalPowerMeasurementRMSCurrent : public ReadAttribute { public: - ReadValveConfigurationAndControlCurrentState() - : ReadAttribute("current-state") + ReadElectricalPowerMeasurementRMSCurrent() + : ReadAttribute("rmscurrent") { } - ~ReadValveConfigurationAndControlCurrentState() + ~ReadElectricalPowerMeasurementRMSCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRMSCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.RMSCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl CurrentState read Error", error); + LogNSError("ElectricalPowerMeasurement RMSCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75735,25 +75642,25 @@ class ReadValveConfigurationAndControlCurrentState : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlCurrentState : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementRMSCurrent : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlCurrentState() - : SubscribeAttribute("current-state") + SubscribeAttributeElectricalPowerMeasurementRMSCurrent() + : SubscribeAttribute("rmscurrent") { } - ~SubscribeAttributeValveConfigurationAndControlCurrentState() + ~SubscribeAttributeElectricalPowerMeasurementRMSCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75764,10 +75671,10 @@ class SubscribeAttributeValveConfigurationAndControlCurrentState : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentStateWithParams:params + [cluster subscribeAttributeRMSCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.CurrentState response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.RMSCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75781,34 +75688,34 @@ class SubscribeAttributeValveConfigurationAndControlCurrentState : public Subscr }; /* - * Attribute TargetState + * Attribute RMSPower */ -class ReadValveConfigurationAndControlTargetState : public ReadAttribute { +class ReadElectricalPowerMeasurementRMSPower : public ReadAttribute { public: - ReadValveConfigurationAndControlTargetState() - : ReadAttribute("target-state") + ReadElectricalPowerMeasurementRMSPower() + : ReadAttribute("rmspower") { } - ~ReadValveConfigurationAndControlTargetState() + ~ReadElectricalPowerMeasurementRMSPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRMSPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.RMSPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl TargetState read Error", error); + LogNSError("ElectricalPowerMeasurement RMSPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75817,25 +75724,25 @@ class ReadValveConfigurationAndControlTargetState : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlTargetState : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementRMSPower : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlTargetState() - : SubscribeAttribute("target-state") + SubscribeAttributeElectricalPowerMeasurementRMSPower() + : SubscribeAttribute("rmspower") { } - ~SubscribeAttributeValveConfigurationAndControlTargetState() + ~SubscribeAttributeElectricalPowerMeasurementRMSPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75846,10 +75753,10 @@ class SubscribeAttributeValveConfigurationAndControlTargetState : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetStateWithParams:params + [cluster subscribeAttributeRMSPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.TargetState response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.RMSPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75863,34 +75770,34 @@ class SubscribeAttributeValveConfigurationAndControlTargetState : public Subscri }; /* - * Attribute CurrentLevel + * Attribute Frequency */ -class ReadValveConfigurationAndControlCurrentLevel : public ReadAttribute { +class ReadElectricalPowerMeasurementFrequency : public ReadAttribute { public: - ReadValveConfigurationAndControlCurrentLevel() - : ReadAttribute("current-level") + ReadElectricalPowerMeasurementFrequency() + : ReadAttribute("frequency") { } - ~ReadValveConfigurationAndControlCurrentLevel() + ~ReadElectricalPowerMeasurementFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Frequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.Frequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl CurrentLevel read Error", error); + LogNSError("ElectricalPowerMeasurement Frequency read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75899,25 +75806,25 @@ class ReadValveConfigurationAndControlCurrentLevel : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementFrequency : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlCurrentLevel() - : SubscribeAttribute("current-level") + SubscribeAttributeElectricalPowerMeasurementFrequency() + : SubscribeAttribute("frequency") { } - ~SubscribeAttributeValveConfigurationAndControlCurrentLevel() + ~SubscribeAttributeElectricalPowerMeasurementFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::CurrentLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Frequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75928,10 +75835,10 @@ class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentLevelWithParams:params + [cluster subscribeAttributeFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.CurrentLevel response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.Frequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -75945,34 +75852,34 @@ class SubscribeAttributeValveConfigurationAndControlCurrentLevel : public Subscr }; /* - * Attribute TargetLevel + * Attribute HarmonicCurrents */ -class ReadValveConfigurationAndControlTargetLevel : public ReadAttribute { +class ReadElectricalPowerMeasurementHarmonicCurrents : public ReadAttribute { public: - ReadValveConfigurationAndControlTargetLevel() - : ReadAttribute("target-level") + ReadElectricalPowerMeasurementHarmonicCurrents() + : ReadAttribute("harmonic-currents") { } - ~ReadValveConfigurationAndControlTargetLevel() + ~ReadElectricalPowerMeasurementHarmonicCurrents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicCurrents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHarmonicCurrentsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.HarmonicCurrents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl TargetLevel read Error", error); + LogNSError("ElectricalPowerMeasurement HarmonicCurrents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -75981,25 +75888,25 @@ class ReadValveConfigurationAndControlTargetLevel : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlTargetLevel : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlTargetLevel() - : SubscribeAttribute("target-level") + SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents() + : SubscribeAttribute("harmonic-currents") { } - ~SubscribeAttributeValveConfigurationAndControlTargetLevel() + ~SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::TargetLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicCurrents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76010,10 +75917,10 @@ class SubscribeAttributeValveConfigurationAndControlTargetLevel : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetLevelWithParams:params + [cluster subscribeAttributeHarmonicCurrentsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.TargetLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.HarmonicCurrents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76027,102 +75934,61 @@ class SubscribeAttributeValveConfigurationAndControlTargetLevel : public Subscri }; /* - * Attribute DefaultOpenLevel + * Attribute HarmonicPhases */ -class ReadValveConfigurationAndControlDefaultOpenLevel : public ReadAttribute { +class ReadElectricalPowerMeasurementHarmonicPhases : public ReadAttribute { public: - ReadValveConfigurationAndControlDefaultOpenLevel() - : ReadAttribute("default-open-level") + ReadElectricalPowerMeasurementHarmonicPhases() + : ReadAttribute("harmonic-phases") { } - ~ReadValveConfigurationAndControlDefaultOpenLevel() + ~ReadElectricalPowerMeasurementHarmonicPhases() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicPhases::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultOpenLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHarmonicPhasesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.HarmonicPhases response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl DefaultOpenLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteValveConfigurationAndControlDefaultOpenLevel : public WriteAttribute { -public: - WriteValveConfigurationAndControlDefaultOpenLevel() - : WriteAttribute("default-open-level") - { - AddArgument("attr-name", "default-open-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteValveConfigurationAndControlDefaultOpenLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeDefaultOpenLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ValveConfigurationAndControl DefaultOpenLevel write Error", error); + LogNSError("ElectricalPowerMeasurement HarmonicPhases read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::Percent mValue; }; -class SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementHarmonicPhases : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() - : SubscribeAttribute("default-open-level") + SubscribeAttributeElectricalPowerMeasurementHarmonicPhases() + : SubscribeAttribute("harmonic-phases") { } - ~SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel() + ~SubscribeAttributeElectricalPowerMeasurementHarmonicPhases() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::DefaultOpenLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicPhases::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76133,10 +75999,10 @@ class SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultOpenLevelWithParams:params + [cluster subscribeAttributeHarmonicPhasesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.DefaultOpenLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.HarmonicPhases response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76150,34 +76016,34 @@ class SubscribeAttributeValveConfigurationAndControlDefaultOpenLevel : public Su }; /* - * Attribute ValveFault + * Attribute PowerFactor */ -class ReadValveConfigurationAndControlValveFault : public ReadAttribute { +class ReadElectricalPowerMeasurementPowerFactor : public ReadAttribute { public: - ReadValveConfigurationAndControlValveFault() - : ReadAttribute("valve-fault") + ReadElectricalPowerMeasurementPowerFactor() + : ReadAttribute("power-factor") { } - ~ReadValveConfigurationAndControlValveFault() + ~ReadElectricalPowerMeasurementPowerFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerFactor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeValveFaultWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.PowerFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl ValveFault read Error", error); + LogNSError("ElectricalPowerMeasurement PowerFactor read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76186,25 +76052,25 @@ class ReadValveConfigurationAndControlValveFault : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlValveFault : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementPowerFactor : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlValveFault() - : SubscribeAttribute("valve-fault") + SubscribeAttributeElectricalPowerMeasurementPowerFactor() + : SubscribeAttribute("power-factor") { } - ~SubscribeAttributeValveConfigurationAndControlValveFault() + ~SubscribeAttributeElectricalPowerMeasurementPowerFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ValveFault::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerFactor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76215,10 +76081,10 @@ class SubscribeAttributeValveConfigurationAndControlValveFault : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeValveFaultWithParams:params + [cluster subscribeAttributePowerFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.ValveFault response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.PowerFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76232,34 +76098,34 @@ class SubscribeAttributeValveConfigurationAndControlValveFault : public Subscrib }; /* - * Attribute LevelStep + * Attribute NeutralCurrent */ -class ReadValveConfigurationAndControlLevelStep : public ReadAttribute { +class ReadElectricalPowerMeasurementNeutralCurrent : public ReadAttribute { public: - ReadValveConfigurationAndControlLevelStep() - : ReadAttribute("level-step") + ReadElectricalPowerMeasurementNeutralCurrent() + : ReadAttribute("neutral-current") { } - ~ReadValveConfigurationAndControlLevelStep() + ~ReadElectricalPowerMeasurementNeutralCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::LevelStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NeutralCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.LevelStep response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalPowerMeasurement.NeutralCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl LevelStep read Error", error); + LogNSError("ElectricalPowerMeasurement NeutralCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76268,25 +76134,25 @@ class ReadValveConfigurationAndControlLevelStep : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlLevelStep : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementNeutralCurrent : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlLevelStep() - : SubscribeAttribute("level-step") + SubscribeAttributeElectricalPowerMeasurementNeutralCurrent() + : SubscribeAttribute("neutral-current") { } - ~SubscribeAttributeValveConfigurationAndControlLevelStep() + ~SubscribeAttributeElectricalPowerMeasurementNeutralCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::LevelStep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NeutralCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76297,10 +76163,10 @@ class SubscribeAttributeValveConfigurationAndControlLevelStep : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelStepWithParams:params + [cluster subscribeAttributeNeutralCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.LevelStep response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.NeutralCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76316,32 +76182,32 @@ class SubscribeAttributeValveConfigurationAndControlLevelStep : public Subscribe /* * Attribute GeneratedCommandList */ -class ReadValveConfigurationAndControlGeneratedCommandList : public ReadAttribute { +class ReadElectricalPowerMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadValveConfigurationAndControlGeneratedCommandList() + ReadElectricalPowerMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadValveConfigurationAndControlGeneratedCommandList() + ~ReadElectricalPowerMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl GeneratedCommandList read Error", error); + LogNSError("ElectricalPowerMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76350,25 +76216,25 @@ class ReadValveConfigurationAndControlGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeValveConfigurationAndControlGeneratedCommandList() + ~SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76382,7 +76248,7 @@ class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : publi [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.GeneratedCommandList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76398,32 +76264,32 @@ class SubscribeAttributeValveConfigurationAndControlGeneratedCommandList : publi /* * Attribute AcceptedCommandList */ -class ReadValveConfigurationAndControlAcceptedCommandList : public ReadAttribute { +class ReadElectricalPowerMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadValveConfigurationAndControlAcceptedCommandList() + ReadElectricalPowerMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadValveConfigurationAndControlAcceptedCommandList() + ~ReadElectricalPowerMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl AcceptedCommandList read Error", error); + LogNSError("ElectricalPowerMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76432,25 +76298,25 @@ class ReadValveConfigurationAndControlAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeValveConfigurationAndControlAcceptedCommandList() + ~SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76464,7 +76330,7 @@ class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AcceptedCommandList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76482,32 +76348,32 @@ class SubscribeAttributeValveConfigurationAndControlAcceptedCommandList : public /* * Attribute EventList */ -class ReadValveConfigurationAndControlEventList : public ReadAttribute { +class ReadElectricalPowerMeasurementEventList : public ReadAttribute { public: - ReadValveConfigurationAndControlEventList() + ReadElectricalPowerMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadValveConfigurationAndControlEventList() + ~ReadElectricalPowerMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl EventList read Error", error); + LogNSError("ElectricalPowerMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76516,25 +76382,25 @@ class ReadValveConfigurationAndControlEventList : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlEventList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlEventList() + SubscribeAttributeElectricalPowerMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeValveConfigurationAndControlEventList() + ~SubscribeAttributeElectricalPowerMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76548,7 +76414,7 @@ class SubscribeAttributeValveConfigurationAndControlEventList : public Subscribe [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.EventList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76566,32 +76432,32 @@ class SubscribeAttributeValveConfigurationAndControlEventList : public Subscribe /* * Attribute AttributeList */ -class ReadValveConfigurationAndControlAttributeList : public ReadAttribute { +class ReadElectricalPowerMeasurementAttributeList : public ReadAttribute { public: - ReadValveConfigurationAndControlAttributeList() + ReadElectricalPowerMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadValveConfigurationAndControlAttributeList() + ~ReadElectricalPowerMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl AttributeList read Error", error); + LogNSError("ElectricalPowerMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76600,25 +76466,25 @@ class ReadValveConfigurationAndControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlAttributeList() + SubscribeAttributeElectricalPowerMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeValveConfigurationAndControlAttributeList() + ~SubscribeAttributeElectricalPowerMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76632,7 +76498,7 @@ class SubscribeAttributeValveConfigurationAndControlAttributeList : public Subsc [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.AttributeList response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76648,32 +76514,32 @@ class SubscribeAttributeValveConfigurationAndControlAttributeList : public Subsc /* * Attribute FeatureMap */ -class ReadValveConfigurationAndControlFeatureMap : public ReadAttribute { +class ReadElectricalPowerMeasurementFeatureMap : public ReadAttribute { public: - ReadValveConfigurationAndControlFeatureMap() + ReadElectricalPowerMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadValveConfigurationAndControlFeatureMap() + ~ReadElectricalPowerMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl FeatureMap read Error", error); + LogNSError("ElectricalPowerMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76682,25 +76548,25 @@ class ReadValveConfigurationAndControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlFeatureMap() + SubscribeAttributeElectricalPowerMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeValveConfigurationAndControlFeatureMap() + ~SubscribeAttributeElectricalPowerMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76714,7 +76580,7 @@ class SubscribeAttributeValveConfigurationAndControlFeatureMap : public Subscrib [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76730,32 +76596,32 @@ class SubscribeAttributeValveConfigurationAndControlFeatureMap : public Subscrib /* * Attribute ClusterRevision */ -class ReadValveConfigurationAndControlClusterRevision : public ReadAttribute { +class ReadElectricalPowerMeasurementClusterRevision : public ReadAttribute { public: - ReadValveConfigurationAndControlClusterRevision() + ReadElectricalPowerMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadValveConfigurationAndControlClusterRevision() + ~ReadElectricalPowerMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ValveConfigurationAndControl ClusterRevision read Error", error); + LogNSError("ElectricalPowerMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76764,25 +76630,25 @@ class ReadValveConfigurationAndControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeValveConfigurationAndControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeElectricalPowerMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeValveConfigurationAndControlClusterRevision() + SubscribeAttributeElectricalPowerMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeValveConfigurationAndControlClusterRevision() + ~SubscribeAttributeElectricalPowerMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ValveConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ValveConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterValveConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76796,7 +76662,7 @@ class SubscribeAttributeValveConfigurationAndControlClusterRevision : public Sub [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ValveConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"ElectricalPowerMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76810,30 +76676,17 @@ class SubscribeAttributeValveConfigurationAndControlClusterRevision : public Sub }; /*----------------------------------------------------------------------------*\ -| Cluster ElectricalPowerMeasurement | 0x0090 | +| Cluster ElectricalEnergyMeasurement | 0x0091 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * PowerMode | 0x0000 | -| * NumberOfMeasurementTypes | 0x0001 | -| * Accuracy | 0x0002 | -| * Ranges | 0x0003 | -| * Voltage | 0x0004 | -| * ActiveCurrent | 0x0005 | -| * ReactiveCurrent | 0x0006 | -| * ApparentCurrent | 0x0007 | -| * ActivePower | 0x0008 | -| * ReactivePower | 0x0009 | -| * ApparentPower | 0x000A | -| * RMSVoltage | 0x000B | -| * RMSCurrent | 0x000C | -| * RMSPower | 0x000D | -| * Frequency | 0x000E | -| * HarmonicCurrents | 0x000F | -| * HarmonicPhases | 0x0010 | -| * PowerFactor | 0x0011 | -| * NeutralCurrent | 0x0012 | +| * Accuracy | 0x0000 | +| * CumulativeEnergyImported | 0x0001 | +| * CumulativeEnergyExported | 0x0002 | +| * PeriodicEnergyImported | 0x0003 | +| * PeriodicEnergyExported | 0x0004 | +| * CumulativeEnergyReset | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -76842,38 +76695,39 @@ class SubscribeAttributeValveConfigurationAndControlClusterRevision : public Sub | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * MeasurementPeriodRanges | 0x0000 | +| * CumulativeEnergyMeasured | 0x0000 | +| * PeriodicEnergyMeasured | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Attribute PowerMode + * Attribute Accuracy */ -class ReadElectricalPowerMeasurementPowerMode : public ReadAttribute { +class ReadElectricalEnergyMeasurementAccuracy : public ReadAttribute { public: - ReadElectricalPowerMeasurementPowerMode() - : ReadAttribute("power-mode") + ReadElectricalEnergyMeasurementAccuracy() + : ReadAttribute("accuracy") { } - ~ReadElectricalPowerMeasurementPowerMode() + ~ReadElectricalEnergyMeasurementAccuracy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.PowerMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAccuracyWithCompletion:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.Accuracy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement PowerMode read Error", error); + LogNSError("ElectricalEnergyMeasurement Accuracy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76882,25 +76736,25 @@ class ReadElectricalPowerMeasurementPowerMode : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementPowerMode : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementAccuracy : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementPowerMode() - : SubscribeAttribute("power-mode") + SubscribeAttributeElectricalEnergyMeasurementAccuracy() + : SubscribeAttribute("accuracy") { } - ~SubscribeAttributeElectricalPowerMeasurementPowerMode() + ~SubscribeAttributeElectricalEnergyMeasurementAccuracy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76911,10 +76765,10 @@ class SubscribeAttributeElectricalPowerMeasurementPowerMode : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerModeWithParams:params + [cluster subscribeAttributeAccuracyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.PowerMode response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.Accuracy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -76928,34 +76782,34 @@ class SubscribeAttributeElectricalPowerMeasurementPowerMode : public SubscribeAt }; /* - * Attribute NumberOfMeasurementTypes + * Attribute CumulativeEnergyImported */ -class ReadElectricalPowerMeasurementNumberOfMeasurementTypes : public ReadAttribute { +class ReadElectricalEnergyMeasurementCumulativeEnergyImported : public ReadAttribute { public: - ReadElectricalPowerMeasurementNumberOfMeasurementTypes() - : ReadAttribute("number-of-measurement-types") + ReadElectricalEnergyMeasurementCumulativeEnergyImported() + : ReadAttribute("cumulative-energy-imported") { } - ~ReadElectricalPowerMeasurementNumberOfMeasurementTypes() + ~ReadElectricalEnergyMeasurementCumulativeEnergyImported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfMeasurementTypesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.NumberOfMeasurementTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCumulativeEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement NumberOfMeasurementTypes read Error", error); + LogNSError("ElectricalEnergyMeasurement CumulativeEnergyImported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -76964,25 +76818,25 @@ class ReadElectricalPowerMeasurementNumberOfMeasurementTypes : public ReadAttrib } }; -class SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes() - : SubscribeAttribute("number-of-measurement-types") + SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() + : SubscribeAttribute("cumulative-energy-imported") { } - ~SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes() + ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NumberOfMeasurementTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76993,10 +76847,10 @@ class SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfMeasurementTypesWithParams:params + [cluster subscribeAttributeCumulativeEnergyImportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.NumberOfMeasurementTypes response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77010,34 +76864,34 @@ class SubscribeAttributeElectricalPowerMeasurementNumberOfMeasurementTypes : pub }; /* - * Attribute Accuracy + * Attribute CumulativeEnergyExported */ -class ReadElectricalPowerMeasurementAccuracy : public ReadAttribute { +class ReadElectricalEnergyMeasurementCumulativeEnergyExported : public ReadAttribute { public: - ReadElectricalPowerMeasurementAccuracy() - : ReadAttribute("accuracy") + ReadElectricalEnergyMeasurementCumulativeEnergyExported() + : ReadAttribute("cumulative-energy-exported") { } - ~ReadElectricalPowerMeasurementAccuracy() + ~ReadElectricalEnergyMeasurementCumulativeEnergyExported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Accuracy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAccuracyWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Accuracy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCumulativeEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement Accuracy read Error", error); + LogNSError("ElectricalEnergyMeasurement CumulativeEnergyExported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77046,25 +76900,25 @@ class ReadElectricalPowerMeasurementAccuracy : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementAccuracy : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementAccuracy() - : SubscribeAttribute("accuracy") + SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() + : SubscribeAttribute("cumulative-energy-exported") { } - ~SubscribeAttributeElectricalPowerMeasurementAccuracy() + ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Accuracy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77075,10 +76929,10 @@ class SubscribeAttributeElectricalPowerMeasurementAccuracy : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAccuracyWithParams:params + [cluster subscribeAttributeCumulativeEnergyExportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Accuracy response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77092,34 +76946,34 @@ class SubscribeAttributeElectricalPowerMeasurementAccuracy : public SubscribeAtt }; /* - * Attribute Ranges + * Attribute PeriodicEnergyImported */ -class ReadElectricalPowerMeasurementRanges : public ReadAttribute { +class ReadElectricalEnergyMeasurementPeriodicEnergyImported : public ReadAttribute { public: - ReadElectricalPowerMeasurementRanges() - : ReadAttribute("ranges") + ReadElectricalEnergyMeasurementPeriodicEnergyImported() + : ReadAttribute("periodic-energy-imported") { } - ~ReadElectricalPowerMeasurementRanges() + ~ReadElectricalEnergyMeasurementPeriodicEnergyImported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Ranges::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRangesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Ranges response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeriodicEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement Ranges read Error", error); + LogNSError("ElectricalEnergyMeasurement PeriodicEnergyImported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77128,25 +76982,25 @@ class ReadElectricalPowerMeasurementRanges : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementRanges : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementRanges() - : SubscribeAttribute("ranges") + SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() + : SubscribeAttribute("periodic-energy-imported") { } - ~SubscribeAttributeElectricalPowerMeasurementRanges() + ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Ranges::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77157,10 +77011,10 @@ class SubscribeAttributeElectricalPowerMeasurementRanges : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRangesWithParams:params + [cluster subscribeAttributePeriodicEnergyImportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Ranges response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77174,34 +77028,34 @@ class SubscribeAttributeElectricalPowerMeasurementRanges : public SubscribeAttri }; /* - * Attribute Voltage + * Attribute PeriodicEnergyExported */ -class ReadElectricalPowerMeasurementVoltage : public ReadAttribute { +class ReadElectricalEnergyMeasurementPeriodicEnergyExported : public ReadAttribute { public: - ReadElectricalPowerMeasurementVoltage() - : ReadAttribute("voltage") + ReadElectricalEnergyMeasurementPeriodicEnergyExported() + : ReadAttribute("periodic-energy-exported") { } - ~ReadElectricalPowerMeasurementVoltage() + ~ReadElectricalEnergyMeasurementPeriodicEnergyExported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Voltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Voltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeriodicEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement Voltage read Error", error); + LogNSError("ElectricalEnergyMeasurement PeriodicEnergyExported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77210,25 +77064,25 @@ class ReadElectricalPowerMeasurementVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementVoltage() - : SubscribeAttribute("voltage") + SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() + : SubscribeAttribute("periodic-energy-exported") { } - ~SubscribeAttributeElectricalPowerMeasurementVoltage() + ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Voltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77239,10 +77093,10 @@ class SubscribeAttributeElectricalPowerMeasurementVoltage : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVoltageWithParams:params + [cluster subscribeAttributePeriodicEnergyExportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Voltage response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77256,34 +77110,34 @@ class SubscribeAttributeElectricalPowerMeasurementVoltage : public SubscribeAttr }; /* - * Attribute ActiveCurrent + * Attribute CumulativeEnergyReset */ -class ReadElectricalPowerMeasurementActiveCurrent : public ReadAttribute { +class ReadElectricalEnergyMeasurementCumulativeEnergyReset : public ReadAttribute { public: - ReadElectricalPowerMeasurementActiveCurrent() - : ReadAttribute("active-current") + ReadElectricalEnergyMeasurementCumulativeEnergyReset() + : ReadAttribute("cumulative-energy-reset") { } - ~ReadElectricalPowerMeasurementActiveCurrent() + ~ReadElectricalEnergyMeasurementCumulativeEnergyReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ActiveCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCumulativeEnergyResetWithCompletion:^(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ActiveCurrent read Error", error); + LogNSError("ElectricalEnergyMeasurement CumulativeEnergyReset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77292,25 +77146,25 @@ class ReadElectricalPowerMeasurementActiveCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementActiveCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementActiveCurrent() - : SubscribeAttribute("active-current") + SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset() + : SubscribeAttribute("cumulative-energy-reset") { } - ~SubscribeAttributeElectricalPowerMeasurementActiveCurrent() + ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77321,10 +77175,10 @@ class SubscribeAttributeElectricalPowerMeasurementActiveCurrent : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCurrentWithParams:params + [cluster subscribeAttributeCumulativeEnergyResetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ActiveCurrent response %@", [value description]); + reportHandler:^(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77338,34 +77192,34 @@ class SubscribeAttributeElectricalPowerMeasurementActiveCurrent : public Subscri }; /* - * Attribute ReactiveCurrent + * Attribute GeneratedCommandList */ -class ReadElectricalPowerMeasurementReactiveCurrent : public ReadAttribute { +class ReadElectricalEnergyMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadElectricalPowerMeasurementReactiveCurrent() - : ReadAttribute("reactive-current") + ReadElectricalEnergyMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalPowerMeasurementReactiveCurrent() + ~ReadElectricalEnergyMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ReactiveCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ReactiveCurrent read Error", error); + LogNSError("ElectricalEnergyMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77374,25 +77228,25 @@ class ReadElectricalPowerMeasurementReactiveCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementReactiveCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementReactiveCurrent() - : SubscribeAttribute("reactive-current") + SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalPowerMeasurementReactiveCurrent() + ~SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77403,10 +77257,10 @@ class SubscribeAttributeElectricalPowerMeasurementReactiveCurrent : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactiveCurrentWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ReactiveCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77420,34 +77274,34 @@ class SubscribeAttributeElectricalPowerMeasurementReactiveCurrent : public Subsc }; /* - * Attribute ApparentCurrent + * Attribute AcceptedCommandList */ -class ReadElectricalPowerMeasurementApparentCurrent : public ReadAttribute { +class ReadElectricalEnergyMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadElectricalPowerMeasurementApparentCurrent() - : ReadAttribute("apparent-current") + ReadElectricalEnergyMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalPowerMeasurementApparentCurrent() + ~ReadElectricalEnergyMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ApparentCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ApparentCurrent read Error", error); + LogNSError("ElectricalEnergyMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77456,25 +77310,25 @@ class ReadElectricalPowerMeasurementApparentCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementApparentCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementApparentCurrent() - : SubscribeAttribute("apparent-current") + SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalPowerMeasurementApparentCurrent() + ~SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77485,10 +77339,10 @@ class SubscribeAttributeElectricalPowerMeasurementApparentCurrent : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentCurrentWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ApparentCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77501,35 +77355,37 @@ class SubscribeAttributeElectricalPowerMeasurementApparentCurrent : public Subsc } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActivePower + * Attribute EventList */ -class ReadElectricalPowerMeasurementActivePower : public ReadAttribute { +class ReadElectricalEnergyMeasurementEventList : public ReadAttribute { public: - ReadElectricalPowerMeasurementActivePower() - : ReadAttribute("active-power") + ReadElectricalEnergyMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalPowerMeasurementActivePower() + ~ReadElectricalEnergyMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ActivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ActivePower read Error", error); + LogNSError("ElectricalEnergyMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77538,25 +77394,25 @@ class ReadElectricalPowerMeasurementActivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementActivePower : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementActivePower() - : SubscribeAttribute("active-power") + SubscribeAttributeElectricalEnergyMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalPowerMeasurementActivePower() + ~SubscribeAttributeElectricalEnergyMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77567,10 +77423,10 @@ class SubscribeAttributeElectricalPowerMeasurementActivePower : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ActivePower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77583,35 +77439,37 @@ class SubscribeAttributeElectricalPowerMeasurementActivePower : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ReactivePower + * Attribute AttributeList */ -class ReadElectricalPowerMeasurementReactivePower : public ReadAttribute { +class ReadElectricalEnergyMeasurementAttributeList : public ReadAttribute { public: - ReadElectricalPowerMeasurementReactivePower() - : ReadAttribute("reactive-power") + ReadElectricalEnergyMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalPowerMeasurementReactivePower() + ~ReadElectricalEnergyMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ReactivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ReactivePower read Error", error); + LogNSError("ElectricalEnergyMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77620,25 +77478,25 @@ class ReadElectricalPowerMeasurementReactivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementReactivePower : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementReactivePower() - : SubscribeAttribute("reactive-power") + SubscribeAttributeElectricalEnergyMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalPowerMeasurementReactivePower() + ~SubscribeAttributeElectricalEnergyMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77649,10 +77507,10 @@ class SubscribeAttributeElectricalPowerMeasurementReactivePower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ReactivePower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77666,34 +77524,34 @@ class SubscribeAttributeElectricalPowerMeasurementReactivePower : public Subscri }; /* - * Attribute ApparentPower + * Attribute FeatureMap */ -class ReadElectricalPowerMeasurementApparentPower : public ReadAttribute { +class ReadElectricalEnergyMeasurementFeatureMap : public ReadAttribute { public: - ReadElectricalPowerMeasurementApparentPower() - : ReadAttribute("apparent-power") + ReadElectricalEnergyMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalPowerMeasurementApparentPower() + ~ReadElectricalEnergyMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ApparentPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ApparentPower read Error", error); + LogNSError("ElectricalEnergyMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77702,25 +77560,25 @@ class ReadElectricalPowerMeasurementApparentPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementApparentPower : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementApparentPower() - : SubscribeAttribute("apparent-power") + SubscribeAttributeElectricalEnergyMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalPowerMeasurementApparentPower() + ~SubscribeAttributeElectricalEnergyMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77731,10 +77589,10 @@ class SubscribeAttributeElectricalPowerMeasurementApparentPower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ApparentPower response %@", [value description]); + NSLog(@"ElectricalEnergyMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77748,34 +77606,34 @@ class SubscribeAttributeElectricalPowerMeasurementApparentPower : public Subscri }; /* - * Attribute RMSVoltage + * Attribute ClusterRevision */ -class ReadElectricalPowerMeasurementRMSVoltage : public ReadAttribute { +class ReadElectricalEnergyMeasurementClusterRevision : public ReadAttribute { public: - ReadElectricalPowerMeasurementRMSVoltage() - : ReadAttribute("rmsvoltage") + ReadElectricalEnergyMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalPowerMeasurementRMSVoltage() + ~ReadElectricalEnergyMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRMSVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalEnergyMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement RMSVoltage read Error", error); + LogNSError("ElectricalEnergyMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77784,25 +77642,25 @@ class ReadElectricalPowerMeasurementRMSVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementRMSVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalEnergyMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementRMSVoltage() - : SubscribeAttribute("rmsvoltage") + SubscribeAttributeElectricalEnergyMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalPowerMeasurementRMSVoltage() + ~SubscribeAttributeElectricalEnergyMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77813,10 +77671,10 @@ class SubscribeAttributeElectricalPowerMeasurementRMSVoltage : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRMSVoltageWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSVoltage response %@", [value description]); + NSLog(@"ElectricalEnergyMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77829,117 +77687,192 @@ class SubscribeAttributeElectricalPowerMeasurementRMSVoltage : public SubscribeA } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster WaterHeaterManagement | 0x0094 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Boost | 0x00 | +| * CancelBoost | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * HeaterTypes | 0x0000 | +| * HeatDemand | 0x0001 | +| * TankVolume | 0x0002 | +| * EstimatedHeatRequired | 0x0003 | +| * TankPercentage | 0x0004 | +| * BoostState | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * BoostStarted | 0x0000 | +| * BoostEnded | 0x0001 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute RMSCurrent + * Command Boost */ -class ReadElectricalPowerMeasurementRMSCurrent : public ReadAttribute { +class WaterHeaterManagementBoost : public ClusterCommand { public: - ReadElectricalPowerMeasurementRMSCurrent() - : ReadAttribute("rmscurrent") - { - } - - ~ReadElectricalPowerMeasurementRMSCurrent() + WaterHeaterManagementBoost() + : ClusterCommand("boost") + , mComplex_BoostInfo(&mRequest.boostInfo) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("BoostInfo", &mComplex_BoostInfo); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterManagement::Commands::Boost::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRMSCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalPowerMeasurement RMSCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWaterHeaterManagementClusterBoostParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.boostInfo = [MTRWaterHeaterManagementClusterWaterHeaterBoostInfoStruct new]; + params.boostInfo.duration = [NSNumber numberWithUnsignedInt:mRequest.boostInfo.duration]; + if (mRequest.boostInfo.oneShot.HasValue()) { + params.boostInfo.oneShot = [NSNumber numberWithBool:mRequest.boostInfo.oneShot.Value()]; + } else { + params.boostInfo.oneShot = nil; + } + if (mRequest.boostInfo.emergencyBoost.HasValue()) { + params.boostInfo.emergencyBoost = [NSNumber numberWithBool:mRequest.boostInfo.emergencyBoost.Value()]; + } else { + params.boostInfo.emergencyBoost = nil; + } + if (mRequest.boostInfo.temporarySetpoint.HasValue()) { + params.boostInfo.temporarySetpoint = [NSNumber numberWithShort:mRequest.boostInfo.temporarySetpoint.Value()]; + } else { + params.boostInfo.temporarySetpoint = nil; + } + if (mRequest.boostInfo.targetPercentage.HasValue()) { + params.boostInfo.targetPercentage = [NSNumber numberWithUnsignedChar:mRequest.boostInfo.targetPercentage.Value()]; + } else { + params.boostInfo.targetPercentage = nil; + } + if (mRequest.boostInfo.targetReheat.HasValue()) { + params.boostInfo.targetReheat = [NSNumber numberWithUnsignedChar:mRequest.boostInfo.targetReheat.Value()]; + } else { + params.boostInfo.targetReheat = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster boostWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WaterHeaterManagement::Commands::Boost::Type mRequest; + TypedComplexArgument mComplex_BoostInfo; }; -class SubscribeAttributeElectricalPowerMeasurementRMSCurrent : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelBoost + */ +class WaterHeaterManagementCancelBoost : public ClusterCommand { public: - SubscribeAttributeElectricalPowerMeasurementRMSCurrent() - : SubscribeAttribute("rmscurrent") - { - } - - ~SubscribeAttributeElectricalPowerMeasurementRMSCurrent() + WaterHeaterManagementCancelBoost() + : ClusterCommand("cancel-boost") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterManagement::Commands::CancelBoost::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWaterHeaterManagementClusterCancelBoostParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster cancelBoostWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeRMSCurrentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RMSPower + * Attribute HeaterTypes */ -class ReadElectricalPowerMeasurementRMSPower : public ReadAttribute { +class ReadWaterHeaterManagementHeaterTypes : public ReadAttribute { public: - ReadElectricalPowerMeasurementRMSPower() - : ReadAttribute("rmspower") + ReadWaterHeaterManagementHeaterTypes() + : ReadAttribute("heater-types") { } - ~ReadElectricalPowerMeasurementRMSPower() + ~ReadWaterHeaterManagementHeaterTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeaterTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRMSPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHeaterTypesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.HeaterTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement RMSPower read Error", error); + LogNSError("WaterHeaterManagement HeaterTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -77948,25 +77881,25 @@ class ReadElectricalPowerMeasurementRMSPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementRMSPower : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementHeaterTypes : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementRMSPower() - : SubscribeAttribute("rmspower") + SubscribeAttributeWaterHeaterManagementHeaterTypes() + : SubscribeAttribute("heater-types") { } - ~SubscribeAttributeElectricalPowerMeasurementRMSPower() + ~SubscribeAttributeWaterHeaterManagementHeaterTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::RMSPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeaterTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -77977,10 +77910,10 @@ class SubscribeAttributeElectricalPowerMeasurementRMSPower : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRMSPowerWithParams:params + [cluster subscribeAttributeHeaterTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.RMSPower response %@", [value description]); + NSLog(@"WaterHeaterManagement.HeaterTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -77993,35 +77926,38 @@ class SubscribeAttributeElectricalPowerMeasurementRMSPower : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Frequency + * Attribute HeatDemand */ -class ReadElectricalPowerMeasurementFrequency : public ReadAttribute { +class ReadWaterHeaterManagementHeatDemand : public ReadAttribute { public: - ReadElectricalPowerMeasurementFrequency() - : ReadAttribute("frequency") + ReadWaterHeaterManagementHeatDemand() + : ReadAttribute("heat-demand") { } - ~ReadElectricalPowerMeasurementFrequency() + ~ReadWaterHeaterManagementHeatDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Frequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeatDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Frequency response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHeatDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.HeatDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement Frequency read Error", error); + LogNSError("WaterHeaterManagement HeatDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78030,25 +77966,25 @@ class ReadElectricalPowerMeasurementFrequency : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementFrequency : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementHeatDemand : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementFrequency() - : SubscribeAttribute("frequency") + SubscribeAttributeWaterHeaterManagementHeatDemand() + : SubscribeAttribute("heat-demand") { } - ~SubscribeAttributeElectricalPowerMeasurementFrequency() + ~SubscribeAttributeWaterHeaterManagementHeatDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::Frequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeatDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78059,10 +77995,10 @@ class SubscribeAttributeElectricalPowerMeasurementFrequency : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFrequencyWithParams:params + [cluster subscribeAttributeHeatDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.Frequency response %@", [value description]); + NSLog(@"WaterHeaterManagement.HeatDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78075,35 +78011,38 @@ class SubscribeAttributeElectricalPowerMeasurementFrequency : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute HarmonicCurrents + * Attribute TankVolume */ -class ReadElectricalPowerMeasurementHarmonicCurrents : public ReadAttribute { +class ReadWaterHeaterManagementTankVolume : public ReadAttribute { public: - ReadElectricalPowerMeasurementHarmonicCurrents() - : ReadAttribute("harmonic-currents") + ReadWaterHeaterManagementTankVolume() + : ReadAttribute("tank-volume") { } - ~ReadElectricalPowerMeasurementHarmonicCurrents() + ~ReadWaterHeaterManagementTankVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicCurrents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankVolume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHarmonicCurrentsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.HarmonicCurrents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTankVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.TankVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement HarmonicCurrents read Error", error); + LogNSError("WaterHeaterManagement TankVolume read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78112,25 +78051,25 @@ class ReadElectricalPowerMeasurementHarmonicCurrents : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementTankVolume : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents() - : SubscribeAttribute("harmonic-currents") + SubscribeAttributeWaterHeaterManagementTankVolume() + : SubscribeAttribute("tank-volume") { } - ~SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents() + ~SubscribeAttributeWaterHeaterManagementTankVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicCurrents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankVolume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78141,10 +78080,10 @@ class SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHarmonicCurrentsWithParams:params + [cluster subscribeAttributeTankVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.HarmonicCurrents response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.TankVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78157,35 +78096,38 @@ class SubscribeAttributeElectricalPowerMeasurementHarmonicCurrents : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute HarmonicPhases + * Attribute EstimatedHeatRequired */ -class ReadElectricalPowerMeasurementHarmonicPhases : public ReadAttribute { +class ReadWaterHeaterManagementEstimatedHeatRequired : public ReadAttribute { public: - ReadElectricalPowerMeasurementHarmonicPhases() - : ReadAttribute("harmonic-phases") + ReadWaterHeaterManagementEstimatedHeatRequired() + : ReadAttribute("estimated-heat-required") { } - ~ReadElectricalPowerMeasurementHarmonicPhases() + ~ReadWaterHeaterManagementEstimatedHeatRequired() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicPhases::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EstimatedHeatRequired::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHarmonicPhasesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.HarmonicPhases response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEstimatedHeatRequiredWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.EstimatedHeatRequired response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement HarmonicPhases read Error", error); + LogNSError("WaterHeaterManagement EstimatedHeatRequired read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78194,25 +78136,25 @@ class ReadElectricalPowerMeasurementHarmonicPhases : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementHarmonicPhases : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementHarmonicPhases() - : SubscribeAttribute("harmonic-phases") + SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired() + : SubscribeAttribute("estimated-heat-required") { } - ~SubscribeAttributeElectricalPowerMeasurementHarmonicPhases() + ~SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::HarmonicPhases::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EstimatedHeatRequired::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78223,10 +78165,10 @@ class SubscribeAttributeElectricalPowerMeasurementHarmonicPhases : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHarmonicPhasesWithParams:params + [cluster subscribeAttributeEstimatedHeatRequiredWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.HarmonicPhases response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.EstimatedHeatRequired response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78239,35 +78181,38 @@ class SubscribeAttributeElectricalPowerMeasurementHarmonicPhases : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PowerFactor + * Attribute TankPercentage */ -class ReadElectricalPowerMeasurementPowerFactor : public ReadAttribute { +class ReadWaterHeaterManagementTankPercentage : public ReadAttribute { public: - ReadElectricalPowerMeasurementPowerFactor() - : ReadAttribute("power-factor") + ReadWaterHeaterManagementTankPercentage() + : ReadAttribute("tank-percentage") { } - ~ReadElectricalPowerMeasurementPowerFactor() + ~ReadWaterHeaterManagementTankPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.PowerFactor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTankPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.TankPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement PowerFactor read Error", error); + LogNSError("WaterHeaterManagement TankPercentage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78276,25 +78221,25 @@ class ReadElectricalPowerMeasurementPowerFactor : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementPowerFactor : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementTankPercentage : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementPowerFactor() - : SubscribeAttribute("power-factor") + SubscribeAttributeWaterHeaterManagementTankPercentage() + : SubscribeAttribute("tank-percentage") { } - ~SubscribeAttributeElectricalPowerMeasurementPowerFactor() + ~SubscribeAttributeWaterHeaterManagementTankPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::PowerFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78305,10 +78250,10 @@ class SubscribeAttributeElectricalPowerMeasurementPowerFactor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorWithParams:params + [cluster subscribeAttributeTankPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.PowerFactor response %@", [value description]); + NSLog(@"WaterHeaterManagement.TankPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78321,35 +78266,38 @@ class SubscribeAttributeElectricalPowerMeasurementPowerFactor : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute NeutralCurrent + * Attribute BoostState */ -class ReadElectricalPowerMeasurementNeutralCurrent : public ReadAttribute { +class ReadWaterHeaterManagementBoostState : public ReadAttribute { public: - ReadElectricalPowerMeasurementNeutralCurrent() - : ReadAttribute("neutral-current") + ReadWaterHeaterManagementBoostState() + : ReadAttribute("boost-state") { } - ~ReadElectricalPowerMeasurementNeutralCurrent() + ~ReadWaterHeaterManagementBoostState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NeutralCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::BoostState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.NeutralCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBoostStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterManagement.BoostState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement NeutralCurrent read Error", error); + LogNSError("WaterHeaterManagement BoostState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78358,25 +78306,25 @@ class ReadElectricalPowerMeasurementNeutralCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementNeutralCurrent : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementBoostState : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementNeutralCurrent() - : SubscribeAttribute("neutral-current") + SubscribeAttributeWaterHeaterManagementBoostState() + : SubscribeAttribute("boost-state") { } - ~SubscribeAttributeElectricalPowerMeasurementNeutralCurrent() + ~SubscribeAttributeWaterHeaterManagementBoostState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::NeutralCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::BoostState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78387,10 +78335,10 @@ class SubscribeAttributeElectricalPowerMeasurementNeutralCurrent : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNeutralCurrentWithParams:params + [cluster subscribeAttributeBoostStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.NeutralCurrent response %@", [value description]); + NSLog(@"WaterHeaterManagement.BoostState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78403,35 +78351,38 @@ class SubscribeAttributeElectricalPowerMeasurementNeutralCurrent : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadElectricalPowerMeasurementGeneratedCommandList : public ReadAttribute { +class ReadWaterHeaterManagementGeneratedCommandList : public ReadAttribute { public: - ReadElectricalPowerMeasurementGeneratedCommandList() + ReadWaterHeaterManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadElectricalPowerMeasurementGeneratedCommandList() + ~ReadWaterHeaterManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"WaterHeaterManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement GeneratedCommandList read Error", error); + LogNSError("WaterHeaterManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78440,25 +78391,25 @@ class ReadElectricalPowerMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList() + SubscribeAttributeWaterHeaterManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList() + ~SubscribeAttributeWaterHeaterManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78472,7 +78423,7 @@ class SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"WaterHeaterManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78485,35 +78436,38 @@ class SubscribeAttributeElectricalPowerMeasurementGeneratedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadElectricalPowerMeasurementAcceptedCommandList : public ReadAttribute { +class ReadWaterHeaterManagementAcceptedCommandList : public ReadAttribute { public: - ReadElectricalPowerMeasurementAcceptedCommandList() + ReadWaterHeaterManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadElectricalPowerMeasurementAcceptedCommandList() + ~ReadWaterHeaterManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"WaterHeaterManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement AcceptedCommandList read Error", error); + LogNSError("WaterHeaterManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78522,25 +78476,25 @@ class ReadElectricalPowerMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList() + SubscribeAttributeWaterHeaterManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList() + ~SubscribeAttributeWaterHeaterManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78554,7 +78508,7 @@ class SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList : public S [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"WaterHeaterManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78567,37 +78521,38 @@ class SubscribeAttributeElectricalPowerMeasurementAcceptedCommandList : public S } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadElectricalPowerMeasurementEventList : public ReadAttribute { +class ReadWaterHeaterManagementEventList : public ReadAttribute { public: - ReadElectricalPowerMeasurementEventList() + ReadWaterHeaterManagementEventList() : ReadAttribute("event-list") { } - ~ReadElectricalPowerMeasurementEventList() + ~ReadWaterHeaterManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.EventList response %@", [value description]); + NSLog(@"WaterHeaterManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement EventList read Error", error); + LogNSError("WaterHeaterManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78606,25 +78561,25 @@ class ReadElectricalPowerMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementEventList() + SubscribeAttributeWaterHeaterManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalPowerMeasurementEventList() + ~SubscribeAttributeWaterHeaterManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78638,7 +78593,7 @@ class SubscribeAttributeElectricalPowerMeasurementEventList : public SubscribeAt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.EventList response %@", [value description]); + NSLog(@"WaterHeaterManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78652,36 +78607,37 @@ class SubscribeAttributeElectricalPowerMeasurementEventList : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadElectricalPowerMeasurementAttributeList : public ReadAttribute { +class ReadWaterHeaterManagementAttributeList : public ReadAttribute { public: - ReadElectricalPowerMeasurementAttributeList() + ReadWaterHeaterManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadElectricalPowerMeasurementAttributeList() + ~ReadWaterHeaterManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.AttributeList response %@", [value description]); + NSLog(@"WaterHeaterManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement AttributeList read Error", error); + LogNSError("WaterHeaterManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78690,25 +78646,25 @@ class ReadElectricalPowerMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementAttributeList() + SubscribeAttributeWaterHeaterManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalPowerMeasurementAttributeList() + ~SubscribeAttributeWaterHeaterManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78722,7 +78678,7 @@ class SubscribeAttributeElectricalPowerMeasurementAttributeList : public Subscri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.AttributeList response %@", [value description]); + NSLog(@"WaterHeaterManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78735,35 +78691,38 @@ class SubscribeAttributeElectricalPowerMeasurementAttributeList : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadElectricalPowerMeasurementFeatureMap : public ReadAttribute { +class ReadWaterHeaterManagementFeatureMap : public ReadAttribute { public: - ReadElectricalPowerMeasurementFeatureMap() + ReadWaterHeaterManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadElectricalPowerMeasurementFeatureMap() + ~ReadWaterHeaterManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.FeatureMap response %@", [value description]); + NSLog(@"WaterHeaterManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement FeatureMap read Error", error); + LogNSError("WaterHeaterManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78772,25 +78731,25 @@ class ReadElectricalPowerMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementFeatureMap() + SubscribeAttributeWaterHeaterManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalPowerMeasurementFeatureMap() + ~SubscribeAttributeWaterHeaterManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78804,7 +78763,7 @@ class SubscribeAttributeElectricalPowerMeasurementFeatureMap : public SubscribeA [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.FeatureMap response %@", [value description]); + NSLog(@"WaterHeaterManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78817,35 +78776,38 @@ class SubscribeAttributeElectricalPowerMeasurementFeatureMap : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadElectricalPowerMeasurementClusterRevision : public ReadAttribute { +class ReadWaterHeaterManagementClusterRevision : public ReadAttribute { public: - ReadElectricalPowerMeasurementClusterRevision() + ReadWaterHeaterManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadElectricalPowerMeasurementClusterRevision() + ~ReadWaterHeaterManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"WaterHeaterManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalPowerMeasurement ClusterRevision read Error", error); + LogNSError("WaterHeaterManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78854,25 +78816,25 @@ class ReadElectricalPowerMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeElectricalPowerMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalPowerMeasurementClusterRevision() + SubscribeAttributeWaterHeaterManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalPowerMeasurementClusterRevision() + ~SubscribeAttributeWaterHeaterManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalPowerMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalPowerMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalPowerMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78886,7 +78848,7 @@ class SubscribeAttributeElectricalPowerMeasurementClusterRevision : public Subsc [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalPowerMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"WaterHeaterManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -78899,18 +78861,28 @@ class SubscribeAttributeElectricalPowerMeasurementClusterRevision : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ElectricalEnergyMeasurement | 0x0091 | +| Cluster DemandResponseLoadControl | 0x0096 | |------------------------------------------------------------------------------| | Commands: | | +| * RegisterLoadControlProgramRequest | 0x00 | +| * UnregisterLoadControlProgramRequest | 0x01 | +| * AddLoadControlEventRequest | 0x02 | +| * RemoveLoadControlEventRequest | 0x03 | +| * ClearLoadControlEventsRequest | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * Accuracy | 0x0000 | -| * CumulativeEnergyImported | 0x0001 | -| * CumulativeEnergyExported | 0x0002 | -| * PeriodicEnergyImported | 0x0003 | -| * PeriodicEnergyExported | 0x0004 | -| * CumulativeEnergyReset | 0x0005 | +| * LoadControlPrograms | 0x0000 | +| * NumberOfLoadControlPrograms | 0x0001 | +| * Events | 0x0002 | +| * ActiveEvents | 0x0003 | +| * NumberOfEventsPerProgram | 0x0004 | +| * NumberOfTransitions | 0x0005 | +| * DefaultRandomStart | 0x0006 | +| * DefaultRandomDuration | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -78919,39 +78891,421 @@ class SubscribeAttributeElectricalPowerMeasurementClusterRevision : public Subsc | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * CumulativeEnergyMeasured | 0x0000 | -| * PeriodicEnergyMeasured | 0x0001 | +| * LoadControlEventStatusChange | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute Accuracy + * Command RegisterLoadControlProgramRequest */ -class ReadElectricalEnergyMeasurementAccuracy : public ReadAttribute { +class DemandResponseLoadControlRegisterLoadControlProgramRequest : public ClusterCommand { public: - ReadElectricalEnergyMeasurementAccuracy() - : ReadAttribute("accuracy") + DemandResponseLoadControlRegisterLoadControlProgramRequest() + : ClusterCommand("register-load-control-program-request") + , mComplex_LoadControlProgram(&mRequest.loadControlProgram) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("LoadControlProgram", &mComplex_LoadControlProgram); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadElectricalEnergyMeasurementAccuracy() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; + params.loadControlProgram.programID = [NSData dataWithBytes:mRequest.loadControlProgram.programID.data() length:mRequest.loadControlProgram.programID.size()]; + params.loadControlProgram.name = [[NSString alloc] initWithBytes:mRequest.loadControlProgram.name.data() length:mRequest.loadControlProgram.name.size() encoding:NSUTF8StringEncoding]; + if (mRequest.loadControlProgram.enrollmentGroup.IsNull()) { + params.loadControlProgram.enrollmentGroup = nil; + } else { + params.loadControlProgram.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.enrollmentGroup.Value()]; + } + if (mRequest.loadControlProgram.randomStartMinutes.IsNull()) { + params.loadControlProgram.randomStartMinutes = nil; + } else { + params.loadControlProgram.randomStartMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomStartMinutes.Value()]; + } + if (mRequest.loadControlProgram.randomDurationMinutes.IsNull()) { + params.loadControlProgram.randomDurationMinutes = nil; + } else { + params.loadControlProgram.randomDurationMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomDurationMinutes.Value()]; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster registerLoadControlProgramRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type mRequest; + TypedComplexArgument mComplex_LoadControlProgram; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnregisterLoadControlProgramRequest + */ +class DemandResponseLoadControlUnregisterLoadControlProgramRequest : public ClusterCommand { +public: + DemandResponseLoadControlUnregisterLoadControlProgramRequest() + : ClusterCommand("unregister-load-control-program-request") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("LoadControlProgramID", &mRequest.loadControlProgramID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.loadControlProgramID = [NSData dataWithBytes:mRequest.loadControlProgramID.data() length:mRequest.loadControlProgramID.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unregisterLoadControlProgramRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddLoadControlEventRequest + */ +class DemandResponseLoadControlAddLoadControlEventRequest : public ClusterCommand { +public: + DemandResponseLoadControlAddLoadControlEventRequest() + : ClusterCommand("add-load-control-event-request") + , mComplex_Event(&mRequest.event) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Event", &mComplex_Event); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; + params.event.eventID = [NSData dataWithBytes:mRequest.event.eventID.data() length:mRequest.event.eventID.size()]; + if (mRequest.event.programID.IsNull()) { + params.event.programID = nil; + } else { + params.event.programID = [NSData dataWithBytes:mRequest.event.programID.Value().data() length:mRequest.event.programID.Value().size()]; + } + params.event.control = [NSNumber numberWithUnsignedShort:mRequest.event.control.Raw()]; + params.event.deviceClass = [NSNumber numberWithUnsignedInt:mRequest.event.deviceClass.Raw()]; + if (mRequest.event.enrollmentGroup.HasValue()) { + params.event.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.event.enrollmentGroup.Value()]; + } else { + params.event.enrollmentGroup = nil; + } + params.event.criticality = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.event.criticality)]; + if (mRequest.event.startTime.IsNull()) { + params.event.startTime = nil; + } else { + params.event.startTime = [NSNumber numberWithUnsignedInt:mRequest.event.startTime.Value()]; + } + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.event.transitions) { + MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct * newElement_1; + newElement_1 = [MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct new]; + newElement_1.duration = [NSNumber numberWithUnsignedShort:entry_1.duration]; + newElement_1.control = [NSNumber numberWithUnsignedShort:entry_1.control.Raw()]; + if (entry_1.temperatureControl.HasValue()) { + newElement_1.temperatureControl = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; + if (entry_1.temperatureControl.Value().coolingTempOffset.HasValue()) { + if (entry_1.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { + newElement_1.temperatureControl.coolingTempOffset = nil; + } else { + newElement_1.temperatureControl.coolingTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().coolingTempOffset.Value().Value()]; + } + } else { + newElement_1.temperatureControl.coolingTempOffset = nil; + } + if (entry_1.temperatureControl.Value().heatingtTempOffset.HasValue()) { + if (entry_1.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { + newElement_1.temperatureControl.heatingtTempOffset = nil; + } else { + newElement_1.temperatureControl.heatingtTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().heatingtTempOffset.Value().Value()]; + } + } else { + newElement_1.temperatureControl.heatingtTempOffset = nil; + } + if (entry_1.temperatureControl.Value().coolingTempSetpoint.HasValue()) { + if (entry_1.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { + newElement_1.temperatureControl.coolingTempSetpoint = nil; + } else { + newElement_1.temperatureControl.coolingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().coolingTempSetpoint.Value().Value()]; + } + } else { + newElement_1.temperatureControl.coolingTempSetpoint = nil; + } + if (entry_1.temperatureControl.Value().heatingTempSetpoint.HasValue()) { + if (entry_1.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { + newElement_1.temperatureControl.heatingTempSetpoint = nil; + } else { + newElement_1.temperatureControl.heatingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().heatingTempSetpoint.Value().Value()]; + } + } else { + newElement_1.temperatureControl.heatingTempSetpoint = nil; + } + } else { + newElement_1.temperatureControl = nil; + } + if (entry_1.averageLoadControl.HasValue()) { + newElement_1.averageLoadControl = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; + newElement_1.averageLoadControl.loadAdjustment = [NSNumber numberWithChar:entry_1.averageLoadControl.Value().loadAdjustment]; + } else { + newElement_1.averageLoadControl = nil; + } + if (entry_1.dutyCycleControl.HasValue()) { + newElement_1.dutyCycleControl = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; + newElement_1.dutyCycleControl.dutyCycle = [NSNumber numberWithUnsignedChar:entry_1.dutyCycleControl.Value().dutyCycle]; + } else { + newElement_1.dutyCycleControl = nil; + } + if (entry_1.powerSavingsControl.HasValue()) { + newElement_1.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; + newElement_1.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_1.powerSavingsControl.Value().powerSavings]; + } else { + newElement_1.powerSavingsControl = nil; + } + if (entry_1.heatingSourceControl.HasValue()) { + newElement_1.heatingSourceControl = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; + newElement_1.heatingSourceControl.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.heatingSourceControl.Value().heatingSource)]; + } else { + newElement_1.heatingSourceControl = nil; + } + [array_1 addObject:newElement_1]; + } + params.event.transitions = array_1; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addLoadControlEventRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type mRequest; + TypedComplexArgument mComplex_Event; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveLoadControlEventRequest + */ +class DemandResponseLoadControlRemoveLoadControlEventRequest : public ClusterCommand { +public: + DemandResponseLoadControlRemoveLoadControlEventRequest() + : ClusterCommand("remove-load-control-event-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("EventID", &mRequest.eventID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("CancelControl", 0, UINT16_MAX, &mRequest.cancelControl); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.eventID = [NSData dataWithBytes:mRequest.eventID.data() length:mRequest.eventID.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cancelControl = [NSNumber numberWithUnsignedShort:mRequest.cancelControl.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeLoadControlEventRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ClearLoadControlEventsRequest + */ +class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCommand { +public: + DemandResponseLoadControlClearLoadControlEventsRequest() + : ClusterCommand("clear-load-control-events-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearLoadControlEventsRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute LoadControlPrograms + */ +class ReadDemandResponseLoadControlLoadControlPrograms : public ReadAttribute { +public: + ReadDemandResponseLoadControlLoadControlPrograms() + : ReadAttribute("load-control-programs") + { + } + + ~ReadDemandResponseLoadControlLoadControlPrograms() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAccuracyWithCompletion:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.Accuracy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLoadControlProgramsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.LoadControlPrograms response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement Accuracy read Error", error); + LogNSError("DemandResponseLoadControl LoadControlPrograms read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -78960,25 +79314,25 @@ class ReadElectricalEnergyMeasurementAccuracy : public ReadAttribute { } }; -class SubscribeAttributeElectricalEnergyMeasurementAccuracy : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlLoadControlPrograms : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementAccuracy() - : SubscribeAttribute("accuracy") + SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() + : SubscribeAttribute("load-control-programs") { } - ~SubscribeAttributeElectricalEnergyMeasurementAccuracy() + ~SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::Accuracy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -78989,10 +79343,10 @@ class SubscribeAttributeElectricalEnergyMeasurementAccuracy : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAccuracyWithParams:params + [cluster subscribeAttributeLoadControlProgramsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterMeasurementAccuracyStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.Accuracy response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.LoadControlPrograms response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79005,35 +79359,38 @@ class SubscribeAttributeElectricalEnergyMeasurementAccuracy : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CumulativeEnergyImported + * Attribute NumberOfLoadControlPrograms */ -class ReadElectricalEnergyMeasurementCumulativeEnergyImported : public ReadAttribute { +class ReadDemandResponseLoadControlNumberOfLoadControlPrograms : public ReadAttribute { public: - ReadElectricalEnergyMeasurementCumulativeEnergyImported() - : ReadAttribute("cumulative-energy-imported") + ReadDemandResponseLoadControlNumberOfLoadControlPrograms() + : ReadAttribute("number-of-load-control-programs") { } - ~ReadElectricalEnergyMeasurementCumulativeEnergyImported() + ~ReadDemandResponseLoadControlNumberOfLoadControlPrograms() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCumulativeEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfLoadControlProgramsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement CumulativeEnergyImported read Error", error); + LogNSError("DemandResponseLoadControl NumberOfLoadControlPrograms read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79042,25 +79399,25 @@ class ReadElectricalEnergyMeasurementCumulativeEnergyImported : public ReadAttri } }; -class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() - : SubscribeAttribute("cumulative-energy-imported") + SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() + : SubscribeAttribute("number-of-load-control-programs") { } - ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported() + ~SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyImported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79071,10 +79428,10 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCumulativeEnergyImportedWithParams:params + [cluster subscribeAttributeNumberOfLoadControlProgramsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyImported response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79087,35 +79444,38 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyImported : pu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CumulativeEnergyExported + * Attribute Events */ -class ReadElectricalEnergyMeasurementCumulativeEnergyExported : public ReadAttribute { +class ReadDemandResponseLoadControlEvents : public ReadAttribute { public: - ReadElectricalEnergyMeasurementCumulativeEnergyExported() - : ReadAttribute("cumulative-energy-exported") + ReadDemandResponseLoadControlEvents() + : ReadAttribute("events") { } - ~ReadElectricalEnergyMeasurementCumulativeEnergyExported() + ~ReadDemandResponseLoadControlEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCumulativeEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.Events response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement CumulativeEnergyExported read Error", error); + LogNSError("DemandResponseLoadControl Events read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79124,25 +79484,25 @@ class ReadElectricalEnergyMeasurementCumulativeEnergyExported : public ReadAttri } }; -class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlEvents : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() - : SubscribeAttribute("cumulative-energy-exported") + SubscribeAttributeDemandResponseLoadControlEvents() + : SubscribeAttribute("events") { } - ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported() + ~SubscribeAttributeDemandResponseLoadControlEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyExported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79153,10 +79513,10 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCumulativeEnergyExportedWithParams:params + [cluster subscribeAttributeEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyExported response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.Events response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79169,35 +79529,38 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyExported : pu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PeriodicEnergyImported + * Attribute ActiveEvents */ -class ReadElectricalEnergyMeasurementPeriodicEnergyImported : public ReadAttribute { +class ReadDemandResponseLoadControlActiveEvents : public ReadAttribute { public: - ReadElectricalEnergyMeasurementPeriodicEnergyImported() - : ReadAttribute("periodic-energy-imported") + ReadDemandResponseLoadControlActiveEvents() + : ReadAttribute("active-events") { } - ~ReadElectricalEnergyMeasurementPeriodicEnergyImported() + ~ReadDemandResponseLoadControlActiveEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeriodicEnergyImportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ActiveEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement PeriodicEnergyImported read Error", error); + LogNSError("DemandResponseLoadControl ActiveEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79206,25 +79569,25 @@ class ReadElectricalEnergyMeasurementPeriodicEnergyImported : public ReadAttribu } }; -class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlActiveEvents : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() - : SubscribeAttribute("periodic-energy-imported") + SubscribeAttributeDemandResponseLoadControlActiveEvents() + : SubscribeAttribute("active-events") { } - ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported() + ~SubscribeAttributeDemandResponseLoadControlActiveEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyImported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79235,10 +79598,10 @@ class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeriodicEnergyImportedWithParams:params + [cluster subscribeAttributeActiveEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyImported response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ActiveEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79251,35 +79614,38 @@ class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyImported : publ } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PeriodicEnergyExported + * Attribute NumberOfEventsPerProgram */ -class ReadElectricalEnergyMeasurementPeriodicEnergyExported : public ReadAttribute { +class ReadDemandResponseLoadControlNumberOfEventsPerProgram : public ReadAttribute { public: - ReadElectricalEnergyMeasurementPeriodicEnergyExported() - : ReadAttribute("periodic-energy-exported") + ReadDemandResponseLoadControlNumberOfEventsPerProgram() + : ReadAttribute("number-of-events-per-program") { } - ~ReadElectricalEnergyMeasurementPeriodicEnergyExported() + ~ReadDemandResponseLoadControlNumberOfEventsPerProgram() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeriodicEnergyExportedWithCompletion:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfEventsPerProgramWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement PeriodicEnergyExported read Error", error); + LogNSError("DemandResponseLoadControl NumberOfEventsPerProgram read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79288,25 +79654,25 @@ class ReadElectricalEnergyMeasurementPeriodicEnergyExported : public ReadAttribu } }; -class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() - : SubscribeAttribute("periodic-energy-exported") + SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() + : SubscribeAttribute("number-of-events-per-program") { } - ~SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported() + ~SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::PeriodicEnergyExported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79317,10 +79683,10 @@ class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeriodicEnergyExportedWithParams:params + [cluster subscribeAttributeNumberOfEventsPerProgramWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterEnergyMeasurementStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.PeriodicEnergyExported response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79333,35 +79699,38 @@ class SubscribeAttributeElectricalEnergyMeasurementPeriodicEnergyExported : publ } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CumulativeEnergyReset + * Attribute NumberOfTransitions */ -class ReadElectricalEnergyMeasurementCumulativeEnergyReset : public ReadAttribute { +class ReadDemandResponseLoadControlNumberOfTransitions : public ReadAttribute { public: - ReadElectricalEnergyMeasurementCumulativeEnergyReset() - : ReadAttribute("cumulative-energy-reset") + ReadDemandResponseLoadControlNumberOfTransitions() + : ReadAttribute("number-of-transitions") { } - ~ReadElectricalEnergyMeasurementCumulativeEnergyReset() + ~ReadDemandResponseLoadControlNumberOfTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCumulativeEnergyResetWithCompletion:^(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyReset response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement CumulativeEnergyReset read Error", error); + LogNSError("DemandResponseLoadControl NumberOfTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79370,25 +79739,25 @@ class ReadElectricalEnergyMeasurementCumulativeEnergyReset : public ReadAttribut } }; -class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset() - : SubscribeAttribute("cumulative-energy-reset") + SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() + : SubscribeAttribute("number-of-transitions") { } - ~SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset() + ~SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::CumulativeEnergyReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79399,10 +79768,10 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCumulativeEnergyResetWithParams:params + [cluster subscribeAttributeNumberOfTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRElectricalEnergyMeasurementClusterCumulativeEnergyResetStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.CumulativeEnergyReset response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79415,35 +79784,38 @@ class SubscribeAttributeElectricalEnergyMeasurementCumulativeEnergyReset : publi } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute DefaultRandomStart */ -class ReadElectricalEnergyMeasurementGeneratedCommandList : public ReadAttribute { +class ReadDemandResponseLoadControlDefaultRandomStart : public ReadAttribute { public: - ReadElectricalEnergyMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDemandResponseLoadControlDefaultRandomStart() + : ReadAttribute("default-random-start") { } - ~ReadElectricalEnergyMeasurementGeneratedCommandList() + ~ReadDemandResponseLoadControlDefaultRandomStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultRandomStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement GeneratedCommandList read Error", error); + LogNSError("DemandResponseLoadControl DefaultRandomStart read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79452,25 +79824,66 @@ class ReadElectricalEnergyMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteDemandResponseLoadControlDefaultRandomStart : public WriteAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteDemandResponseLoadControlDefaultRandomStart() + : WriteAttribute("default-random-start") { + AddArgument("attr-name", "default-random-start"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList() + ~WriteDemandResponseLoadControlDefaultRandomStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultRandomStartWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DemandResponseLoadControl DefaultRandomStart write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDemandResponseLoadControlDefaultRandomStart : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() + : SubscribeAttribute("default-random-start") + { + } + + ~SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79481,10 +79894,10 @@ class SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeDefaultRandomStartWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79497,35 +79910,38 @@ class SubscribeAttributeElectricalEnergyMeasurementGeneratedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute DefaultRandomDuration */ -class ReadElectricalEnergyMeasurementAcceptedCommandList : public ReadAttribute { +class ReadDemandResponseLoadControlDefaultRandomDuration : public ReadAttribute { public: - ReadElectricalEnergyMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDemandResponseLoadControlDefaultRandomDuration() + : ReadAttribute("default-random-duration") { } - ~ReadElectricalEnergyMeasurementAcceptedCommandList() + ~ReadDemandResponseLoadControlDefaultRandomDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultRandomDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement AcceptedCommandList read Error", error); + LogNSError("DemandResponseLoadControl DefaultRandomDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79534,25 +79950,66 @@ class ReadElectricalEnergyMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteDemandResponseLoadControlDefaultRandomDuration : public WriteAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteDemandResponseLoadControlDefaultRandomDuration() + : WriteAttribute("default-random-duration") { + AddArgument("attr-name", "default-random-duration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList() + ~WriteDemandResponseLoadControlDefaultRandomDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeDefaultRandomDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DemandResponseLoadControl DefaultRandomDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration : public SubscribeAttribute { +public: + SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() + : SubscribeAttribute("default-random-duration") + { + } + + ~SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79563,10 +80020,10 @@ class SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDefaultRandomDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.DefaultRandomDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79579,37 +80036,38 @@ class SubscribeAttributeElectricalEnergyMeasurementAcceptedCommandList : public } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadElectricalEnergyMeasurementEventList : public ReadAttribute { +class ReadDemandResponseLoadControlGeneratedCommandList : public ReadAttribute { public: - ReadElectricalEnergyMeasurementEventList() - : ReadAttribute("event-list") + ReadDemandResponseLoadControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalEnergyMeasurementEventList() + ~ReadDemandResponseLoadControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement EventList read Error", error); + LogNSError("DemandResponseLoadControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79618,25 +80076,25 @@ class ReadElectricalEnergyMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeElectricalEnergyMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalEnergyMeasurementEventList() + ~SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79647,10 +80105,10 @@ class SubscribeAttributeElectricalEnergyMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.EventList response %@", [value description]); + NSLog(@"DemandResponseLoadControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79664,36 +80122,37 @@ class SubscribeAttributeElectricalEnergyMeasurementEventList : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadElectricalEnergyMeasurementAttributeList : public ReadAttribute { +class ReadDemandResponseLoadControlAcceptedCommandList : public ReadAttribute { public: - ReadElectricalEnergyMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadDemandResponseLoadControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalEnergyMeasurementAttributeList() + ~ReadDemandResponseLoadControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement AttributeList read Error", error); + LogNSError("DemandResponseLoadControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79702,25 +80161,25 @@ class ReadElectricalEnergyMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeElectricalEnergyMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalEnergyMeasurementAttributeList() + ~SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79731,10 +80190,10 @@ class SubscribeAttributeElectricalEnergyMeasurementAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.AttributeList response %@", [value description]); + NSLog(@"DemandResponseLoadControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79747,35 +80206,38 @@ class SubscribeAttributeElectricalEnergyMeasurementAttributeList : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadElectricalEnergyMeasurementFeatureMap : public ReadAttribute { +class ReadDemandResponseLoadControlEventList : public ReadAttribute { public: - ReadElectricalEnergyMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadDemandResponseLoadControlEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalEnergyMeasurementFeatureMap() + ~ReadDemandResponseLoadControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement FeatureMap read Error", error); + LogNSError("DemandResponseLoadControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79784,25 +80246,25 @@ class ReadElectricalEnergyMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeElectricalEnergyMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDemandResponseLoadControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalEnergyMeasurementFeatureMap() + ~SubscribeAttributeDemandResponseLoadControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79813,10 +80275,10 @@ class SubscribeAttributeElectricalEnergyMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -79829,35 +80291,38 @@ class SubscribeAttributeElectricalEnergyMeasurementFeatureMap : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadElectricalEnergyMeasurementClusterRevision : public ReadAttribute { +class ReadDemandResponseLoadControlAttributeList : public ReadAttribute { public: - ReadElectricalEnergyMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadDemandResponseLoadControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalEnergyMeasurementClusterRevision() + ~ReadDemandResponseLoadControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalEnergyMeasurement ClusterRevision read Error", error); + LogNSError("DemandResponseLoadControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -79866,25 +80331,25 @@ class ReadElectricalEnergyMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeElectricalEnergyMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalEnergyMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDemandResponseLoadControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalEnergyMeasurementClusterRevision() + ~SubscribeAttributeDemandResponseLoadControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalEnergyMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalEnergyMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalEnergyMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -79895,11 +80360,11 @@ class SubscribeAttributeElectricalEnergyMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalEnergyMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.AttributeList response %@", [value description]); + if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); @@ -79911,192 +80376,38 @@ class SubscribeAttributeElectricalEnergyMeasurementClusterRevision : public Subs } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster WaterHeaterManagement | 0x0094 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Boost | 0x00 | -| * CancelBoost | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * HeaterTypes | 0x0000 | -| * HeatDemand | 0x0001 | -| * TankVolume | 0x0002 | -| * EstimatedHeatRequired | 0x0003 | -| * TankPercentage | 0x0004 | -| * BoostState | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * BoostStarted | 0x0000 | -| * BoostEnded | 0x0001 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command Boost - */ -class WaterHeaterManagementBoost : public ClusterCommand { -public: - WaterHeaterManagementBoost() - : ClusterCommand("boost") - , mComplex_BoostInfo(&mRequest.boostInfo) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("BoostInfo", &mComplex_BoostInfo); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterManagement::Commands::Boost::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWaterHeaterManagementClusterBoostParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.boostInfo = [MTRWaterHeaterManagementClusterWaterHeaterBoostInfoStruct new]; - params.boostInfo.duration = [NSNumber numberWithUnsignedInt:mRequest.boostInfo.duration]; - if (mRequest.boostInfo.oneShot.HasValue()) { - params.boostInfo.oneShot = [NSNumber numberWithBool:mRequest.boostInfo.oneShot.Value()]; - } else { - params.boostInfo.oneShot = nil; - } - if (mRequest.boostInfo.emergencyBoost.HasValue()) { - params.boostInfo.emergencyBoost = [NSNumber numberWithBool:mRequest.boostInfo.emergencyBoost.Value()]; - } else { - params.boostInfo.emergencyBoost = nil; - } - if (mRequest.boostInfo.temporarySetpoint.HasValue()) { - params.boostInfo.temporarySetpoint = [NSNumber numberWithShort:mRequest.boostInfo.temporarySetpoint.Value()]; - } else { - params.boostInfo.temporarySetpoint = nil; - } - if (mRequest.boostInfo.targetPercentage.HasValue()) { - params.boostInfo.targetPercentage = [NSNumber numberWithUnsignedChar:mRequest.boostInfo.targetPercentage.Value()]; - } else { - params.boostInfo.targetPercentage = nil; - } - if (mRequest.boostInfo.targetReheat.HasValue()) { - params.boostInfo.targetReheat = [NSNumber numberWithUnsignedChar:mRequest.boostInfo.targetReheat.Value()]; - } else { - params.boostInfo.targetReheat = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster boostWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WaterHeaterManagement::Commands::Boost::Type mRequest; - TypedComplexArgument mComplex_BoostInfo; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelBoost - */ -class WaterHeaterManagementCancelBoost : public ClusterCommand { -public: - WaterHeaterManagementCancelBoost() - : ClusterCommand("cancel-boost") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterManagement::Commands::CancelBoost::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWaterHeaterManagementClusterCancelBoostParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelBoostWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute HeaterTypes + * Attribute FeatureMap */ -class ReadWaterHeaterManagementHeaterTypes : public ReadAttribute { +class ReadDemandResponseLoadControlFeatureMap : public ReadAttribute { public: - ReadWaterHeaterManagementHeaterTypes() - : ReadAttribute("heater-types") + ReadDemandResponseLoadControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWaterHeaterManagementHeaterTypes() + ~ReadDemandResponseLoadControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeaterTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHeaterTypesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.HeaterTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement HeaterTypes read Error", error); + LogNSError("DemandResponseLoadControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80105,25 +80416,25 @@ class ReadWaterHeaterManagementHeaterTypes : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementHeaterTypes : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementHeaterTypes() - : SubscribeAttribute("heater-types") + SubscribeAttributeDemandResponseLoadControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWaterHeaterManagementHeaterTypes() + ~SubscribeAttributeDemandResponseLoadControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeaterTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80134,10 +80445,10 @@ class SubscribeAttributeWaterHeaterManagementHeaterTypes : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHeaterTypesWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.HeaterTypes response %@", [value description]); + NSLog(@"DemandResponseLoadControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80154,34 +80465,34 @@ class SubscribeAttributeWaterHeaterManagementHeaterTypes : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute HeatDemand + * Attribute ClusterRevision */ -class ReadWaterHeaterManagementHeatDemand : public ReadAttribute { +class ReadDemandResponseLoadControlClusterRevision : public ReadAttribute { public: - ReadWaterHeaterManagementHeatDemand() - : ReadAttribute("heat-demand") + ReadDemandResponseLoadControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWaterHeaterManagementHeatDemand() + ~ReadDemandResponseLoadControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeatDemand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHeatDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.HeatDemand response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DemandResponseLoadControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement HeatDemand read Error", error); + LogNSError("DemandResponseLoadControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80190,25 +80501,25 @@ class ReadWaterHeaterManagementHeatDemand : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementHeatDemand : public SubscribeAttribute { +class SubscribeAttributeDemandResponseLoadControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementHeatDemand() - : SubscribeAttribute("heat-demand") + SubscribeAttributeDemandResponseLoadControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWaterHeaterManagementHeatDemand() + ~SubscribeAttributeDemandResponseLoadControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::HeatDemand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80219,10 +80530,10 @@ class SubscribeAttributeWaterHeaterManagementHeatDemand : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHeatDemandWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.HeatDemand response %@", [value description]); + NSLog(@"DemandResponseLoadControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80235,208 +80546,248 @@ class SubscribeAttributeWaterHeaterManagementHeatDemand : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Messages | 0x0097 | +|------------------------------------------------------------------------------| +| Commands: | | +| * PresentMessagesRequest | 0x00 | +| * CancelMessagesRequest | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Messages | 0x0000 | +| * ActiveMessageIDs | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * MessageQueued | 0x0000 | +| * MessagePresented | 0x0001 | +| * MessageComplete | 0x0002 | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute TankVolume + * Command PresentMessagesRequest */ -class ReadWaterHeaterManagementTankVolume : public ReadAttribute { +class MessagesPresentMessagesRequest : public ClusterCommand { public: - ReadWaterHeaterManagementTankVolume() - : ReadAttribute("tank-volume") - { - } - - ~ReadWaterHeaterManagementTankVolume() + MessagesPresentMessagesRequest() + : ClusterCommand("present-messages-request") + , mComplex_Responses(&mRequest.responses) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("MessageID", &mRequest.messageID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Priority", 0, UINT8_MAX, &mRequest.priority); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MessageControl", 0, UINT8_MAX, &mRequest.messageControl); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Duration", 0, UINT64_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("MessageText", &mRequest.messageText); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Responses", &mComplex_Responses); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankVolume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTankVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.TankVolume response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterManagement TankVolume read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWaterHeaterManagementTankVolume : public SubscribeAttribute { -public: - SubscribeAttributeWaterHeaterManagementTankVolume() - : SubscribeAttribute("tank-volume") - { - } - - ~SubscribeAttributeWaterHeaterManagementTankVolume() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Messages::Commands::PresentMessagesRequest::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankVolume::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMessagesClusterPresentMessagesRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.messageID = [NSData dataWithBytes:mRequest.messageID.data() length:mRequest.messageID.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.priority = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.priority)]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.messageControl = [NSNumber numberWithUnsignedChar:mRequest.messageControl.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.startTime.IsNull()) { + params.startTime = nil; + } else { + params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.duration.IsNull()) { + params.duration = nil; + } else { + params.duration = [NSNumber numberWithUnsignedLongLong:mRequest.duration.Value()]; } - [cluster subscribeAttributeTankVolumeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.TankVolume response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.messageText = [[NSString alloc] initWithBytes:mRequest.messageText.data() length:mRequest.messageText.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.responses.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.responses.Value()) { + MTRMessagesClusterMessageResponseOptionStruct * newElement_1; + newElement_1 = [MTRMessagesClusterMessageResponseOptionStruct new]; + if (entry_1.messageResponseID.HasValue()) { + newElement_1.messageResponseID = [NSNumber numberWithUnsignedInt:entry_1.messageResponseID.Value()]; + } else { + newElement_1.messageResponseID = nil; + } + if (entry_1.label.HasValue()) { + newElement_1.label = [[NSString alloc] initWithBytes:entry_1.label.Value().data() length:entry_1.label.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.label = nil; + } + [array_1 addObject:newElement_1]; } - SetCommandExitStatus(error); - }]; - + params.responses = array_1; + } + } else { + params.responses = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster presentMessagesRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Messages::Commands::PresentMessagesRequest::Type mRequest; + TypedComplexArgument>> mComplex_Responses; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute EstimatedHeatRequired + * Command CancelMessagesRequest */ -class ReadWaterHeaterManagementEstimatedHeatRequired : public ReadAttribute { +class MessagesCancelMessagesRequest : public ClusterCommand { public: - ReadWaterHeaterManagementEstimatedHeatRequired() - : ReadAttribute("estimated-heat-required") - { - } - - ~ReadWaterHeaterManagementEstimatedHeatRequired() + MessagesCancelMessagesRequest() + : ClusterCommand("cancel-messages-request") + , mComplex_MessageIDs(&mRequest.messageIDs) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("MessageIDs", &mComplex_MessageIDs); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EstimatedHeatRequired::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Messages::Commands::CancelMessagesRequest::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEstimatedHeatRequiredWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.EstimatedHeatRequired response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterManagement EstimatedHeatRequired read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMessagesClusterCancelMessagesRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.messageIDs) { + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired : public SubscribeAttribute { -public: - SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired() - : SubscribeAttribute("estimated-heat-required") - { - } - - ~SubscribeAttributeWaterHeaterManagementEstimatedHeatRequired() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EstimatedHeatRequired::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + params.messageIDs = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster cancelMessagesRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEstimatedHeatRequiredWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.EstimatedHeatRequired response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Messages::Commands::CancelMessagesRequest::Type mRequest; + TypedComplexArgument> mComplex_MessageIDs; }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute TankPercentage + * Attribute Messages */ -class ReadWaterHeaterManagementTankPercentage : public ReadAttribute { +class ReadMessagesMessages : public ReadAttribute { public: - ReadWaterHeaterManagementTankPercentage() - : ReadAttribute("tank-percentage") + ReadMessagesMessages() + : ReadAttribute("messages") { } - ~ReadWaterHeaterManagementTankPercentage() + ~ReadMessagesMessages() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::Messages::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTankPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.TankPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMessagesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Messages.Messages response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement TankPercentage read Error", error); + LogNSError("Messages Messages read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80445,25 +80796,25 @@ class ReadWaterHeaterManagementTankPercentage : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementTankPercentage : public SubscribeAttribute { +class SubscribeAttributeMessagesMessages : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementTankPercentage() - : SubscribeAttribute("tank-percentage") + SubscribeAttributeMessagesMessages() + : SubscribeAttribute("messages") { } - ~SubscribeAttributeWaterHeaterManagementTankPercentage() + ~SubscribeAttributeMessagesMessages() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::TankPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::Messages::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80474,10 +80825,10 @@ class SubscribeAttributeWaterHeaterManagementTankPercentage : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTankPercentageWithParams:params + [cluster subscribeAttributeMessagesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.TankPercentage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Messages.Messages response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80494,34 +80845,34 @@ class SubscribeAttributeWaterHeaterManagementTankPercentage : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute BoostState + * Attribute ActiveMessageIDs */ -class ReadWaterHeaterManagementBoostState : public ReadAttribute { +class ReadMessagesActiveMessageIDs : public ReadAttribute { public: - ReadWaterHeaterManagementBoostState() - : ReadAttribute("boost-state") + ReadMessagesActiveMessageIDs() + : ReadAttribute("active-message-ids") { } - ~ReadWaterHeaterManagementBoostState() + ~ReadMessagesActiveMessageIDs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::BoostState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::ActiveMessageIDs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBoostStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.BoostState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveMessageIDsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Messages.ActiveMessageIDs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement BoostState read Error", error); + LogNSError("Messages ActiveMessageIDs read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80530,25 +80881,25 @@ class ReadWaterHeaterManagementBoostState : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementBoostState : public SubscribeAttribute { +class SubscribeAttributeMessagesActiveMessageIDs : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementBoostState() - : SubscribeAttribute("boost-state") + SubscribeAttributeMessagesActiveMessageIDs() + : SubscribeAttribute("active-message-ids") { } - ~SubscribeAttributeWaterHeaterManagementBoostState() + ~SubscribeAttributeMessagesActiveMessageIDs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::BoostState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::ActiveMessageIDs::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80559,10 +80910,10 @@ class SubscribeAttributeWaterHeaterManagementBoostState : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBoostStateWithParams:params + [cluster subscribeAttributeActiveMessageIDsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.BoostState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Messages.ActiveMessageIDs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80581,32 +80932,32 @@ class SubscribeAttributeWaterHeaterManagementBoostState : public SubscribeAttrib /* * Attribute GeneratedCommandList */ -class ReadWaterHeaterManagementGeneratedCommandList : public ReadAttribute { +class ReadMessagesGeneratedCommandList : public ReadAttribute { public: - ReadWaterHeaterManagementGeneratedCommandList() + ReadMessagesGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadWaterHeaterManagementGeneratedCommandList() + ~ReadMessagesGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"Messages.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement GeneratedCommandList read Error", error); + LogNSError("Messages GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80615,25 +80966,25 @@ class ReadWaterHeaterManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMessagesGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementGeneratedCommandList() + SubscribeAttributeMessagesGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWaterHeaterManagementGeneratedCommandList() + ~SubscribeAttributeMessagesGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80647,7 +80998,7 @@ class SubscribeAttributeWaterHeaterManagementGeneratedCommandList : public Subsc [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.GeneratedCommandList response %@", [value description]); + NSLog(@"Messages.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80666,32 +81017,32 @@ class SubscribeAttributeWaterHeaterManagementGeneratedCommandList : public Subsc /* * Attribute AcceptedCommandList */ -class ReadWaterHeaterManagementAcceptedCommandList : public ReadAttribute { +class ReadMessagesAcceptedCommandList : public ReadAttribute { public: - ReadWaterHeaterManagementAcceptedCommandList() + ReadMessagesAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadWaterHeaterManagementAcceptedCommandList() + ~ReadMessagesAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"Messages.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement AcceptedCommandList read Error", error); + LogNSError("Messages AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80700,25 +81051,25 @@ class ReadWaterHeaterManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMessagesAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementAcceptedCommandList() + SubscribeAttributeMessagesAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWaterHeaterManagementAcceptedCommandList() + ~SubscribeAttributeMessagesAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80732,7 +81083,7 @@ class SubscribeAttributeWaterHeaterManagementAcceptedCommandList : public Subscr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"Messages.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80751,32 +81102,32 @@ class SubscribeAttributeWaterHeaterManagementAcceptedCommandList : public Subscr /* * Attribute EventList */ -class ReadWaterHeaterManagementEventList : public ReadAttribute { +class ReadMessagesEventList : public ReadAttribute { public: - ReadWaterHeaterManagementEventList() + ReadMessagesEventList() : ReadAttribute("event-list") { } - ~ReadWaterHeaterManagementEventList() + ~ReadMessagesEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.EventList response %@", [value description]); + NSLog(@"Messages.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement EventList read Error", error); + LogNSError("Messages EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80785,25 +81136,25 @@ class ReadWaterHeaterManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementEventList : public SubscribeAttribute { +class SubscribeAttributeMessagesEventList : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementEventList() + SubscribeAttributeMessagesEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWaterHeaterManagementEventList() + ~SubscribeAttributeMessagesEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80817,7 +81168,7 @@ class SubscribeAttributeWaterHeaterManagementEventList : public SubscribeAttribu [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.EventList response %@", [value description]); + NSLog(@"Messages.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80836,32 +81187,32 @@ class SubscribeAttributeWaterHeaterManagementEventList : public SubscribeAttribu /* * Attribute AttributeList */ -class ReadWaterHeaterManagementAttributeList : public ReadAttribute { +class ReadMessagesAttributeList : public ReadAttribute { public: - ReadWaterHeaterManagementAttributeList() + ReadMessagesAttributeList() : ReadAttribute("attribute-list") { } - ~ReadWaterHeaterManagementAttributeList() + ~ReadMessagesAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.AttributeList response %@", [value description]); + NSLog(@"Messages.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement AttributeList read Error", error); + LogNSError("Messages AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80870,25 +81221,25 @@ class ReadWaterHeaterManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeMessagesAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementAttributeList() + SubscribeAttributeMessagesAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWaterHeaterManagementAttributeList() + ~SubscribeAttributeMessagesAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80902,7 +81253,7 @@ class SubscribeAttributeWaterHeaterManagementAttributeList : public SubscribeAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.AttributeList response %@", [value description]); + NSLog(@"Messages.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -80921,32 +81272,32 @@ class SubscribeAttributeWaterHeaterManagementAttributeList : public SubscribeAtt /* * Attribute FeatureMap */ -class ReadWaterHeaterManagementFeatureMap : public ReadAttribute { +class ReadMessagesFeatureMap : public ReadAttribute { public: - ReadWaterHeaterManagementFeatureMap() + ReadMessagesFeatureMap() : ReadAttribute("feature-map") { } - ~ReadWaterHeaterManagementFeatureMap() + ~ReadMessagesFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.FeatureMap response %@", [value description]); + NSLog(@"Messages.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement FeatureMap read Error", error); + LogNSError("Messages FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -80955,25 +81306,25 @@ class ReadWaterHeaterManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMessagesFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementFeatureMap() + SubscribeAttributeMessagesFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWaterHeaterManagementFeatureMap() + ~SubscribeAttributeMessagesFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -80987,7 +81338,7 @@ class SubscribeAttributeWaterHeaterManagementFeatureMap : public SubscribeAttrib [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.FeatureMap response %@", [value description]); + NSLog(@"Messages.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81006,32 +81357,32 @@ class SubscribeAttributeWaterHeaterManagementFeatureMap : public SubscribeAttrib /* * Attribute ClusterRevision */ -class ReadWaterHeaterManagementClusterRevision : public ReadAttribute { +class ReadMessagesClusterRevision : public ReadAttribute { public: - ReadWaterHeaterManagementClusterRevision() + ReadMessagesClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadWaterHeaterManagementClusterRevision() + ~ReadMessagesClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.ClusterRevision response %@", [value description]); + NSLog(@"Messages.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterManagement ClusterRevision read Error", error); + LogNSError("Messages ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81040,25 +81391,25 @@ class ReadWaterHeaterManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMessagesClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterManagementClusterRevision() + SubscribeAttributeMessagesClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWaterHeaterManagementClusterRevision() + ~SubscribeAttributeMessagesClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81072,7 +81423,7 @@ class SubscribeAttributeWaterHeaterManagementClusterRevision : public SubscribeA [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterManagement.ClusterRevision response %@", [value description]); + NSLog(@"Messages.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81089,24 +81440,27 @@ class SubscribeAttributeWaterHeaterManagementClusterRevision : public SubscribeA #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster DemandResponseLoadControl | 0x0096 | +| Cluster DeviceEnergyManagement | 0x0098 | |------------------------------------------------------------------------------| | Commands: | | -| * RegisterLoadControlProgramRequest | 0x00 | -| * UnregisterLoadControlProgramRequest | 0x01 | -| * AddLoadControlEventRequest | 0x02 | -| * RemoveLoadControlEventRequest | 0x03 | -| * ClearLoadControlEventsRequest | 0x04 | +| * PowerAdjustRequest | 0x00 | +| * CancelPowerAdjustRequest | 0x01 | +| * StartTimeAdjustRequest | 0x02 | +| * PauseRequest | 0x03 | +| * ResumeRequest | 0x04 | +| * ModifyForecastRequest | 0x05 | +| * RequestConstraintBasedForecast | 0x06 | +| * CancelRequest | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | -| * LoadControlPrograms | 0x0000 | -| * NumberOfLoadControlPrograms | 0x0001 | -| * Events | 0x0002 | -| * ActiveEvents | 0x0003 | -| * NumberOfEventsPerProgram | 0x0004 | -| * NumberOfTransitions | 0x0005 | -| * DefaultRandomStart | 0x0006 | -| * DefaultRandomDuration | 0x0007 | +| * ESAType | 0x0000 | +| * ESACanGenerate | 0x0001 | +| * ESAState | 0x0002 | +| * AbsMinPower | 0x0003 | +| * AbsMaxPower | 0x0004 | +| * PowerAdjustmentCapability | 0x0005 | +| * Forecast | 0x0006 | +| * OptOutState | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -81115,381 +81469,493 @@ class SubscribeAttributeWaterHeaterManagementClusterRevision : public SubscribeA | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * LoadControlEventStatusChange | 0x0000 | +| * PowerAdjustStart | 0x0000 | +| * PowerAdjustEnd | 0x0001 | +| * Paused | 0x0002 | +| * Resumed | 0x0003 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command RegisterLoadControlProgramRequest + * Command PowerAdjustRequest */ -class DemandResponseLoadControlRegisterLoadControlProgramRequest : public ClusterCommand { +class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { public: - DemandResponseLoadControlRegisterLoadControlProgramRequest() - : ClusterCommand("register-load-control-program-request") - , mComplex_LoadControlProgram(&mRequest.loadControlProgram) + DeviceEnergyManagementPowerAdjustRequest() + : ClusterCommand("power-adjust-request") { #if MTR_ENABLE_PROVISIONAL - AddArgument("LoadControlProgram", &mComplex_LoadControlProgram); + AddArgument("Power", INT64_MIN, INT64_MAX, &mRequest.power); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; - params.loadControlProgram.programID = [NSData dataWithBytes:mRequest.loadControlProgram.programID.data() length:mRequest.loadControlProgram.programID.size()]; - params.loadControlProgram.name = [[NSString alloc] initWithBytes:mRequest.loadControlProgram.name.data() length:mRequest.loadControlProgram.name.size() encoding:NSUTF8StringEncoding]; - if (mRequest.loadControlProgram.enrollmentGroup.IsNull()) { - params.loadControlProgram.enrollmentGroup = nil; - } else { - params.loadControlProgram.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.enrollmentGroup.Value()]; - } - if (mRequest.loadControlProgram.randomStartMinutes.IsNull()) { - params.loadControlProgram.randomStartMinutes = nil; - } else { - params.loadControlProgram.randomStartMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomStartMinutes.Value()]; - } - if (mRequest.loadControlProgram.randomDurationMinutes.IsNull()) { - params.loadControlProgram.randomDurationMinutes = nil; - } else { - params.loadControlProgram.randomDurationMinutes = [NSNumber numberWithUnsignedChar:mRequest.loadControlProgram.randomDurationMinutes.Value()]; - } + params.power = [NSNumber numberWithLongLong:mRequest.power]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster registerLoadControlProgramRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster powerAdjustRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type mRequest; - TypedComplexArgument mComplex_LoadControlProgram; + chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command UnregisterLoadControlProgramRequest + * Command CancelPowerAdjustRequest */ -class DemandResponseLoadControlUnregisterLoadControlProgramRequest : public ClusterCommand { +class DeviceEnergyManagementCancelPowerAdjustRequest : public ClusterCommand { public: - DemandResponseLoadControlUnregisterLoadControlProgramRequest() - : ClusterCommand("unregister-load-control-program-request") + DeviceEnergyManagementCancelPowerAdjustRequest() + : ClusterCommand("cancel-power-adjust-request") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("LoadControlProgramID", &mRequest.loadControlProgramID); -#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.loadControlProgramID = [NSData dataWithBytes:mRequest.loadControlProgramID.data() length:mRequest.loadControlProgramID.size()]; -#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster unregisterLoadControlProgramRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster cancelPowerAdjustRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command AddLoadControlEventRequest + * Command StartTimeAdjustRequest */ -class DemandResponseLoadControlAddLoadControlEventRequest : public ClusterCommand { +class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { public: - DemandResponseLoadControlAddLoadControlEventRequest() - : ClusterCommand("add-load-control-event-request") - , mComplex_Event(&mRequest.event) + DeviceEnergyManagementStartTimeAdjustRequest() + : ClusterCommand("start-time-adjust-request") { #if MTR_ENABLE_PROVISIONAL - AddArgument("Event", &mComplex_Event); + AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; - params.event.eventID = [NSData dataWithBytes:mRequest.event.eventID.data() length:mRequest.event.eventID.size()]; - if (mRequest.event.programID.IsNull()) { - params.event.programID = nil; - } else { - params.event.programID = [NSData dataWithBytes:mRequest.event.programID.Value().data() length:mRequest.event.programID.Value().size()]; - } - params.event.control = [NSNumber numberWithUnsignedShort:mRequest.event.control.Raw()]; - params.event.deviceClass = [NSNumber numberWithUnsignedInt:mRequest.event.deviceClass.Raw()]; - if (mRequest.event.enrollmentGroup.HasValue()) { - params.event.enrollmentGroup = [NSNumber numberWithUnsignedChar:mRequest.event.enrollmentGroup.Value()]; - } else { - params.event.enrollmentGroup = nil; - } - params.event.criticality = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.event.criticality)]; - if (mRequest.event.startTime.IsNull()) { - params.event.startTime = nil; - } else { - params.event.startTime = [NSNumber numberWithUnsignedInt:mRequest.event.startTime.Value()]; + params.requestedStartTime = [NSNumber numberWithUnsignedInt:mRequest.requestedStartTime]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startTimeAdjustRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.event.transitions) { - MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct * newElement_1; - newElement_1 = [MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct new]; - newElement_1.duration = [NSNumber numberWithUnsignedShort:entry_1.duration]; - newElement_1.control = [NSNumber numberWithUnsignedShort:entry_1.control.Raw()]; - if (entry_1.temperatureControl.HasValue()) { - newElement_1.temperatureControl = [MTRDemandResponseLoadControlClusterTemperatureControlStruct new]; - if (entry_1.temperatureControl.Value().coolingTempOffset.HasValue()) { - if (entry_1.temperatureControl.Value().coolingTempOffset.Value().IsNull()) { - newElement_1.temperatureControl.coolingTempOffset = nil; - } else { - newElement_1.temperatureControl.coolingTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().coolingTempOffset.Value().Value()]; - } - } else { - newElement_1.temperatureControl.coolingTempOffset = nil; - } - if (entry_1.temperatureControl.Value().heatingtTempOffset.HasValue()) { - if (entry_1.temperatureControl.Value().heatingtTempOffset.Value().IsNull()) { - newElement_1.temperatureControl.heatingtTempOffset = nil; - } else { - newElement_1.temperatureControl.heatingtTempOffset = [NSNumber numberWithUnsignedShort:entry_1.temperatureControl.Value().heatingtTempOffset.Value().Value()]; - } - } else { - newElement_1.temperatureControl.heatingtTempOffset = nil; - } - if (entry_1.temperatureControl.Value().coolingTempSetpoint.HasValue()) { - if (entry_1.temperatureControl.Value().coolingTempSetpoint.Value().IsNull()) { - newElement_1.temperatureControl.coolingTempSetpoint = nil; - } else { - newElement_1.temperatureControl.coolingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().coolingTempSetpoint.Value().Value()]; - } - } else { - newElement_1.temperatureControl.coolingTempSetpoint = nil; - } - if (entry_1.temperatureControl.Value().heatingTempSetpoint.HasValue()) { - if (entry_1.temperatureControl.Value().heatingTempSetpoint.Value().IsNull()) { - newElement_1.temperatureControl.heatingTempSetpoint = nil; - } else { - newElement_1.temperatureControl.heatingTempSetpoint = [NSNumber numberWithShort:entry_1.temperatureControl.Value().heatingTempSetpoint.Value().Value()]; - } - } else { - newElement_1.temperatureControl.heatingTempSetpoint = nil; - } - } else { - newElement_1.temperatureControl = nil; - } - if (entry_1.averageLoadControl.HasValue()) { - newElement_1.averageLoadControl = [MTRDemandResponseLoadControlClusterAverageLoadControlStruct new]; - newElement_1.averageLoadControl.loadAdjustment = [NSNumber numberWithChar:entry_1.averageLoadControl.Value().loadAdjustment]; - } else { - newElement_1.averageLoadControl = nil; - } - if (entry_1.dutyCycleControl.HasValue()) { - newElement_1.dutyCycleControl = [MTRDemandResponseLoadControlClusterDutyCycleControlStruct new]; - newElement_1.dutyCycleControl.dutyCycle = [NSNumber numberWithUnsignedChar:entry_1.dutyCycleControl.Value().dutyCycle]; - } else { - newElement_1.dutyCycleControl = nil; - } - if (entry_1.powerSavingsControl.HasValue()) { - newElement_1.powerSavingsControl = [MTRDemandResponseLoadControlClusterPowerSavingsControlStruct new]; - newElement_1.powerSavingsControl.powerSavings = [NSNumber numberWithUnsignedChar:entry_1.powerSavingsControl.Value().powerSavings]; - } else { - newElement_1.powerSavingsControl = nil; - } - if (entry_1.heatingSourceControl.HasValue()) { - newElement_1.heatingSourceControl = [MTRDemandResponseLoadControlClusterHeatingSourceControlStruct new]; - newElement_1.heatingSourceControl.heatingSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.heatingSourceControl.Value().heatingSource)]; + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command PauseRequest + */ +class DeviceEnergyManagementPauseRequest : public ClusterCommand { +public: + DeviceEnergyManagementPauseRequest() + : ClusterCommand("pause-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResumeRequest + */ +class DeviceEnergyManagementResumeRequest : public ClusterCommand { +public: + DeviceEnergyManagementResumeRequest() + : ClusterCommand("resume-request") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resumeRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ModifyForecastRequest + */ +class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { +public: + DeviceEnergyManagementModifyForecastRequest() + : ClusterCommand("modify-forecast-request") + , mComplex_SlotAdjustments(&mRequest.slotAdjustments) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ForecastID", 0, UINT32_MAX, &mRequest.forecastID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.forecastID = [NSNumber numberWithUnsignedInt:mRequest.forecastID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.slotAdjustments) { + MTRDeviceEnergyManagementClusterSlotAdjustmentStruct * newElement_0; + newElement_0 = [MTRDeviceEnergyManagementClusterSlotAdjustmentStruct new]; + newElement_0.slotIndex = [NSNumber numberWithUnsignedChar:entry_0.slotIndex]; + if (entry_0.nominalPower.HasValue()) { + newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower.Value()]; } else { - newElement_1.heatingSourceControl = nil; + newElement_0.nominalPower = nil; } - [array_1 addObject:newElement_1]; + newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; + [array_0 addObject:newElement_0]; } - params.event.transitions = array_1; + params.slotAdjustments = array_0; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addLoadControlEventRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster modifyForecastRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type mRequest; - TypedComplexArgument mComplex_Event; + chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type mRequest; + TypedComplexArgument> mComplex_SlotAdjustments; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command RemoveLoadControlEventRequest + * Command RequestConstraintBasedForecast */ -class DemandResponseLoadControlRemoveLoadControlEventRequest : public ClusterCommand { +class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterCommand { public: - DemandResponseLoadControlRemoveLoadControlEventRequest() - : ClusterCommand("remove-load-control-event-request") + DeviceEnergyManagementRequestConstraintBasedForecast() + : ClusterCommand("request-constraint-based-forecast") + , mComplex_Constraints(&mRequest.constraints) { #if MTR_ENABLE_PROVISIONAL - AddArgument("EventID", &mRequest.eventID); + AddArgument("Constraints", &mComplex_Constraints); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("CancelControl", 0, UINT16_MAX, &mRequest.cancelControl); + AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.eventID = [NSData dataWithBytes:mRequest.eventID.data() length:mRequest.eventID.size()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.constraints) { + MTRDeviceEnergyManagementClusterConstraintsStruct * newElement_0; + newElement_0 = [MTRDeviceEnergyManagementClusterConstraintsStruct new]; + newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime]; + newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; + if (entry_0.nominalPower.HasValue()) { + newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower.Value()]; + } else { + newElement_0.nominalPower = nil; + } + if (entry_0.maximumEnergy.HasValue()) { + newElement_0.maximumEnergy = [NSNumber numberWithLongLong:entry_0.maximumEnergy.Value()]; + } else { + newElement_0.maximumEnergy = nil; + } + if (entry_0.loadControl.HasValue()) { + newElement_0.loadControl = [NSNumber numberWithChar:entry_0.loadControl.Value()]; + } else { + newElement_0.loadControl = nil; + } + [array_0 addObject:newElement_0]; + } + params.constraints = array_0; + } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.cancelControl = [NSNumber numberWithUnsignedShort:mRequest.cancelControl.Raw()]; + params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster removeLoadControlEventRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster requestConstraintBasedForecastWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type mRequest; + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type mRequest; + TypedComplexArgument> mComplex_Constraints; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command ClearLoadControlEventsRequest + * Command CancelRequest */ -class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCommand { +class DeviceEnergyManagementCancelRequest : public ClusterCommand { public: - DemandResponseLoadControlClearLoadControlEventsRequest() - : ClusterCommand("clear-load-control-events-request") + DeviceEnergyManagementCancelRequest() + : ClusterCommand("cancel-request") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster clearLoadControlEventsRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster cancelRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -81502,34 +81968,34 @@ class DemandResponseLoadControlClearLoadControlEventsRequest : public ClusterCom #if MTR_ENABLE_PROVISIONAL /* - * Attribute LoadControlPrograms + * Attribute ESAType */ -class ReadDemandResponseLoadControlLoadControlPrograms : public ReadAttribute { +class ReadDeviceEnergyManagementESAType : public ReadAttribute { public: - ReadDemandResponseLoadControlLoadControlPrograms() - : ReadAttribute("load-control-programs") + ReadDeviceEnergyManagementESAType() + : ReadAttribute("esatype") { } - ~ReadDemandResponseLoadControlLoadControlPrograms() + ~ReadDeviceEnergyManagementESAType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLoadControlProgramsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.LoadControlPrograms response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESATypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl LoadControlPrograms read Error", error); + LogNSError("DeviceEnergyManagement ESAType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81538,25 +82004,25 @@ class ReadDemandResponseLoadControlLoadControlPrograms : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlLoadControlPrograms : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementESAType : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() - : SubscribeAttribute("load-control-programs") + SubscribeAttributeDeviceEnergyManagementESAType() + : SubscribeAttribute("esatype") { } - ~SubscribeAttributeDemandResponseLoadControlLoadControlPrograms() + ~SubscribeAttributeDeviceEnergyManagementESAType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::LoadControlPrograms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81567,10 +82033,10 @@ class SubscribeAttributeDemandResponseLoadControlLoadControlPrograms : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLoadControlProgramsWithParams:params + [cluster subscribeAttributeESATypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.LoadControlPrograms response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81587,34 +82053,34 @@ class SubscribeAttributeDemandResponseLoadControlLoadControlPrograms : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfLoadControlPrograms + * Attribute ESACanGenerate */ -class ReadDemandResponseLoadControlNumberOfLoadControlPrograms : public ReadAttribute { +class ReadDeviceEnergyManagementESACanGenerate : public ReadAttribute { public: - ReadDemandResponseLoadControlNumberOfLoadControlPrograms() - : ReadAttribute("number-of-load-control-programs") + ReadDeviceEnergyManagementESACanGenerate() + : ReadAttribute("esacan-generate") { } - ~ReadDemandResponseLoadControlNumberOfLoadControlPrograms() + ~ReadDeviceEnergyManagementESACanGenerate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfLoadControlProgramsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESACanGenerateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESACanGenerate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl NumberOfLoadControlPrograms read Error", error); + LogNSError("DeviceEnergyManagement ESACanGenerate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81623,25 +82089,25 @@ class ReadDemandResponseLoadControlNumberOfLoadControlPrograms : public ReadAttr } }; -class SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementESACanGenerate : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() - : SubscribeAttribute("number-of-load-control-programs") + SubscribeAttributeDeviceEnergyManagementESACanGenerate() + : SubscribeAttribute("esacan-generate") { } - ~SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms() + ~SubscribeAttributeDeviceEnergyManagementESACanGenerate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfLoadControlPrograms::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81652,10 +82118,10 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfLoadControlProgramsWithParams:params + [cluster subscribeAttributeESACanGenerateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfLoadControlPrograms response %@", [value description]); + NSLog(@"DeviceEnergyManagement.ESACanGenerate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81672,34 +82138,34 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfLoadControlPrograms : p #if MTR_ENABLE_PROVISIONAL /* - * Attribute Events + * Attribute ESAState */ -class ReadDemandResponseLoadControlEvents : public ReadAttribute { +class ReadDeviceEnergyManagementESAState : public ReadAttribute { public: - ReadDemandResponseLoadControlEvents() - : ReadAttribute("events") + ReadDeviceEnergyManagementESAState() + : ReadAttribute("esastate") { } - ~ReadDemandResponseLoadControlEvents() + ~ReadDeviceEnergyManagementESAState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.Events response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeESAStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl Events read Error", error); + LogNSError("DeviceEnergyManagement ESAState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81708,25 +82174,25 @@ class ReadDemandResponseLoadControlEvents : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlEvents : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementESAState : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlEvents() - : SubscribeAttribute("events") + SubscribeAttributeDeviceEnergyManagementESAState() + : SubscribeAttribute("esastate") { } - ~SubscribeAttributeDemandResponseLoadControlEvents() + ~SubscribeAttributeDeviceEnergyManagementESAState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::Events::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81737,10 +82203,10 @@ class SubscribeAttributeDemandResponseLoadControlEvents : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventsWithParams:params + [cluster subscribeAttributeESAStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.Events response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.ESAState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81757,34 +82223,34 @@ class SubscribeAttributeDemandResponseLoadControlEvents : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveEvents + * Attribute AbsMinPower */ -class ReadDemandResponseLoadControlActiveEvents : public ReadAttribute { +class ReadDeviceEnergyManagementAbsMinPower : public ReadAttribute { public: - ReadDemandResponseLoadControlActiveEvents() - : ReadAttribute("active-events") + ReadDeviceEnergyManagementAbsMinPower() + : ReadAttribute("abs-min-power") { } - ~ReadDemandResponseLoadControlActiveEvents() + ~ReadDeviceEnergyManagementAbsMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveEventsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.ActiveEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl ActiveEvents read Error", error); + LogNSError("DeviceEnergyManagement AbsMinPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81793,25 +82259,25 @@ class ReadDemandResponseLoadControlActiveEvents : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlActiveEvents : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementAbsMinPower : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlActiveEvents() - : SubscribeAttribute("active-events") + SubscribeAttributeDeviceEnergyManagementAbsMinPower() + : SubscribeAttribute("abs-min-power") { } - ~SubscribeAttributeDemandResponseLoadControlActiveEvents() + ~SubscribeAttributeDeviceEnergyManagementAbsMinPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ActiveEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81822,10 +82288,10 @@ class SubscribeAttributeDemandResponseLoadControlActiveEvents : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveEventsWithParams:params + [cluster subscribeAttributeAbsMinPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.ActiveEvents response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81842,34 +82308,34 @@ class SubscribeAttributeDemandResponseLoadControlActiveEvents : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfEventsPerProgram + * Attribute AbsMaxPower */ -class ReadDemandResponseLoadControlNumberOfEventsPerProgram : public ReadAttribute { +class ReadDeviceEnergyManagementAbsMaxPower : public ReadAttribute { public: - ReadDemandResponseLoadControlNumberOfEventsPerProgram() - : ReadAttribute("number-of-events-per-program") + ReadDeviceEnergyManagementAbsMaxPower() + : ReadAttribute("abs-max-power") { } - ~ReadDemandResponseLoadControlNumberOfEventsPerProgram() + ~ReadDeviceEnergyManagementAbsMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfEventsPerProgramWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.AbsMaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl NumberOfEventsPerProgram read Error", error); + LogNSError("DeviceEnergyManagement AbsMaxPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81878,25 +82344,25 @@ class ReadDemandResponseLoadControlNumberOfEventsPerProgram : public ReadAttribu } }; -class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementAbsMaxPower : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() - : SubscribeAttribute("number-of-events-per-program") + SubscribeAttributeDeviceEnergyManagementAbsMaxPower() + : SubscribeAttribute("abs-max-power") { } - ~SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram() + ~SubscribeAttributeDeviceEnergyManagementAbsMaxPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfEventsPerProgram::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81907,10 +82373,10 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfEventsPerProgramWithParams:params + [cluster subscribeAttributeAbsMaxPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfEventsPerProgram response %@", [value description]); + NSLog(@"DeviceEnergyManagement.AbsMaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -81927,34 +82393,34 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfEventsPerProgram : publ #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfTransitions + * Attribute PowerAdjustmentCapability */ -class ReadDemandResponseLoadControlNumberOfTransitions : public ReadAttribute { +class ReadDeviceEnergyManagementPowerAdjustmentCapability : public ReadAttribute { public: - ReadDemandResponseLoadControlNumberOfTransitions() - : ReadAttribute("number-of-transitions") + ReadDeviceEnergyManagementPowerAdjustmentCapability() + : ReadAttribute("power-adjustment-capability") { } - ~ReadDemandResponseLoadControlNumberOfTransitions() + ~ReadDeviceEnergyManagementPowerAdjustmentCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerAdjustmentCapabilityWithCompletion:^(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl NumberOfTransitions read Error", error); + LogNSError("DeviceEnergyManagement PowerAdjustmentCapability read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -81963,25 +82429,25 @@ class ReadDemandResponseLoadControlNumberOfTransitions : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() - : SubscribeAttribute("number-of-transitions") + SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() + : SubscribeAttribute("power-adjustment-capability") { } - ~SubscribeAttributeDemandResponseLoadControlNumberOfTransitions() + ~SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::NumberOfTransitions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -81992,10 +82458,10 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfTransitionsWithParams:params + [cluster subscribeAttributePowerAdjustmentCapabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.NumberOfTransitions response %@", [value description]); + reportHandler:^(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82012,102 +82478,61 @@ class SubscribeAttributeDemandResponseLoadControlNumberOfTransitions : public Su #if MTR_ENABLE_PROVISIONAL /* - * Attribute DefaultRandomStart + * Attribute Forecast */ -class ReadDemandResponseLoadControlDefaultRandomStart : public ReadAttribute { +class ReadDeviceEnergyManagementForecast : public ReadAttribute { public: - ReadDemandResponseLoadControlDefaultRandomStart() - : ReadAttribute("default-random-start") + ReadDeviceEnergyManagementForecast() + : ReadAttribute("forecast") { } - ~ReadDemandResponseLoadControlDefaultRandomStart() + ~ReadDeviceEnergyManagementForecast() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultRandomStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DefaultRandomStart response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeForecastWithCompletion:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.Forecast response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl DefaultRandomStart read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDemandResponseLoadControlDefaultRandomStart : public WriteAttribute { -public: - WriteDemandResponseLoadControlDefaultRandomStart() - : WriteAttribute("default-random-start") - { - AddArgument("attr-name", "default-random-start"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDemandResponseLoadControlDefaultRandomStart() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeDefaultRandomStartWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DemandResponseLoadControl DefaultRandomStart write Error", error); + LogNSError("DeviceEnergyManagement Forecast read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDemandResponseLoadControlDefaultRandomStart : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() - : SubscribeAttribute("default-random-start") + SubscribeAttributeDeviceEnergyManagementForecast() + : SubscribeAttribute("forecast") { } - ~SubscribeAttributeDemandResponseLoadControlDefaultRandomStart() + ~SubscribeAttributeDeviceEnergyManagementForecast() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82118,10 +82543,10 @@ class SubscribeAttributeDemandResponseLoadControlDefaultRandomStart : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultRandomStartWithParams:params + [cluster subscribeAttributeForecastWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DefaultRandomStart response %@", [value description]); + reportHandler:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.Forecast response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82138,102 +82563,61 @@ class SubscribeAttributeDemandResponseLoadControlDefaultRandomStart : public Sub #if MTR_ENABLE_PROVISIONAL /* - * Attribute DefaultRandomDuration + * Attribute OptOutState */ -class ReadDemandResponseLoadControlDefaultRandomDuration : public ReadAttribute { +class ReadDeviceEnergyManagementOptOutState : public ReadAttribute { public: - ReadDemandResponseLoadControlDefaultRandomDuration() - : ReadAttribute("default-random-duration") + ReadDeviceEnergyManagementOptOutState() + : ReadAttribute("opt-out-state") { } - ~ReadDemandResponseLoadControlDefaultRandomDuration() + ~ReadDeviceEnergyManagementOptOutState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultRandomDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DefaultRandomDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOptOutStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl DefaultRandomDuration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDemandResponseLoadControlDefaultRandomDuration : public WriteAttribute { -public: - WriteDemandResponseLoadControlDefaultRandomDuration() - : WriteAttribute("default-random-duration") - { - AddArgument("attr-name", "default-random-duration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDemandResponseLoadControlDefaultRandomDuration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeDefaultRandomDurationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DemandResponseLoadControl DefaultRandomDuration write Error", error); + LogNSError("DeviceEnergyManagement OptOutState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementOptOutState : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() - : SubscribeAttribute("default-random-duration") + SubscribeAttributeDeviceEnergyManagementOptOutState() + : SubscribeAttribute("opt-out-state") { } - ~SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration() + ~SubscribeAttributeDeviceEnergyManagementOptOutState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::DefaultRandomDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82244,10 +82628,10 @@ class SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultRandomDurationWithParams:params + [cluster subscribeAttributeOptOutStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.DefaultRandomDuration response %@", [value description]); + NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82266,32 +82650,32 @@ class SubscribeAttributeDemandResponseLoadControlDefaultRandomDuration : public /* * Attribute GeneratedCommandList */ -class ReadDemandResponseLoadControlGeneratedCommandList : public ReadAttribute { +class ReadDeviceEnergyManagementGeneratedCommandList : public ReadAttribute { public: - ReadDemandResponseLoadControlGeneratedCommandList() + ReadDeviceEnergyManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadDemandResponseLoadControlGeneratedCommandList() + ~ReadDeviceEnergyManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl GeneratedCommandList read Error", error); + LogNSError("DeviceEnergyManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82300,25 +82684,25 @@ class ReadDemandResponseLoadControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() + SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDemandResponseLoadControlGeneratedCommandList() + ~SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82332,7 +82716,7 @@ class SubscribeAttributeDemandResponseLoadControlGeneratedCommandList : public S [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82351,32 +82735,32 @@ class SubscribeAttributeDemandResponseLoadControlGeneratedCommandList : public S /* * Attribute AcceptedCommandList */ -class ReadDemandResponseLoadControlAcceptedCommandList : public ReadAttribute { +class ReadDeviceEnergyManagementAcceptedCommandList : public ReadAttribute { public: - ReadDemandResponseLoadControlAcceptedCommandList() + ReadDeviceEnergyManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadDemandResponseLoadControlAcceptedCommandList() + ~ReadDeviceEnergyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl AcceptedCommandList read Error", error); + LogNSError("DeviceEnergyManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82385,25 +82769,25 @@ class ReadDemandResponseLoadControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() + SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDemandResponseLoadControlAcceptedCommandList() + ~SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82417,7 +82801,7 @@ class SubscribeAttributeDemandResponseLoadControlAcceptedCommandList : public Su [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82436,32 +82820,32 @@ class SubscribeAttributeDemandResponseLoadControlAcceptedCommandList : public Su /* * Attribute EventList */ -class ReadDemandResponseLoadControlEventList : public ReadAttribute { +class ReadDeviceEnergyManagementEventList : public ReadAttribute { public: - ReadDemandResponseLoadControlEventList() + ReadDeviceEnergyManagementEventList() : ReadAttribute("event-list") { } - ~ReadDemandResponseLoadControlEventList() + ~ReadDeviceEnergyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.EventList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl EventList read Error", error); + LogNSError("DeviceEnergyManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82470,25 +82854,25 @@ class ReadDemandResponseLoadControlEventList : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlEventList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlEventList() + SubscribeAttributeDeviceEnergyManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDemandResponseLoadControlEventList() + ~SubscribeAttributeDeviceEnergyManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82502,7 +82886,7 @@ class SubscribeAttributeDemandResponseLoadControlEventList : public SubscribeAtt [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.EventList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82521,32 +82905,32 @@ class SubscribeAttributeDemandResponseLoadControlEventList : public SubscribeAtt /* * Attribute AttributeList */ -class ReadDemandResponseLoadControlAttributeList : public ReadAttribute { +class ReadDeviceEnergyManagementAttributeList : public ReadAttribute { public: - ReadDemandResponseLoadControlAttributeList() + ReadDeviceEnergyManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadDemandResponseLoadControlAttributeList() + ~ReadDeviceEnergyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.AttributeList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl AttributeList read Error", error); + LogNSError("DeviceEnergyManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82555,25 +82939,25 @@ class ReadDemandResponseLoadControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlAttributeList() + SubscribeAttributeDeviceEnergyManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDemandResponseLoadControlAttributeList() + ~SubscribeAttributeDeviceEnergyManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82587,7 +82971,7 @@ class SubscribeAttributeDemandResponseLoadControlAttributeList : public Subscrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.AttributeList response %@", [value description]); + NSLog(@"DeviceEnergyManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82606,32 +82990,32 @@ class SubscribeAttributeDemandResponseLoadControlAttributeList : public Subscrib /* * Attribute FeatureMap */ -class ReadDemandResponseLoadControlFeatureMap : public ReadAttribute { +class ReadDeviceEnergyManagementFeatureMap : public ReadAttribute { public: - ReadDemandResponseLoadControlFeatureMap() + ReadDeviceEnergyManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadDemandResponseLoadControlFeatureMap() + ~ReadDeviceEnergyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.FeatureMap response %@", [value description]); + NSLog(@"DeviceEnergyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl FeatureMap read Error", error); + LogNSError("DeviceEnergyManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82640,25 +83024,25 @@ class ReadDemandResponseLoadControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlFeatureMap() + SubscribeAttributeDeviceEnergyManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDemandResponseLoadControlFeatureMap() + ~SubscribeAttributeDeviceEnergyManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82672,7 +83056,7 @@ class SubscribeAttributeDemandResponseLoadControlFeatureMap : public SubscribeAt [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.FeatureMap response %@", [value description]); + NSLog(@"DeviceEnergyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82691,32 +83075,32 @@ class SubscribeAttributeDemandResponseLoadControlFeatureMap : public SubscribeAt /* * Attribute ClusterRevision */ -class ReadDemandResponseLoadControlClusterRevision : public ReadAttribute { +class ReadDeviceEnergyManagementClusterRevision : public ReadAttribute { public: - ReadDemandResponseLoadControlClusterRevision() + ReadDeviceEnergyManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadDemandResponseLoadControlClusterRevision() + ~ReadDeviceEnergyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.ClusterRevision response %@", [value description]); + NSLog(@"DeviceEnergyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DemandResponseLoadControl ClusterRevision read Error", error); + LogNSError("DeviceEnergyManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -82725,25 +83109,25 @@ class ReadDemandResponseLoadControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDemandResponseLoadControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDemandResponseLoadControlClusterRevision() + SubscribeAttributeDeviceEnergyManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDemandResponseLoadControlClusterRevision() + ~SubscribeAttributeDeviceEnergyManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DemandResponseLoadControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DemandResponseLoadControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDemandResponseLoadControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -82757,7 +83141,7 @@ class SubscribeAttributeDemandResponseLoadControlClusterRevision : public Subscr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DemandResponseLoadControl.ClusterRevision response %@", [value description]); + NSLog(@"DeviceEnergyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -82774,15 +83158,41 @@ class SubscribeAttributeDemandResponseLoadControlClusterRevision : public Subscr #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster Messages | 0x0097 | +| Cluster EnergyEvse | 0x0099 | |------------------------------------------------------------------------------| | Commands: | | -| * PresentMessagesRequest | 0x00 | -| * CancelMessagesRequest | 0x01 | +| * Disable | 0x01 | +| * EnableCharging | 0x02 | +| * EnableDischarging | 0x03 | +| * StartDiagnostics | 0x04 | +| * SetTargets | 0x05 | +| * GetTargets | 0x06 | +| * ClearTargets | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | -| * Messages | 0x0000 | -| * ActiveMessageIDs | 0x0001 | +| * State | 0x0000 | +| * SupplyState | 0x0001 | +| * FaultState | 0x0002 | +| * ChargingEnabledUntil | 0x0003 | +| * DischargingEnabledUntil | 0x0004 | +| * CircuitCapacity | 0x0005 | +| * MinimumChargeCurrent | 0x0006 | +| * MaximumChargeCurrent | 0x0007 | +| * MaximumDischargeCurrent | 0x0008 | +| * UserMaximumChargeCurrent | 0x0009 | +| * RandomizationDelayWindow | 0x000A | +| * NextChargeStartTime | 0x0023 | +| * NextChargeTargetTime | 0x0024 | +| * NextChargeRequiredEnergy | 0x0025 | +| * NextChargeTargetSoC | 0x0026 | +| * ApproximateEVEfficiency | 0x0027 | +| * StateOfCharge | 0x0030 | +| * BatteryCapacity | 0x0031 | +| * VehicleID | 0x0032 | +| * SessionID | 0x0040 | +| * SessionDuration | 0x0041 | +| * SessionEnergyCharged | 0x0042 | +| * SessionEnergyDischarged | 0x0043 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -82791,192 +83201,417 @@ class SubscribeAttributeDemandResponseLoadControlClusterRevision : public Subscr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * MessageQueued | 0x0000 | -| * MessagePresented | 0x0001 | -| * MessageComplete | 0x0002 | +| * EVConnected | 0x0000 | +| * EVNotDetected | 0x0001 | +| * EnergyTransferStarted | 0x0002 | +| * EnergyTransferStopped | 0x0003 | +| * Fault | 0x0004 | +| * Rfid | 0x0005 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command PresentMessagesRequest + * Command Disable */ -class MessagesPresentMessagesRequest : public ClusterCommand { +class EnergyEvseDisable : public ClusterCommand { public: - MessagesPresentMessagesRequest() - : ClusterCommand("present-messages-request") - , mComplex_Responses(&mRequest.responses) + EnergyEvseDisable() + : ClusterCommand("disable") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("MessageID", &mRequest.messageID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Priority", 0, UINT8_MAX, &mRequest.priority); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MessageControl", 0, UINT8_MAX, &mRequest.messageControl); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::Disable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterDisableParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster disableWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); -#endif // MTR_ENABLE_PROVISIONAL +/* + * Command EnableCharging + */ +class EnergyEvseEnableCharging : public ClusterCommand { +public: + EnergyEvseEnableCharging() + : ClusterCommand("enable-charging") + { #if MTR_ENABLE_PROVISIONAL - AddArgument("Duration", 0, UINT64_MAX, &mRequest.duration); + AddArgument("ChargingEnabledUntil", 0, UINT32_MAX, &mRequest.chargingEnabledUntil); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("MessageText", &mRequest.messageText); + AddArgument("MinimumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.minimumChargeCurrent); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("Responses", &mComplex_Responses); + AddArgument("MaximumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumChargeCurrent); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Messages::Commands::PresentMessagesRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMessagesClusterPresentMessagesRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.messageID = [NSData dataWithBytes:mRequest.messageID.data() length:mRequest.messageID.size()]; + if (mRequest.chargingEnabledUntil.IsNull()) { + params.chargingEnabledUntil = nil; + } else { + params.chargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.chargingEnabledUntil.Value()]; + } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.priority = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.priority)]; + params.minimumChargeCurrent = [NSNumber numberWithLongLong:mRequest.minimumChargeCurrent]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.messageControl = [NSNumber numberWithUnsignedChar:mRequest.messageControl.Raw()]; + params.maximumChargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumChargeCurrent]; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.startTime.IsNull()) { - params.startTime = nil; - } else { - params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableChargingWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type mRequest; +}; + #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - if (mRequest.duration.IsNull()) { - params.duration = nil; - } else { - params.duration = [NSNumber numberWithUnsignedLongLong:mRequest.duration.Value()]; - } +/* + * Command EnableDischarging + */ +class EnergyEvseEnableDischarging : public ClusterCommand { +public: + EnergyEvseEnableDischarging() + : ClusterCommand("enable-discharging") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DischargingEnabledUntil", 0, UINT32_MAX, &mRequest.dischargingEnabledUntil); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.messageText = [[NSString alloc] initWithBytes:mRequest.messageText.data() length:mRequest.messageText.size() encoding:NSUTF8StringEncoding]; + AddArgument("MaximumDischargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumDischargeCurrent); #endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.responses.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.responses.Value()) { - MTRMessagesClusterMessageResponseOptionStruct * newElement_1; - newElement_1 = [MTRMessagesClusterMessageResponseOptionStruct new]; - if (entry_1.messageResponseID.HasValue()) { - newElement_1.messageResponseID = [NSNumber numberWithUnsignedInt:entry_1.messageResponseID.Value()]; - } else { - newElement_1.messageResponseID = nil; - } - if (entry_1.label.HasValue()) { - newElement_1.label = [[NSString alloc] initWithBytes:entry_1.label.Value().data() length:entry_1.label.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_1.label = nil; - } - [array_1 addObject:newElement_1]; - } - params.responses = array_1; - } + if (mRequest.dischargingEnabledUntil.IsNull()) { + params.dischargingEnabledUntil = nil; } else { - params.responses = nil; + params.dischargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.dischargingEnabledUntil.Value()]; } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.maximumDischargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumDischargeCurrent]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster presentMessagesRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster enableDischargingWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Messages::Commands::PresentMessagesRequest::Type mRequest; - TypedComplexArgument>> mComplex_Responses; + chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command CancelMessagesRequest + * Command StartDiagnostics */ -class MessagesCancelMessagesRequest : public ClusterCommand { +class EnergyEvseStartDiagnostics : public ClusterCommand { public: - MessagesCancelMessagesRequest() - : ClusterCommand("cancel-messages-request") - , mComplex_MessageIDs(&mRequest.messageIDs) + EnergyEvseStartDiagnostics() + : ClusterCommand("start-diagnostics") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterStartDiagnosticsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startDiagnosticsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTargets + */ +class EnergyEvseSetTargets : public ClusterCommand { +public: + EnergyEvseSetTargets() + : ClusterCommand("set-targets") + , mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules) { #if MTR_ENABLE_PROVISIONAL - AddArgument("MessageIDs", &mComplex_MessageIDs); + AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Messages::Commands::CancelMessagesRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::SetTargets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMessagesClusterCancelMessagesRequestParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.messageIDs) { - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + for (auto & entry_0 : mRequest.chargingTargetSchedules) { + MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new]; + newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.chargingTargets) { + MTREnergyEVSEClusterChargingTargetStruct * newElement_2; + newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight]; + if (entry_2.targetSoC.HasValue()) { + newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()]; + } else { + newElement_2.targetSoC = nil; + } + if (entry_2.addedEnergy.HasValue()) { + newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()]; + } else { + newElement_2.addedEnergy = nil; + } + [array_2 addObject:newElement_2]; + } + newElement_0.chargingTargets = array_2; + } [array_0 addObject:newElement_0]; } - params.messageIDs = array_0; + params.chargingTargetSchedules = array_0; } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster cancelMessagesRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setTargetsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest; + TypedComplexArgument> mComplex_ChargingTargetSchedules; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetTargets + */ +class EnergyEvseGetTargets : public ClusterCommand { +public: + EnergyEvseGetTargets() + : ClusterCommand("get-targets") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::GetTargets::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getTargetsWithParams:params completion: + ^(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ClearTargets + */ +class EnergyEvseClearTargets : public ClusterCommand { +public: + EnergyEvseClearTargets() + : ClusterCommand("clear-targets") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEClusterClearTargetsParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearTargetsWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::Messages::Commands::CancelMessagesRequest::Type mRequest; - TypedComplexArgument> mComplex_MessageIDs; }; #endif // MTR_ENABLE_PROVISIONAL @@ -82984,34 +83619,34 @@ class MessagesCancelMessagesRequest : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Messages + * Attribute State */ -class ReadMessagesMessages : public ReadAttribute { +class ReadEnergyEvseState : public ReadAttribute { public: - ReadMessagesMessages() - : ReadAttribute("messages") + ReadEnergyEvseState() + : ReadAttribute("state") { } - ~ReadMessagesMessages() + ~ReadEnergyEvseState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::Messages::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMessagesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.Messages response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages Messages read Error", error); + LogNSError("EnergyEVSE State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83020,25 +83655,25 @@ class ReadMessagesMessages : public ReadAttribute { } }; -class SubscribeAttributeMessagesMessages : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseState : public SubscribeAttribute { public: - SubscribeAttributeMessagesMessages() - : SubscribeAttribute("messages") + SubscribeAttributeEnergyEvseState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeMessagesMessages() + ~SubscribeAttributeEnergyEvseState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::Messages::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83049,10 +83684,10 @@ class SubscribeAttributeMessagesMessages : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMessagesWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.Messages response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83069,34 +83704,34 @@ class SubscribeAttributeMessagesMessages : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveMessageIDs + * Attribute SupplyState */ -class ReadMessagesActiveMessageIDs : public ReadAttribute { +class ReadEnergyEvseSupplyState : public ReadAttribute { public: - ReadMessagesActiveMessageIDs() - : ReadAttribute("active-message-ids") + ReadEnergyEvseSupplyState() + : ReadAttribute("supply-state") { } - ~ReadMessagesActiveMessageIDs() + ~ReadEnergyEvseSupplyState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::ActiveMessageIDs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveMessageIDsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.ActiveMessageIDs response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupplyStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SupplyState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages ActiveMessageIDs read Error", error); + LogNSError("EnergyEVSE SupplyState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83105,25 +83740,25 @@ class ReadMessagesActiveMessageIDs : public ReadAttribute { } }; -class SubscribeAttributeMessagesActiveMessageIDs : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseSupplyState : public SubscribeAttribute { public: - SubscribeAttributeMessagesActiveMessageIDs() - : SubscribeAttribute("active-message-ids") + SubscribeAttributeEnergyEvseSupplyState() + : SubscribeAttribute("supply-state") { } - ~SubscribeAttributeMessagesActiveMessageIDs() + ~SubscribeAttributeEnergyEvseSupplyState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::ActiveMessageIDs::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83134,10 +83769,10 @@ class SubscribeAttributeMessagesActiveMessageIDs : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveMessageIDsWithParams:params + [cluster subscribeAttributeSupplyStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.ActiveMessageIDs response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SupplyState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83154,34 +83789,34 @@ class SubscribeAttributeMessagesActiveMessageIDs : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute FaultState */ -class ReadMessagesGeneratedCommandList : public ReadAttribute { +class ReadEnergyEvseFaultState : public ReadAttribute { public: - ReadMessagesGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadEnergyEvseFaultState() + : ReadAttribute("fault-state") { } - ~ReadMessagesGeneratedCommandList() + ~ReadEnergyEvseFaultState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFaultStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FaultState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages GeneratedCommandList read Error", error); + LogNSError("EnergyEVSE FaultState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83190,25 +83825,25 @@ class ReadMessagesGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMessagesGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseFaultState : public SubscribeAttribute { public: - SubscribeAttributeMessagesGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeEnergyEvseFaultState() + : SubscribeAttribute("fault-state") { } - ~SubscribeAttributeMessagesGeneratedCommandList() + ~SubscribeAttributeEnergyEvseFaultState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83219,10 +83854,10 @@ class SubscribeAttributeMessagesGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFaultStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FaultState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83239,34 +83874,34 @@ class SubscribeAttributeMessagesGeneratedCommandList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute ChargingEnabledUntil */ -class ReadMessagesAcceptedCommandList : public ReadAttribute { +class ReadEnergyEvseChargingEnabledUntil : public ReadAttribute { public: - ReadMessagesAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadEnergyEvseChargingEnabledUntil() + : ReadAttribute("charging-enabled-until") { } - ~ReadMessagesAcceptedCommandList() + ~ReadEnergyEvseChargingEnabledUntil() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ChargingEnabledUntil response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages AcceptedCommandList read Error", error); + LogNSError("EnergyEVSE ChargingEnabledUntil read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83275,25 +83910,25 @@ class ReadMessagesAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMessagesAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseChargingEnabledUntil : public SubscribeAttribute { public: - SubscribeAttributeMessagesAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeEnergyEvseChargingEnabledUntil() + : SubscribeAttribute("charging-enabled-until") { } - ~SubscribeAttributeMessagesAcceptedCommandList() + ~SubscribeAttributeEnergyEvseChargingEnabledUntil() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83304,10 +83939,10 @@ class SubscribeAttributeMessagesAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeChargingEnabledUntilWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ChargingEnabledUntil response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83324,34 +83959,34 @@ class SubscribeAttributeMessagesAcceptedCommandList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute DischargingEnabledUntil */ -class ReadMessagesEventList : public ReadAttribute { +class ReadEnergyEvseDischargingEnabledUntil : public ReadAttribute { public: - ReadMessagesEventList() - : ReadAttribute("event-list") + ReadEnergyEvseDischargingEnabledUntil() + : ReadAttribute("discharging-enabled-until") { } - ~ReadMessagesEventList() + ~ReadEnergyEvseDischargingEnabledUntil() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDischargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.DischargingEnabledUntil response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages EventList read Error", error); + LogNSError("EnergyEVSE DischargingEnabledUntil read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83360,25 +83995,25 @@ class ReadMessagesEventList : public ReadAttribute { } }; -class SubscribeAttributeMessagesEventList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseDischargingEnabledUntil : public SubscribeAttribute { public: - SubscribeAttributeMessagesEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeEnergyEvseDischargingEnabledUntil() + : SubscribeAttribute("discharging-enabled-until") { } - ~SubscribeAttributeMessagesEventList() + ~SubscribeAttributeEnergyEvseDischargingEnabledUntil() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83389,10 +84024,10 @@ class SubscribeAttributeMessagesEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeDischargingEnabledUntilWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.DischargingEnabledUntil response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83409,34 +84044,34 @@ class SubscribeAttributeMessagesEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute CircuitCapacity */ -class ReadMessagesAttributeList : public ReadAttribute { +class ReadEnergyEvseCircuitCapacity : public ReadAttribute { public: - ReadMessagesAttributeList() - : ReadAttribute("attribute-list") + ReadEnergyEvseCircuitCapacity() + : ReadAttribute("circuit-capacity") { } - ~ReadMessagesAttributeList() + ~ReadEnergyEvseCircuitCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCircuitCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.CircuitCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages AttributeList read Error", error); + LogNSError("EnergyEVSE CircuitCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83445,25 +84080,25 @@ class ReadMessagesAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMessagesAttributeList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseCircuitCapacity : public SubscribeAttribute { public: - SubscribeAttributeMessagesAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeEnergyEvseCircuitCapacity() + : SubscribeAttribute("circuit-capacity") { } - ~SubscribeAttributeMessagesAttributeList() + ~SubscribeAttributeEnergyEvseCircuitCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83474,10 +84109,10 @@ class SubscribeAttributeMessagesAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCircuitCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.CircuitCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83494,34 +84129,34 @@ class SubscribeAttributeMessagesAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute MinimumChargeCurrent */ -class ReadMessagesFeatureMap : public ReadAttribute { +class ReadEnergyEvseMinimumChargeCurrent : public ReadAttribute { public: - ReadMessagesFeatureMap() - : ReadAttribute("feature-map") + ReadEnergyEvseMinimumChargeCurrent() + : ReadAttribute("minimum-charge-current") { } - ~ReadMessagesFeatureMap() + ~ReadEnergyEvseMinimumChargeCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinimumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MinimumChargeCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages FeatureMap read Error", error); + LogNSError("EnergyEVSE MinimumChargeCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83530,25 +84165,25 @@ class ReadMessagesFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMessagesFeatureMap : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseMinimumChargeCurrent : public SubscribeAttribute { public: - SubscribeAttributeMessagesFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeEnergyEvseMinimumChargeCurrent() + : SubscribeAttribute("minimum-charge-current") { } - ~SubscribeAttributeMessagesFeatureMap() + ~SubscribeAttributeEnergyEvseMinimumChargeCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83559,10 +84194,10 @@ class SubscribeAttributeMessagesFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMinimumChargeCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.FeatureMap response %@", [value description]); + NSLog(@"EnergyEVSE.MinimumChargeCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83579,34 +84214,34 @@ class SubscribeAttributeMessagesFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute MaximumChargeCurrent */ -class ReadMessagesClusterRevision : public ReadAttribute { +class ReadEnergyEvseMaximumChargeCurrent : public ReadAttribute { public: - ReadMessagesClusterRevision() - : ReadAttribute("cluster-revision") + ReadEnergyEvseMaximumChargeCurrent() + : ReadAttribute("maximum-charge-current") { } - ~ReadMessagesClusterRevision() + ~ReadEnergyEvseMaximumChargeCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Messages::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumChargeCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Messages ClusterRevision read Error", error); + LogNSError("EnergyEVSE MaximumChargeCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -83615,25 +84250,25 @@ class ReadMessagesClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMessagesClusterRevision : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseMaximumChargeCurrent : public SubscribeAttribute { public: - SubscribeAttributeMessagesClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeEnergyEvseMaximumChargeCurrent() + : SubscribeAttribute("maximum-charge-current") { } - ~SubscribeAttributeMessagesClusterRevision() + ~SubscribeAttributeEnergyEvseMaximumChargeCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Messages::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Messages::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMessages alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -83644,10 +84279,10 @@ class SubscribeAttributeMessagesClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMaximumChargeCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Messages.ClusterRevision response %@", [value description]); + NSLog(@"EnergyEVSE.MaximumChargeCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -83660,566 +84295,375 @@ class SubscribeAttributeMessagesClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster DeviceEnergyManagement | 0x0098 | -|------------------------------------------------------------------------------| -| Commands: | | -| * PowerAdjustRequest | 0x00 | -| * CancelPowerAdjustRequest | 0x01 | -| * StartTimeAdjustRequest | 0x02 | -| * PauseRequest | 0x03 | -| * ResumeRequest | 0x04 | -| * ModifyForecastRequest | 0x05 | -| * RequestConstraintBasedForecast | 0x06 | -| * CancelRequest | 0x07 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ESAType | 0x0000 | -| * ESACanGenerate | 0x0001 | -| * ESAState | 0x0002 | -| * AbsMinPower | 0x0003 | -| * AbsMaxPower | 0x0004 | -| * PowerAdjustmentCapability | 0x0005 | -| * Forecast | 0x0006 | -| * OptOutState | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * PowerAdjustStart | 0x0000 | -| * PowerAdjustEnd | 0x0001 | -| * Paused | 0x0002 | -| * Resumed | 0x0003 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command PowerAdjustRequest + * Attribute MaximumDischargeCurrent */ -class DeviceEnergyManagementPowerAdjustRequest : public ClusterCommand { +class ReadEnergyEvseMaximumDischargeCurrent : public ReadAttribute { public: - DeviceEnergyManagementPowerAdjustRequest() - : ClusterCommand("power-adjust-request") + ReadEnergyEvseMaximumDischargeCurrent() + : ReadAttribute("maximum-discharge-current") + { + } + + ~ReadEnergyEvseMaximumDischargeCurrent() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Power", INT64_MIN, INT64_MAX, &mRequest.power); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.power = [NSNumber numberWithLongLong:mRequest.power]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster powerAdjustRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaximumDischargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumDischargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE MaximumDischargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelPowerAdjustRequest - */ -class DeviceEnergyManagementCancelPowerAdjustRequest : public ClusterCommand { +class SubscribeAttributeEnergyEvseMaximumDischargeCurrent : public SubscribeAttribute { public: - DeviceEnergyManagementCancelPowerAdjustRequest() - : ClusterCommand("cancel-power-adjust-request") + SubscribeAttributeEnergyEvseMaximumDischargeCurrent() + : SubscribeAttribute("maximum-discharge-current") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeEnergyEvseMaximumDischargeCurrent() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelPowerAdjustRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMaximumDischargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.MaximumDischargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + /* - * Command StartTimeAdjustRequest + * Attribute UserMaximumChargeCurrent */ -class DeviceEnergyManagementStartTimeAdjustRequest : public ClusterCommand { +class ReadEnergyEvseUserMaximumChargeCurrent : public ReadAttribute { public: - DeviceEnergyManagementStartTimeAdjustRequest() - : ClusterCommand("start-time-adjust-request") + ReadEnergyEvseUserMaximumChargeCurrent() + : ReadAttribute("user-maximum-charge-current") + { + } + + ~ReadEnergyEvseUserMaximumChargeCurrent() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("RequestedStartTime", 0, UINT32_MAX, &mRequest.requestedStartTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.requestedStartTime = [NSNumber numberWithUnsignedInt:mRequest.requestedStartTime]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startTimeAdjustRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.UserMaximumChargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE UserMaximumChargeCurrent read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command PauseRequest - */ -class DeviceEnergyManagementPauseRequest : public ClusterCommand { +class WriteEnergyEvseUserMaximumChargeCurrent : public WriteAttribute { public: - DeviceEnergyManagementPauseRequest() - : ClusterCommand("pause-request") + WriteEnergyEvseUserMaximumChargeCurrent() + : WriteAttribute("user-maximum-charge-current") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Duration", 0, UINT32_MAX, &mRequest.duration); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); + AddArgument("attr-name", "user-maximum-charge-current"); + AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); + WriteAttribute::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~WriteEnergyEvseUserMaximumChargeCurrent() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.duration = [NSNumber numberWithUnsignedInt:mRequest.duration]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithLongLong:mValue]; + + [cluster writeAttributeUserMaximumChargeCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE UserMaximumChargeCurrent write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type mRequest; + int64_t mValue; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResumeRequest - */ -class DeviceEnergyManagementResumeRequest : public ClusterCommand { +class SubscribeAttributeEnergyEvseUserMaximumChargeCurrent : public SubscribeAttribute { public: - DeviceEnergyManagementResumeRequest() - : ClusterCommand("resume-request") + SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() + : SubscribeAttribute("user-maximum-charge-current") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resumeRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUserMaximumChargeCurrentWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.UserMaximumChargeCurrent response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + /* - * Command ModifyForecastRequest + * Attribute RandomizationDelayWindow */ -class DeviceEnergyManagementModifyForecastRequest : public ClusterCommand { +class ReadEnergyEvseRandomizationDelayWindow : public ReadAttribute { public: - DeviceEnergyManagementModifyForecastRequest() - : ClusterCommand("modify-forecast-request") - , mComplex_SlotAdjustments(&mRequest.slotAdjustments) + ReadEnergyEvseRandomizationDelayWindow() + : ReadAttribute("randomization-delay-window") + { + } + + ~ReadEnergyEvseRandomizationDelayWindow() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ForecastID", 0, UINT32_MAX, &mRequest.forecastID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("SlotAdjustments", &mComplex_SlotAdjustments); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.forecastID = [NSNumber numberWithUnsignedInt:mRequest.forecastID]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.slotAdjustments) { - MTRDeviceEnergyManagementClusterSlotAdjustmentStruct * newElement_0; - newElement_0 = [MTRDeviceEnergyManagementClusterSlotAdjustmentStruct new]; - newElement_0.slotIndex = [NSNumber numberWithUnsignedChar:entry_0.slotIndex]; - if (entry_0.nominalPower.HasValue()) { - newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower.Value()]; - } else { - newElement_0.nominalPower = nil; - } - newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRandomizationDelayWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.RandomizationDelayWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("EnergyEVSE RandomizationDelayWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.slotAdjustments = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster modifyForecastRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type mRequest; - TypedComplexArgument> mComplex_SlotAdjustments; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command RequestConstraintBasedForecast - */ -class DeviceEnergyManagementRequestConstraintBasedForecast : public ClusterCommand { +class WriteEnergyEvseRandomizationDelayWindow : public WriteAttribute { public: - DeviceEnergyManagementRequestConstraintBasedForecast() - : ClusterCommand("request-constraint-based-forecast") - , mComplex_Constraints(&mRequest.constraints) + WriteEnergyEvseRandomizationDelayWindow() + : WriteAttribute("randomization-delay-window") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Constraints", &mComplex_Constraints); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Cause", 0, UINT8_MAX, &mRequest.cause); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); + AddArgument("attr-name", "randomization-delay-window"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~WriteEnergyEvseRandomizationDelayWindow() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.constraints) { - MTRDeviceEnergyManagementClusterConstraintsStruct * newElement_0; - newElement_0 = [MTRDeviceEnergyManagementClusterConstraintsStruct new]; - newElement_0.startTime = [NSNumber numberWithUnsignedInt:entry_0.startTime]; - newElement_0.duration = [NSNumber numberWithUnsignedInt:entry_0.duration]; - if (entry_0.nominalPower.HasValue()) { - newElement_0.nominalPower = [NSNumber numberWithLongLong:entry_0.nominalPower.Value()]; - } else { - newElement_0.nominalPower = nil; - } - if (entry_0.maximumEnergy.HasValue()) { - newElement_0.maximumEnergy = [NSNumber numberWithLongLong:entry_0.maximumEnergy.Value()]; - } else { - newElement_0.maximumEnergy = nil; - } - if (entry_0.loadControl.HasValue()) { - newElement_0.loadControl = [NSNumber numberWithChar:entry_0.loadControl.Value()]; - } else { - newElement_0.loadControl = nil; - } - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeRandomizationDelayWindowWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE RandomizationDelayWindow write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.constraints = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.cause = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.cause)]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster requestConstraintBasedForecastWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type mRequest; - TypedComplexArgument> mComplex_Constraints; + uint32_t mValue; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelRequest - */ -class DeviceEnergyManagementCancelRequest : public ClusterCommand { +class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAttribute { public: - DeviceEnergyManagementCancelRequest() - : ClusterCommand("cancel-request") + SubscribeAttributeEnergyEvseRandomizationDelayWindow() + : SubscribeAttribute("randomization-delay-window") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeEnergyEvseRandomizationDelayWindow() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagement::Commands::CancelRequest::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementClusterCancelRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeRandomizationDelayWindowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.RandomizationDelayWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute ESAType + * Attribute NextChargeStartTime */ -class ReadDeviceEnergyManagementESAType : public ReadAttribute { +class ReadEnergyEvseNextChargeStartTime : public ReadAttribute { public: - ReadDeviceEnergyManagementESAType() - : ReadAttribute("esatype") + ReadEnergyEvseNextChargeStartTime() + : ReadAttribute("next-charge-start-time") { } - ~ReadDeviceEnergyManagementESAType() + ~ReadEnergyEvseNextChargeStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeESATypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESAType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeStartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement ESAType read Error", error); + LogNSError("EnergyEVSE NextChargeStartTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84228,25 +84672,25 @@ class ReadDeviceEnergyManagementESAType : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementESAType : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseNextChargeStartTime : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementESAType() - : SubscribeAttribute("esatype") + SubscribeAttributeEnergyEvseNextChargeStartTime() + : SubscribeAttribute("next-charge-start-time") { } - ~SubscribeAttributeDeviceEnergyManagementESAType() + ~SubscribeAttributeEnergyEvseNextChargeStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84257,10 +84701,10 @@ class SubscribeAttributeDeviceEnergyManagementESAType : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeESATypeWithParams:params + [cluster subscribeAttributeNextChargeStartTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESAType response %@", [value description]); + NSLog(@"EnergyEVSE.NextChargeStartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84277,34 +84721,34 @@ class SubscribeAttributeDeviceEnergyManagementESAType : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ESACanGenerate + * Attribute NextChargeTargetTime */ -class ReadDeviceEnergyManagementESACanGenerate : public ReadAttribute { +class ReadEnergyEvseNextChargeTargetTime : public ReadAttribute { public: - ReadDeviceEnergyManagementESACanGenerate() - : ReadAttribute("esacan-generate") + ReadEnergyEvseNextChargeTargetTime() + : ReadAttribute("next-charge-target-time") { } - ~ReadDeviceEnergyManagementESACanGenerate() + ~ReadEnergyEvseNextChargeTargetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeESACanGenerateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESACanGenerate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeTargetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement ESACanGenerate read Error", error); + LogNSError("EnergyEVSE NextChargeTargetTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84313,25 +84757,25 @@ class ReadDeviceEnergyManagementESACanGenerate : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementESACanGenerate : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseNextChargeTargetTime : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementESACanGenerate() - : SubscribeAttribute("esacan-generate") + SubscribeAttributeEnergyEvseNextChargeTargetTime() + : SubscribeAttribute("next-charge-target-time") { } - ~SubscribeAttributeDeviceEnergyManagementESACanGenerate() + ~SubscribeAttributeEnergyEvseNextChargeTargetTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESACanGenerate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84342,10 +84786,10 @@ class SubscribeAttributeDeviceEnergyManagementESACanGenerate : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeESACanGenerateWithParams:params + [cluster subscribeAttributeNextChargeTargetTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESACanGenerate response %@", [value description]); + NSLog(@"EnergyEVSE.NextChargeTargetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84362,34 +84806,34 @@ class SubscribeAttributeDeviceEnergyManagementESACanGenerate : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute ESAState + * Attribute NextChargeRequiredEnergy */ -class ReadDeviceEnergyManagementESAState : public ReadAttribute { +class ReadEnergyEvseNextChargeRequiredEnergy : public ReadAttribute { public: - ReadDeviceEnergyManagementESAState() - : ReadAttribute("esastate") + ReadEnergyEvseNextChargeRequiredEnergy() + : ReadAttribute("next-charge-required-energy") { } - ~ReadDeviceEnergyManagementESAState() + ~ReadEnergyEvseNextChargeRequiredEnergy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeESAStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESAState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeRequiredEnergyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeRequiredEnergy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement ESAState read Error", error); + LogNSError("EnergyEVSE NextChargeRequiredEnergy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84398,25 +84842,25 @@ class ReadDeviceEnergyManagementESAState : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementESAState : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseNextChargeRequiredEnergy : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementESAState() - : SubscribeAttribute("esastate") + SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() + : SubscribeAttribute("next-charge-required-energy") { } - ~SubscribeAttributeDeviceEnergyManagementESAState() + ~SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ESAState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84427,10 +84871,10 @@ class SubscribeAttributeDeviceEnergyManagementESAState : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeESAStateWithParams:params + [cluster subscribeAttributeNextChargeRequiredEnergyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ESAState response %@", [value description]); + NSLog(@"EnergyEVSE.NextChargeRequiredEnergy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84447,34 +84891,34 @@ class SubscribeAttributeDeviceEnergyManagementESAState : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AbsMinPower + * Attribute NextChargeTargetSoC */ -class ReadDeviceEnergyManagementAbsMinPower : public ReadAttribute { +class ReadEnergyEvseNextChargeTargetSoC : public ReadAttribute { public: - ReadDeviceEnergyManagementAbsMinPower() - : ReadAttribute("abs-min-power") + ReadEnergyEvseNextChargeTargetSoC() + : ReadAttribute("next-charge-target-so-c") { } - ~ReadDeviceEnergyManagementAbsMinPower() + ~ReadEnergyEvseNextChargeTargetSoC() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AbsMinPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNextChargeTargetSoCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.NextChargeTargetSoC response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement AbsMinPower read Error", error); + LogNSError("EnergyEVSE NextChargeTargetSoC read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84483,25 +84927,25 @@ class ReadDeviceEnergyManagementAbsMinPower : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementAbsMinPower : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseNextChargeTargetSoC : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementAbsMinPower() - : SubscribeAttribute("abs-min-power") + SubscribeAttributeEnergyEvseNextChargeTargetSoC() + : SubscribeAttribute("next-charge-target-so-c") { } - ~SubscribeAttributeDeviceEnergyManagementAbsMinPower() + ~SubscribeAttributeEnergyEvseNextChargeTargetSoC() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMinPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84512,10 +84956,10 @@ class SubscribeAttributeDeviceEnergyManagementAbsMinPower : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinPowerWithParams:params + [cluster subscribeAttributeNextChargeTargetSoCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AbsMinPower response %@", [value description]); + NSLog(@"EnergyEVSE.NextChargeTargetSoC response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84532,34 +84976,34 @@ class SubscribeAttributeDeviceEnergyManagementAbsMinPower : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute AbsMaxPower + * Attribute ApproximateEVEfficiency */ -class ReadDeviceEnergyManagementAbsMaxPower : public ReadAttribute { +class ReadEnergyEvseApproximateEVEfficiency : public ReadAttribute { public: - ReadDeviceEnergyManagementAbsMaxPower() - : ReadAttribute("abs-max-power") + ReadEnergyEvseApproximateEVEfficiency() + : ReadAttribute("approximate-evefficiency") { } - ~ReadDeviceEnergyManagementAbsMaxPower() + ~ReadEnergyEvseApproximateEVEfficiency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AbsMaxPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApproximateEVEfficiencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ApproximateEVEfficiency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement AbsMaxPower read Error", error); + LogNSError("EnergyEVSE ApproximateEVEfficiency read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84568,25 +85012,69 @@ class ReadDeviceEnergyManagementAbsMaxPower : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementAbsMaxPower : public SubscribeAttribute { +class WriteEnergyEvseApproximateEVEfficiency : public WriteAttribute { public: - SubscribeAttributeDeviceEnergyManagementAbsMaxPower() - : SubscribeAttribute("abs-max-power") + WriteEnergyEvseApproximateEVEfficiency() + : WriteAttribute("approximate-evefficiency") { + AddArgument("attr-name", "approximate-evefficiency"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDeviceEnergyManagementAbsMaxPower() + ~WriteEnergyEvseApproximateEVEfficiency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AbsMaxPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } + + [cluster writeAttributeApproximateEVEfficiencyWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSE ApproximateEVEfficiency write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeEnergyEvseApproximateEVEfficiency : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseApproximateEVEfficiency() + : SubscribeAttribute("approximate-evefficiency") + { + } + + ~SubscribeAttributeEnergyEvseApproximateEVEfficiency() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84597,10 +85085,10 @@ class SubscribeAttributeDeviceEnergyManagementAbsMaxPower : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxPowerWithParams:params + [cluster subscribeAttributeApproximateEVEfficiencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AbsMaxPower response %@", [value description]); + NSLog(@"EnergyEVSE.ApproximateEVEfficiency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84617,34 +85105,34 @@ class SubscribeAttributeDeviceEnergyManagementAbsMaxPower : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute PowerAdjustmentCapability + * Attribute StateOfCharge */ -class ReadDeviceEnergyManagementPowerAdjustmentCapability : public ReadAttribute { +class ReadEnergyEvseStateOfCharge : public ReadAttribute { public: - ReadDeviceEnergyManagementPowerAdjustmentCapability() - : ReadAttribute("power-adjustment-capability") + ReadEnergyEvseStateOfCharge() + : ReadAttribute("state-of-charge") { } - ~ReadDeviceEnergyManagementPowerAdjustmentCapability() + ~ReadEnergyEvseStateOfCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerAdjustmentCapabilityWithCompletion:^(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStateOfChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.StateOfCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement PowerAdjustmentCapability read Error", error); + LogNSError("EnergyEVSE StateOfCharge read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84653,25 +85141,25 @@ class ReadDeviceEnergyManagementPowerAdjustmentCapability : public ReadAttribute } }; -class SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseStateOfCharge : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() - : SubscribeAttribute("power-adjustment-capability") + SubscribeAttributeEnergyEvseStateOfCharge() + : SubscribeAttribute("state-of-charge") { } - ~SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability() + ~SubscribeAttributeEnergyEvseStateOfCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::PowerAdjustmentCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84682,10 +85170,10 @@ class SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerAdjustmentCapabilityWithParams:params + [cluster subscribeAttributeStateOfChargeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRDeviceEnergyManagementClusterPowerAdjustCapabilityStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.PowerAdjustmentCapability response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.StateOfCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84702,34 +85190,34 @@ class SubscribeAttributeDeviceEnergyManagementPowerAdjustmentCapability : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute Forecast + * Attribute BatteryCapacity */ -class ReadDeviceEnergyManagementForecast : public ReadAttribute { +class ReadEnergyEvseBatteryCapacity : public ReadAttribute { public: - ReadDeviceEnergyManagementForecast() - : ReadAttribute("forecast") + ReadEnergyEvseBatteryCapacity() + : ReadAttribute("battery-capacity") { } - ~ReadDeviceEnergyManagementForecast() + ~ReadEnergyEvseBatteryCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeForecastWithCompletion:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.Forecast response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatteryCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.BatteryCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement Forecast read Error", error); + LogNSError("EnergyEVSE BatteryCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84738,25 +85226,25 @@ class ReadDeviceEnergyManagementForecast : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseBatteryCapacity : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementForecast() - : SubscribeAttribute("forecast") + SubscribeAttributeEnergyEvseBatteryCapacity() + : SubscribeAttribute("battery-capacity") { } - ~SubscribeAttributeDeviceEnergyManagementForecast() + ~SubscribeAttributeEnergyEvseBatteryCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::Forecast::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84767,10 +85255,10 @@ class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeForecastWithParams:params + [cluster subscribeAttributeBatteryCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRDeviceEnergyManagementClusterForecastStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.Forecast response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.BatteryCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84787,34 +85275,34 @@ class SubscribeAttributeDeviceEnergyManagementForecast : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute OptOutState + * Attribute VehicleID */ -class ReadDeviceEnergyManagementOptOutState : public ReadAttribute { +class ReadEnergyEvseVehicleID : public ReadAttribute { public: - ReadDeviceEnergyManagementOptOutState() - : ReadAttribute("opt-out-state") + ReadEnergyEvseVehicleID() + : ReadAttribute("vehicle-id") { } - ~ReadDeviceEnergyManagementOptOutState() + ~ReadEnergyEvseVehicleID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptOutStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVehicleIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.VehicleID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement OptOutState read Error", error); + LogNSError("EnergyEVSE VehicleID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84823,25 +85311,25 @@ class ReadDeviceEnergyManagementOptOutState : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementOptOutState : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseVehicleID : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementOptOutState() - : SubscribeAttribute("opt-out-state") + SubscribeAttributeEnergyEvseVehicleID() + : SubscribeAttribute("vehicle-id") { } - ~SubscribeAttributeDeviceEnergyManagementOptOutState() + ~SubscribeAttributeEnergyEvseVehicleID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::OptOutState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84852,10 +85340,10 @@ class SubscribeAttributeDeviceEnergyManagementOptOutState : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOptOutStateWithParams:params + [cluster subscribeAttributeVehicleIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.OptOutState response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.VehicleID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84872,34 +85360,34 @@ class SubscribeAttributeDeviceEnergyManagementOptOutState : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute SessionID */ -class ReadDeviceEnergyManagementGeneratedCommandList : public ReadAttribute { +class ReadEnergyEvseSessionID : public ReadAttribute { public: - ReadDeviceEnergyManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadEnergyEvseSessionID() + : ReadAttribute("session-id") { } - ~ReadDeviceEnergyManagementGeneratedCommandList() + ~ReadEnergyEvseSessionID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement GeneratedCommandList read Error", error); + LogNSError("EnergyEVSE SessionID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84908,25 +85396,25 @@ class ReadDeviceEnergyManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseSessionID : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeEnergyEvseSessionID() + : SubscribeAttribute("session-id") { } - ~SubscribeAttributeDeviceEnergyManagementGeneratedCommandList() + ~SubscribeAttributeEnergyEvseSessionID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -84937,10 +85425,10 @@ class SubscribeAttributeDeviceEnergyManagementGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSessionIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -84957,34 +85445,34 @@ class SubscribeAttributeDeviceEnergyManagementGeneratedCommandList : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute SessionDuration */ -class ReadDeviceEnergyManagementAcceptedCommandList : public ReadAttribute { +class ReadEnergyEvseSessionDuration : public ReadAttribute { public: - ReadDeviceEnergyManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadEnergyEvseSessionDuration() + : ReadAttribute("session-duration") { } - ~ReadDeviceEnergyManagementAcceptedCommandList() + ~ReadEnergyEvseSessionDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement AcceptedCommandList read Error", error); + LogNSError("EnergyEVSE SessionDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -84993,25 +85481,25 @@ class ReadDeviceEnergyManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseSessionDuration : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeEnergyEvseSessionDuration() + : SubscribeAttribute("session-duration") { } - ~SubscribeAttributeDeviceEnergyManagementAcceptedCommandList() + ~SubscribeAttributeEnergyEvseSessionDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85022,10 +85510,10 @@ class SubscribeAttributeDeviceEnergyManagementAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSessionDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85042,34 +85530,34 @@ class SubscribeAttributeDeviceEnergyManagementAcceptedCommandList : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute SessionEnergyCharged */ -class ReadDeviceEnergyManagementEventList : public ReadAttribute { +class ReadEnergyEvseSessionEnergyCharged : public ReadAttribute { public: - ReadDeviceEnergyManagementEventList() - : ReadAttribute("event-list") + ReadEnergyEvseSessionEnergyCharged() + : ReadAttribute("session-energy-charged") { } - ~ReadDeviceEnergyManagementEventList() + ~ReadEnergyEvseSessionEnergyCharged() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionEnergyChargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyCharged response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement EventList read Error", error); + LogNSError("EnergyEVSE SessionEnergyCharged read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85078,25 +85566,25 @@ class ReadDeviceEnergyManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementEventList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseSessionEnergyCharged : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeEnergyEvseSessionEnergyCharged() + : SubscribeAttribute("session-energy-charged") { } - ~SubscribeAttributeDeviceEnergyManagementEventList() + ~SubscribeAttributeEnergyEvseSessionEnergyCharged() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85107,10 +85595,10 @@ class SubscribeAttributeDeviceEnergyManagementEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSessionEnergyChargedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyCharged response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85127,34 +85615,34 @@ class SubscribeAttributeDeviceEnergyManagementEventList : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute SessionEnergyDischarged */ -class ReadDeviceEnergyManagementAttributeList : public ReadAttribute { +class ReadEnergyEvseSessionEnergyDischarged : public ReadAttribute { public: - ReadDeviceEnergyManagementAttributeList() - : ReadAttribute("attribute-list") + ReadEnergyEvseSessionEnergyDischarged() + : ReadAttribute("session-energy-discharged") { } - ~ReadDeviceEnergyManagementAttributeList() + ~ReadEnergyEvseSessionEnergyDischarged() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSessionEnergyDischargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyDischarged response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement AttributeList read Error", error); + LogNSError("EnergyEVSE SessionEnergyDischarged read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85163,25 +85651,25 @@ class ReadDeviceEnergyManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseSessionEnergyDischarged : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeEnergyEvseSessionEnergyDischarged() + : SubscribeAttribute("session-energy-discharged") { } - ~SubscribeAttributeDeviceEnergyManagementAttributeList() + ~SubscribeAttributeEnergyEvseSessionEnergyDischarged() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85192,10 +85680,10 @@ class SubscribeAttributeDeviceEnergyManagementAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSessionEnergyDischargedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.SessionEnergyDischarged response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85212,34 +85700,34 @@ class SubscribeAttributeDeviceEnergyManagementAttributeList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadDeviceEnergyManagementFeatureMap : public ReadAttribute { +class ReadEnergyEvseGeneratedCommandList : public ReadAttribute { public: - ReadDeviceEnergyManagementFeatureMap() - : ReadAttribute("feature-map") + ReadEnergyEvseGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDeviceEnergyManagementFeatureMap() + ~ReadEnergyEvseGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement FeatureMap read Error", error); + LogNSError("EnergyEVSE GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85248,25 +85736,25 @@ class ReadDeviceEnergyManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeEnergyEvseGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDeviceEnergyManagementFeatureMap() + ~SubscribeAttributeEnergyEvseGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85277,10 +85765,10 @@ class SubscribeAttributeDeviceEnergyManagementFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85297,34 +85785,34 @@ class SubscribeAttributeDeviceEnergyManagementFeatureMap : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadDeviceEnergyManagementClusterRevision : public ReadAttribute { +class ReadEnergyEvseAcceptedCommandList : public ReadAttribute { public: - ReadDeviceEnergyManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadEnergyEvseAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDeviceEnergyManagementClusterRevision() + ~ReadEnergyEvseAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagement ClusterRevision read Error", error); + LogNSError("EnergyEVSE AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85333,25 +85821,25 @@ class ReadDeviceEnergyManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeEnergyEvseAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDeviceEnergyManagementClusterRevision() + ~SubscribeAttributeEnergyEvseAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85362,10 +85850,10 @@ class SubscribeAttributeDeviceEnergyManagementClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85378,499 +85866,38 @@ class SubscribeAttributeDeviceEnergyManagementClusterRevision : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster EnergyEvse | 0x0099 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Disable | 0x01 | -| * EnableCharging | 0x02 | -| * EnableDischarging | 0x03 | -| * StartDiagnostics | 0x04 | -| * SetTargets | 0x05 | -| * GetTargets | 0x06 | -| * ClearTargets | 0x07 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * State | 0x0000 | -| * SupplyState | 0x0001 | -| * FaultState | 0x0002 | -| * ChargingEnabledUntil | 0x0003 | -| * DischargingEnabledUntil | 0x0004 | -| * CircuitCapacity | 0x0005 | -| * MinimumChargeCurrent | 0x0006 | -| * MaximumChargeCurrent | 0x0007 | -| * MaximumDischargeCurrent | 0x0008 | -| * UserMaximumChargeCurrent | 0x0009 | -| * RandomizationDelayWindow | 0x000A | -| * NextChargeStartTime | 0x0023 | -| * NextChargeTargetTime | 0x0024 | -| * NextChargeRequiredEnergy | 0x0025 | -| * NextChargeTargetSoC | 0x0026 | -| * ApproximateEVEfficiency | 0x0027 | -| * StateOfCharge | 0x0030 | -| * BatteryCapacity | 0x0031 | -| * VehicleID | 0x0032 | -| * SessionID | 0x0040 | -| * SessionDuration | 0x0041 | -| * SessionEnergyCharged | 0x0042 | -| * SessionEnergyDischarged | 0x0043 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * EVConnected | 0x0000 | -| * EVNotDetected | 0x0001 | -| * EnergyTransferStarted | 0x0002 | -| * EnergyTransferStopped | 0x0003 | -| * Fault | 0x0004 | -| * Rfid | 0x0005 | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command Disable + * Attribute EventList */ -class EnergyEvseDisable : public ClusterCommand { +class ReadEnergyEvseEventList : public ReadAttribute { public: - EnergyEvseDisable() - : ClusterCommand("disable") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::Disable::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterDisableParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster disableWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command EnableCharging - */ -class EnergyEvseEnableCharging : public ClusterCommand { -public: - EnergyEvseEnableCharging() - : ClusterCommand("enable-charging") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ChargingEnabledUntil", 0, UINT32_MAX, &mRequest.chargingEnabledUntil); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MinimumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.minimumChargeCurrent); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MaximumChargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumChargeCurrent); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.chargingEnabledUntil.IsNull()) { - params.chargingEnabledUntil = nil; - } else { - params.chargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.chargingEnabledUntil.Value()]; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.minimumChargeCurrent = [NSNumber numberWithLongLong:mRequest.minimumChargeCurrent]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.maximumChargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumChargeCurrent]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enableChargingWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command EnableDischarging - */ -class EnergyEvseEnableDischarging : public ClusterCommand { -public: - EnergyEvseEnableDischarging() - : ClusterCommand("enable-discharging") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DischargingEnabledUntil", 0, UINT32_MAX, &mRequest.dischargingEnabledUntil); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("MaximumDischargeCurrent", INT64_MIN, INT64_MAX, &mRequest.maximumDischargeCurrent); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.dischargingEnabledUntil.IsNull()) { - params.dischargingEnabledUntil = nil; - } else { - params.dischargingEnabledUntil = [NSNumber numberWithUnsignedInt:mRequest.dischargingEnabledUntil.Value()]; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.maximumDischargeCurrent = [NSNumber numberWithLongLong:mRequest.maximumDischargeCurrent]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enableDischargingWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command StartDiagnostics - */ -class EnergyEvseStartDiagnostics : public ClusterCommand { -public: - EnergyEvseStartDiagnostics() - : ClusterCommand("start-diagnostics") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterStartDiagnosticsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startDiagnosticsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTargets - */ -class EnergyEvseSetTargets : public ClusterCommand { -public: - EnergyEvseSetTargets() - : ClusterCommand("set-targets") - , mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::SetTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.chargingTargetSchedules) { - MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0; - newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new]; - newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.chargingTargets) { - MTREnergyEVSEClusterChargingTargetStruct * newElement_2; - newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new]; - newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight]; - if (entry_2.targetSoC.HasValue()) { - newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()]; - } else { - newElement_2.targetSoC = nil; - } - if (entry_2.addedEnergy.HasValue()) { - newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()]; - } else { - newElement_2.addedEnergy = nil; - } - [array_2 addObject:newElement_2]; - } - newElement_0.chargingTargets = array_2; - } - [array_0 addObject:newElement_0]; - } - params.chargingTargetSchedules = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTargetsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest; - TypedComplexArgument> mComplex_ChargingTargetSchedules; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetTargets - */ -class EnergyEvseGetTargets : public ClusterCommand { -public: - EnergyEvseGetTargets() - : ClusterCommand("get-targets") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::GetTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getTargetsWithParams:params completion: - ^(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ClearTargets - */ -class EnergyEvseClearTargets : public ClusterCommand { -public: - EnergyEvseClearTargets() - : ClusterCommand("clear-targets") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEClusterClearTargetsParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearTargetsWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute State - */ -class ReadEnergyEvseState : public ReadAttribute { -public: - ReadEnergyEvseState() - : ReadAttribute("state") + ReadEnergyEvseEventList() + : ReadAttribute("event-list") { } - ~ReadEnergyEvseState() + ~ReadEnergyEvseEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.State response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE State read Error", error); + LogNSError("EnergyEVSE EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85879,21 +85906,21 @@ class ReadEnergyEvseState : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseState : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseEventList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseState() - : SubscribeAttribute("state") + SubscribeAttributeEnergyEvseEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeEnergyEvseState() + ~SubscribeAttributeEnergyEvseEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::State::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85908,10 +85935,10 @@ class SubscribeAttributeEnergyEvseState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.State response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -85928,34 +85955,34 @@ class SubscribeAttributeEnergyEvseState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupplyState + * Attribute AttributeList */ -class ReadEnergyEvseSupplyState : public ReadAttribute { +class ReadEnergyEvseAttributeList : public ReadAttribute { public: - ReadEnergyEvseSupplyState() - : ReadAttribute("supply-state") + ReadEnergyEvseAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadEnergyEvseSupplyState() + ~ReadEnergyEvseAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupplyStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SupplyState response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE SupplyState read Error", error); + LogNSError("EnergyEVSE AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -85964,21 +85991,21 @@ class ReadEnergyEvseSupplyState : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseSupplyState : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseSupplyState() - : SubscribeAttribute("supply-state") + SubscribeAttributeEnergyEvseAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEnergyEvseSupplyState() + ~SubscribeAttributeEnergyEvseAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SupplyState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -85993,10 +86020,10 @@ class SubscribeAttributeEnergyEvseSupplyState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupplyStateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SupplyState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86013,34 +86040,34 @@ class SubscribeAttributeEnergyEvseSupplyState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FaultState + * Attribute FeatureMap */ -class ReadEnergyEvseFaultState : public ReadAttribute { +class ReadEnergyEvseFeatureMap : public ReadAttribute { public: - ReadEnergyEvseFaultState() - : ReadAttribute("fault-state") + ReadEnergyEvseFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadEnergyEvseFaultState() + ~ReadEnergyEvseFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFaultStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.FaultState response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE FaultState read Error", error); + LogNSError("EnergyEVSE FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86049,21 +86076,21 @@ class ReadEnergyEvseFaultState : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseFaultState : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseFaultState() - : SubscribeAttribute("fault-state") + SubscribeAttributeEnergyEvseFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEnergyEvseFaultState() + ~SubscribeAttributeEnergyEvseFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FaultState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -86078,10 +86105,10 @@ class SubscribeAttributeEnergyEvseFaultState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFaultStateWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.FaultState response %@", [value description]); + NSLog(@"EnergyEVSE.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86098,34 +86125,34 @@ class SubscribeAttributeEnergyEvseFaultState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ChargingEnabledUntil + * Attribute ClusterRevision */ -class ReadEnergyEvseChargingEnabledUntil : public ReadAttribute { +class ReadEnergyEvseClusterRevision : public ReadAttribute { public: - ReadEnergyEvseChargingEnabledUntil() - : ReadAttribute("charging-enabled-until") + ReadEnergyEvseClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadEnergyEvseChargingEnabledUntil() + ~ReadEnergyEvseClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ChargingEnabledUntil response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSE.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE ChargingEnabledUntil read Error", error); + LogNSError("EnergyEVSE ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86134,21 +86161,21 @@ class ReadEnergyEvseChargingEnabledUntil : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseChargingEnabledUntil : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseChargingEnabledUntil() - : SubscribeAttribute("charging-enabled-until") + SubscribeAttributeEnergyEvseClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEnergyEvseChargingEnabledUntil() + ~SubscribeAttributeEnergyEvseClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ChargingEnabledUntil::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -86163,10 +86190,10 @@ class SubscribeAttributeEnergyEvseChargingEnabledUntil : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChargingEnabledUntilWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ChargingEnabledUntil response %@", [value description]); + NSLog(@"EnergyEVSE.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86180,37 +86207,60 @@ class SubscribeAttributeEnergyEvseChargingEnabledUntil : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster EnergyPreference | 0x009B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * EnergyBalances | 0x0000 | +| * CurrentEnergyBalance | 0x0001 | +| * EnergyPriorities | 0x0002 | +| * LowPowerModeSensitivities | 0x0003 | +| * CurrentLowPowerModeSensitivity | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute DischargingEnabledUntil + * Attribute EnergyBalances */ -class ReadEnergyEvseDischargingEnabledUntil : public ReadAttribute { +class ReadEnergyPreferenceEnergyBalances : public ReadAttribute { public: - ReadEnergyEvseDischargingEnabledUntil() - : ReadAttribute("discharging-enabled-until") + ReadEnergyPreferenceEnergyBalances() + : ReadAttribute("energy-balances") { } - ~ReadEnergyEvseDischargingEnabledUntil() + ~ReadEnergyPreferenceEnergyBalances() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyBalances::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDischargingEnabledUntilWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.DischargingEnabledUntil response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnergyBalancesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EnergyBalances response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE DischargingEnabledUntil read Error", error); + LogNSError("EnergyPreference EnergyBalances read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86219,25 +86269,25 @@ class ReadEnergyEvseDischargingEnabledUntil : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseDischargingEnabledUntil : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceEnergyBalances : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseDischargingEnabledUntil() - : SubscribeAttribute("discharging-enabled-until") + SubscribeAttributeEnergyPreferenceEnergyBalances() + : SubscribeAttribute("energy-balances") { } - ~SubscribeAttributeEnergyEvseDischargingEnabledUntil() + ~SubscribeAttributeEnergyPreferenceEnergyBalances() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::DischargingEnabledUntil::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyBalances::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86248,10 +86298,10 @@ class SubscribeAttributeEnergyEvseDischargingEnabledUntil : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDischargingEnabledUntilWithParams:params + [cluster subscribeAttributeEnergyBalancesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.DischargingEnabledUntil response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EnergyBalances response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86268,34 +86318,34 @@ class SubscribeAttributeEnergyEvseDischargingEnabledUntil : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute CircuitCapacity + * Attribute CurrentEnergyBalance */ -class ReadEnergyEvseCircuitCapacity : public ReadAttribute { +class ReadEnergyPreferenceCurrentEnergyBalance : public ReadAttribute { public: - ReadEnergyEvseCircuitCapacity() - : ReadAttribute("circuit-capacity") + ReadEnergyPreferenceCurrentEnergyBalance() + : ReadAttribute("current-energy-balance") { } - ~ReadEnergyEvseCircuitCapacity() + ~ReadEnergyPreferenceCurrentEnergyBalance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCircuitCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.CircuitCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentEnergyBalanceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.CurrentEnergyBalance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE CircuitCapacity read Error", error); + LogNSError("EnergyPreference CurrentEnergyBalance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86304,110 +86354,66 @@ class ReadEnergyEvseCircuitCapacity : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseCircuitCapacity : public SubscribeAttribute { +class WriteEnergyPreferenceCurrentEnergyBalance : public WriteAttribute { public: - SubscribeAttributeEnergyEvseCircuitCapacity() - : SubscribeAttribute("circuit-capacity") + WriteEnergyPreferenceCurrentEnergyBalance() + : WriteAttribute("current-energy-balance") { + AddArgument("attr-name", "current-energy-balance"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeEnergyEvseCircuitCapacity() + ~WriteEnergyPreferenceCurrentEnergyBalance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::CircuitCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCircuitCapacityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.CircuitCapacity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute MinimumChargeCurrent - */ -class ReadEnergyEvseMinimumChargeCurrent : public ReadAttribute { -public: - ReadEnergyEvseMinimumChargeCurrent() - : ReadAttribute("minimum-charge-current") - { - } - - ~ReadEnergyEvseMinimumChargeCurrent() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinimumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MinimumChargeCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyEVSE MinimumChargeCurrent read Error", error); + [cluster writeAttributeCurrentEnergyBalanceWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyPreference CurrentEnergyBalance write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeEnergyEvseMinimumChargeCurrent : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceCurrentEnergyBalance : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseMinimumChargeCurrent() - : SubscribeAttribute("minimum-charge-current") + SubscribeAttributeEnergyPreferenceCurrentEnergyBalance() + : SubscribeAttribute("current-energy-balance") { } - ~SubscribeAttributeEnergyEvseMinimumChargeCurrent() + ~SubscribeAttributeEnergyPreferenceCurrentEnergyBalance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MinimumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86418,10 +86424,10 @@ class SubscribeAttributeEnergyEvseMinimumChargeCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinimumChargeCurrentWithParams:params + [cluster subscribeAttributeCurrentEnergyBalanceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MinimumChargeCurrent response %@", [value description]); + NSLog(@"EnergyPreference.CurrentEnergyBalance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86438,34 +86444,34 @@ class SubscribeAttributeEnergyEvseMinimumChargeCurrent : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaximumChargeCurrent + * Attribute EnergyPriorities */ -class ReadEnergyEvseMaximumChargeCurrent : public ReadAttribute { +class ReadEnergyPreferenceEnergyPriorities : public ReadAttribute { public: - ReadEnergyEvseMaximumChargeCurrent() - : ReadAttribute("maximum-charge-current") + ReadEnergyPreferenceEnergyPriorities() + : ReadAttribute("energy-priorities") { } - ~ReadEnergyEvseMaximumChargeCurrent() + ~ReadEnergyPreferenceEnergyPriorities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyPriorities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MaximumChargeCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnergyPrioritiesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EnergyPriorities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE MaximumChargeCurrent read Error", error); + LogNSError("EnergyPreference EnergyPriorities read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86474,25 +86480,25 @@ class ReadEnergyEvseMaximumChargeCurrent : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseMaximumChargeCurrent : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceEnergyPriorities : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseMaximumChargeCurrent() - : SubscribeAttribute("maximum-charge-current") + SubscribeAttributeEnergyPreferenceEnergyPriorities() + : SubscribeAttribute("energy-priorities") { } - ~SubscribeAttributeEnergyEvseMaximumChargeCurrent() + ~SubscribeAttributeEnergyPreferenceEnergyPriorities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyPriorities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86503,10 +86509,10 @@ class SubscribeAttributeEnergyEvseMaximumChargeCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaximumChargeCurrentWithParams:params + [cluster subscribeAttributeEnergyPrioritiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MaximumChargeCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EnergyPriorities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86523,34 +86529,34 @@ class SubscribeAttributeEnergyEvseMaximumChargeCurrent : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaximumDischargeCurrent + * Attribute LowPowerModeSensitivities */ -class ReadEnergyEvseMaximumDischargeCurrent : public ReadAttribute { +class ReadEnergyPreferenceLowPowerModeSensitivities : public ReadAttribute { public: - ReadEnergyEvseMaximumDischargeCurrent() - : ReadAttribute("maximum-discharge-current") + ReadEnergyPreferenceLowPowerModeSensitivities() + : ReadAttribute("low-power-mode-sensitivities") { } - ~ReadEnergyEvseMaximumDischargeCurrent() + ~ReadEnergyPreferenceLowPowerModeSensitivities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::LowPowerModeSensitivities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaximumDischargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MaximumDischargeCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLowPowerModeSensitivitiesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.LowPowerModeSensitivities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE MaximumDischargeCurrent read Error", error); + LogNSError("EnergyPreference LowPowerModeSensitivities read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86559,25 +86565,25 @@ class ReadEnergyEvseMaximumDischargeCurrent : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseMaximumDischargeCurrent : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseMaximumDischargeCurrent() - : SubscribeAttribute("maximum-discharge-current") + SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities() + : SubscribeAttribute("low-power-mode-sensitivities") { } - ~SubscribeAttributeEnergyEvseMaximumDischargeCurrent() + ~SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::MaximumDischargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::LowPowerModeSensitivities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86588,10 +86594,10 @@ class SubscribeAttributeEnergyEvseMaximumDischargeCurrent : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaximumDischargeCurrentWithParams:params + [cluster subscribeAttributeLowPowerModeSensitivitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.MaximumDischargeCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.LowPowerModeSensitivities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86608,34 +86614,34 @@ class SubscribeAttributeEnergyEvseMaximumDischargeCurrent : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserMaximumChargeCurrent + * Attribute CurrentLowPowerModeSensitivity */ -class ReadEnergyEvseUserMaximumChargeCurrent : public ReadAttribute { +class ReadEnergyPreferenceCurrentLowPowerModeSensitivity : public ReadAttribute { public: - ReadEnergyEvseUserMaximumChargeCurrent() - : ReadAttribute("user-maximum-charge-current") + ReadEnergyPreferenceCurrentLowPowerModeSensitivity() + : ReadAttribute("current-low-power-mode-sensitivity") { } - ~ReadEnergyEvseUserMaximumChargeCurrent() + ~ReadEnergyPreferenceCurrentLowPowerModeSensitivity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserMaximumChargeCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.UserMaximumChargeCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentLowPowerModeSensitivityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.CurrentLowPowerModeSensitivity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE UserMaximumChargeCurrent read Error", error); + LogNSError("EnergyPreference CurrentLowPowerModeSensitivity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86644,36 +86650,36 @@ class ReadEnergyEvseUserMaximumChargeCurrent : public ReadAttribute { } }; -class WriteEnergyEvseUserMaximumChargeCurrent : public WriteAttribute { +class WriteEnergyPreferenceCurrentLowPowerModeSensitivity : public WriteAttribute { public: - WriteEnergyEvseUserMaximumChargeCurrent() - : WriteAttribute("user-maximum-charge-current") + WriteEnergyPreferenceCurrentLowPowerModeSensitivity() + : WriteAttribute("current-low-power-mode-sensitivity") { - AddArgument("attr-name", "user-maximum-charge-current"); - AddArgument("attr-value", INT64_MIN, INT64_MAX, &mValue); + AddArgument("attr-name", "current-low-power-mode-sensitivity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteEnergyEvseUserMaximumChargeCurrent() + ~WriteEnergyPreferenceCurrentLowPowerModeSensitivity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithLongLong:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeUserMaximumChargeCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeCurrentLowPowerModeSensitivityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("EnergyEVSE UserMaximumChargeCurrent write Error", error); + LogNSError("EnergyPreference CurrentLowPowerModeSensitivity write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86682,28 +86688,28 @@ class WriteEnergyEvseUserMaximumChargeCurrent : public WriteAttribute { } private: - int64_t mValue; + uint8_t mValue; }; -class SubscribeAttributeEnergyEvseUserMaximumChargeCurrent : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() - : SubscribeAttribute("user-maximum-charge-current") + SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity() + : SubscribeAttribute("current-low-power-mode-sensitivity") { } - ~SubscribeAttributeEnergyEvseUserMaximumChargeCurrent() + ~SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::UserMaximumChargeCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86714,10 +86720,10 @@ class SubscribeAttributeEnergyEvseUserMaximumChargeCurrent : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserMaximumChargeCurrentWithParams:params + [cluster subscribeAttributeCurrentLowPowerModeSensitivityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.UserMaximumChargeCurrent response %@", [value description]); + NSLog(@"EnergyPreference.CurrentLowPowerModeSensitivity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86734,102 +86740,61 @@ class SubscribeAttributeEnergyEvseUserMaximumChargeCurrent : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute RandomizationDelayWindow + * Attribute GeneratedCommandList */ -class ReadEnergyEvseRandomizationDelayWindow : public ReadAttribute { +class ReadEnergyPreferenceGeneratedCommandList : public ReadAttribute { public: - ReadEnergyEvseRandomizationDelayWindow() - : ReadAttribute("randomization-delay-window") + ReadEnergyPreferenceGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadEnergyEvseRandomizationDelayWindow() + ~ReadEnergyPreferenceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRandomizationDelayWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.RandomizationDelayWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE RandomizationDelayWindow read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteEnergyEvseRandomizationDelayWindow : public WriteAttribute { -public: - WriteEnergyEvseRandomizationDelayWindow() - : WriteAttribute("randomization-delay-window") - { - AddArgument("attr-name", "randomization-delay-window"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteEnergyEvseRandomizationDelayWindow() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeRandomizationDelayWindowWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("EnergyEVSE RandomizationDelayWindow write Error", error); + LogNSError("EnergyPreference GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseRandomizationDelayWindow() - : SubscribeAttribute("randomization-delay-window") + SubscribeAttributeEnergyPreferenceGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEnergyEvseRandomizationDelayWindow() + ~SubscribeAttributeEnergyPreferenceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::RandomizationDelayWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86840,10 +86805,10 @@ class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRandomizationDelayWindowWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.RandomizationDelayWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86860,34 +86825,34 @@ class SubscribeAttributeEnergyEvseRandomizationDelayWindow : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute NextChargeStartTime + * Attribute AcceptedCommandList */ -class ReadEnergyEvseNextChargeStartTime : public ReadAttribute { +class ReadEnergyPreferenceAcceptedCommandList : public ReadAttribute { public: - ReadEnergyEvseNextChargeStartTime() - : ReadAttribute("next-charge-start-time") + ReadEnergyPreferenceAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadEnergyEvseNextChargeStartTime() + ~ReadEnergyPreferenceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNextChargeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeStartTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE NextChargeStartTime read Error", error); + LogNSError("EnergyPreference AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86896,25 +86861,25 @@ class ReadEnergyEvseNextChargeStartTime : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseNextChargeStartTime : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseNextChargeStartTime() - : SubscribeAttribute("next-charge-start-time") + SubscribeAttributeEnergyPreferenceAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeEnergyEvseNextChargeStartTime() + ~SubscribeAttributeEnergyPreferenceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeStartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86925,10 +86890,10 @@ class SubscribeAttributeEnergyEvseNextChargeStartTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNextChargeStartTimeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeStartTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -86945,34 +86910,34 @@ class SubscribeAttributeEnergyEvseNextChargeStartTime : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute NextChargeTargetTime + * Attribute EventList */ -class ReadEnergyEvseNextChargeTargetTime : public ReadAttribute { +class ReadEnergyPreferenceEventList : public ReadAttribute { public: - ReadEnergyEvseNextChargeTargetTime() - : ReadAttribute("next-charge-target-time") + ReadEnergyPreferenceEventList() + : ReadAttribute("event-list") { } - ~ReadEnergyEvseNextChargeTargetTime() + ~ReadEnergyPreferenceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNextChargeTargetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeTargetTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE NextChargeTargetTime read Error", error); + LogNSError("EnergyPreference EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -86981,25 +86946,25 @@ class ReadEnergyEvseNextChargeTargetTime : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseNextChargeTargetTime : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceEventList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseNextChargeTargetTime() - : SubscribeAttribute("next-charge-target-time") + SubscribeAttributeEnergyPreferenceEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeEnergyEvseNextChargeTargetTime() + ~SubscribeAttributeEnergyPreferenceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87010,10 +86975,10 @@ class SubscribeAttributeEnergyEvseNextChargeTargetTime : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNextChargeTargetTimeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeTargetTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87030,34 +86995,34 @@ class SubscribeAttributeEnergyEvseNextChargeTargetTime : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute NextChargeRequiredEnergy + * Attribute AttributeList */ -class ReadEnergyEvseNextChargeRequiredEnergy : public ReadAttribute { +class ReadEnergyPreferenceAttributeList : public ReadAttribute { public: - ReadEnergyEvseNextChargeRequiredEnergy() - : ReadAttribute("next-charge-required-energy") + ReadEnergyPreferenceAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadEnergyEvseNextChargeRequiredEnergy() + ~ReadEnergyPreferenceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNextChargeRequiredEnergyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeRequiredEnergy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE NextChargeRequiredEnergy read Error", error); + LogNSError("EnergyPreference AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87066,25 +87031,25 @@ class ReadEnergyEvseNextChargeRequiredEnergy : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseNextChargeRequiredEnergy : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() - : SubscribeAttribute("next-charge-required-energy") + SubscribeAttributeEnergyPreferenceAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEnergyEvseNextChargeRequiredEnergy() + ~SubscribeAttributeEnergyPreferenceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeRequiredEnergy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87095,10 +87060,10 @@ class SubscribeAttributeEnergyEvseNextChargeRequiredEnergy : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNextChargeRequiredEnergyWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeRequiredEnergy response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87115,34 +87080,34 @@ class SubscribeAttributeEnergyEvseNextChargeRequiredEnergy : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute NextChargeTargetSoC + * Attribute FeatureMap */ -class ReadEnergyEvseNextChargeTargetSoC : public ReadAttribute { +class ReadEnergyPreferenceFeatureMap : public ReadAttribute { public: - ReadEnergyEvseNextChargeTargetSoC() - : ReadAttribute("next-charge-target-so-c") + ReadEnergyPreferenceFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadEnergyEvseNextChargeTargetSoC() + ~ReadEnergyPreferenceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNextChargeTargetSoCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeTargetSoC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE NextChargeTargetSoC read Error", error); + LogNSError("EnergyPreference FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87151,25 +87116,25 @@ class ReadEnergyEvseNextChargeTargetSoC : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseNextChargeTargetSoC : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseNextChargeTargetSoC() - : SubscribeAttribute("next-charge-target-so-c") + SubscribeAttributeEnergyPreferenceFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEnergyEvseNextChargeTargetSoC() + ~SubscribeAttributeEnergyPreferenceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NextChargeTargetSoC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87180,10 +87145,10 @@ class SubscribeAttributeEnergyEvseNextChargeTargetSoC : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNextChargeTargetSoCWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.NextChargeTargetSoC response %@", [value description]); + NSLog(@"EnergyPreference.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87200,105 +87165,61 @@ class SubscribeAttributeEnergyEvseNextChargeTargetSoC : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ApproximateEVEfficiency + * Attribute ClusterRevision */ -class ReadEnergyEvseApproximateEVEfficiency : public ReadAttribute { +class ReadEnergyPreferenceClusterRevision : public ReadAttribute { public: - ReadEnergyEvseApproximateEVEfficiency() - : ReadAttribute("approximate-evefficiency") + ReadEnergyPreferenceClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadEnergyEvseApproximateEVEfficiency() + ~ReadEnergyPreferenceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApproximateEVEfficiencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ApproximateEVEfficiency response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyPreference.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE ApproximateEVEfficiency read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteEnergyEvseApproximateEVEfficiency : public WriteAttribute { -public: - WriteEnergyEvseApproximateEVEfficiency() - : WriteAttribute("approximate-evefficiency") - { - AddArgument("attr-name", "approximate-evefficiency"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteEnergyEvseApproximateEVEfficiency() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedShort:mValue.Value()]; - } - - [cluster writeAttributeApproximateEVEfficiencyWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("EnergyEVSE ApproximateEVEfficiency write Error", error); + LogNSError("EnergyPreference ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeEnergyEvseApproximateEVEfficiency : public SubscribeAttribute { +class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseApproximateEVEfficiency() - : SubscribeAttribute("approximate-evefficiency") + SubscribeAttributeEnergyPreferenceClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEnergyEvseApproximateEVEfficiency() + ~SubscribeAttributeEnergyPreferenceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ApproximateEVEfficiency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87309,10 +87230,10 @@ class SubscribeAttributeEnergyEvseApproximateEVEfficiency : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApproximateEVEfficiencyWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ApproximateEVEfficiency response %@", [value description]); + NSLog(@"EnergyPreference.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87326,37 +87247,57 @@ class SubscribeAttributeEnergyEvseApproximateEVEfficiency : public SubscribeAttr }; #endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster PowerTopology | 0x009C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AvailableEndpoints | 0x0000 | +| * ActiveEndpoints | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + #if MTR_ENABLE_PROVISIONAL /* - * Attribute StateOfCharge + * Attribute AvailableEndpoints */ -class ReadEnergyEvseStateOfCharge : public ReadAttribute { +class ReadPowerTopologyAvailableEndpoints : public ReadAttribute { public: - ReadEnergyEvseStateOfCharge() - : ReadAttribute("state-of-charge") + ReadPowerTopologyAvailableEndpoints() + : ReadAttribute("available-endpoints") { } - ~ReadEnergyEvseStateOfCharge() + ~ReadPowerTopologyAvailableEndpoints() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AvailableEndpoints::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateOfChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.StateOfCharge response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAvailableEndpointsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AvailableEndpoints response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE StateOfCharge read Error", error); + LogNSError("PowerTopology AvailableEndpoints read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87365,25 +87306,25 @@ class ReadEnergyEvseStateOfCharge : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseStateOfCharge : public SubscribeAttribute { +class SubscribeAttributePowerTopologyAvailableEndpoints : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseStateOfCharge() - : SubscribeAttribute("state-of-charge") + SubscribeAttributePowerTopologyAvailableEndpoints() + : SubscribeAttribute("available-endpoints") { } - ~SubscribeAttributeEnergyEvseStateOfCharge() + ~SubscribeAttributePowerTopologyAvailableEndpoints() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::StateOfCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AvailableEndpoints::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87394,10 +87335,10 @@ class SubscribeAttributeEnergyEvseStateOfCharge : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateOfChargeWithParams:params + [cluster subscribeAttributeAvailableEndpointsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.StateOfCharge response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AvailableEndpoints response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87414,34 +87355,34 @@ class SubscribeAttributeEnergyEvseStateOfCharge : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute BatteryCapacity + * Attribute ActiveEndpoints */ -class ReadEnergyEvseBatteryCapacity : public ReadAttribute { +class ReadPowerTopologyActiveEndpoints : public ReadAttribute { public: - ReadEnergyEvseBatteryCapacity() - : ReadAttribute("battery-capacity") + ReadPowerTopologyActiveEndpoints() + : ReadAttribute("active-endpoints") { } - ~ReadEnergyEvseBatteryCapacity() + ~ReadPowerTopologyActiveEndpoints() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::ActiveEndpoints::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatteryCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.BatteryCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveEndpointsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.ActiveEndpoints response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE BatteryCapacity read Error", error); + LogNSError("PowerTopology ActiveEndpoints read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87450,25 +87391,25 @@ class ReadEnergyEvseBatteryCapacity : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseBatteryCapacity : public SubscribeAttribute { +class SubscribeAttributePowerTopologyActiveEndpoints : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseBatteryCapacity() - : SubscribeAttribute("battery-capacity") + SubscribeAttributePowerTopologyActiveEndpoints() + : SubscribeAttribute("active-endpoints") { } - ~SubscribeAttributeEnergyEvseBatteryCapacity() + ~SubscribeAttributePowerTopologyActiveEndpoints() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::BatteryCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::ActiveEndpoints::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87479,10 +87420,10 @@ class SubscribeAttributeEnergyEvseBatteryCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryCapacityWithParams:params + [cluster subscribeAttributeActiveEndpointsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.BatteryCapacity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.ActiveEndpoints response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87499,34 +87440,34 @@ class SubscribeAttributeEnergyEvseBatteryCapacity : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute VehicleID + * Attribute GeneratedCommandList */ -class ReadEnergyEvseVehicleID : public ReadAttribute { +class ReadPowerTopologyGeneratedCommandList : public ReadAttribute { public: - ReadEnergyEvseVehicleID() - : ReadAttribute("vehicle-id") + ReadPowerTopologyGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadEnergyEvseVehicleID() + ~ReadPowerTopologyGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVehicleIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.VehicleID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE VehicleID read Error", error); + LogNSError("PowerTopology GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87535,25 +87476,25 @@ class ReadEnergyEvseVehicleID : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseVehicleID : public SubscribeAttribute { +class SubscribeAttributePowerTopologyGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseVehicleID() - : SubscribeAttribute("vehicle-id") + SubscribeAttributePowerTopologyGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEnergyEvseVehicleID() + ~SubscribeAttributePowerTopologyGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::VehicleID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87564,10 +87505,10 @@ class SubscribeAttributeEnergyEvseVehicleID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVehicleIDWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.VehicleID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87584,34 +87525,34 @@ class SubscribeAttributeEnergyEvseVehicleID : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SessionID + * Attribute AcceptedCommandList */ -class ReadEnergyEvseSessionID : public ReadAttribute { +class ReadPowerTopologyAcceptedCommandList : public ReadAttribute { public: - ReadEnergyEvseSessionID() - : ReadAttribute("session-id") + ReadPowerTopologyAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadEnergyEvseSessionID() + ~ReadPowerTopologyAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSessionIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE SessionID read Error", error); + LogNSError("PowerTopology AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87620,25 +87561,25 @@ class ReadEnergyEvseSessionID : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseSessionID : public SubscribeAttribute { +class SubscribeAttributePowerTopologyAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseSessionID() - : SubscribeAttribute("session-id") + SubscribeAttributePowerTopologyAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeEnergyEvseSessionID() + ~SubscribeAttributePowerTopologyAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87649,10 +87590,10 @@ class SubscribeAttributeEnergyEvseSessionID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSessionIDWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87669,34 +87610,34 @@ class SubscribeAttributeEnergyEvseSessionID : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SessionDuration + * Attribute EventList */ -class ReadEnergyEvseSessionDuration : public ReadAttribute { +class ReadPowerTopologyEventList : public ReadAttribute { public: - ReadEnergyEvseSessionDuration() - : ReadAttribute("session-duration") + ReadPowerTopologyEventList() + : ReadAttribute("event-list") { } - ~ReadEnergyEvseSessionDuration() + ~ReadPowerTopologyEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSessionDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionDuration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE SessionDuration read Error", error); + LogNSError("PowerTopology EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87705,25 +87646,25 @@ class ReadEnergyEvseSessionDuration : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseSessionDuration : public SubscribeAttribute { +class SubscribeAttributePowerTopologyEventList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseSessionDuration() - : SubscribeAttribute("session-duration") + SubscribeAttributePowerTopologyEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeEnergyEvseSessionDuration() + ~SubscribeAttributePowerTopologyEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionDuration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87734,10 +87675,10 @@ class SubscribeAttributeEnergyEvseSessionDuration : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSessionDurationWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionDuration response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87754,34 +87695,34 @@ class SubscribeAttributeEnergyEvseSessionDuration : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SessionEnergyCharged + * Attribute AttributeList */ -class ReadEnergyEvseSessionEnergyCharged : public ReadAttribute { +class ReadPowerTopologyAttributeList : public ReadAttribute { public: - ReadEnergyEvseSessionEnergyCharged() - : ReadAttribute("session-energy-charged") + ReadPowerTopologyAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadEnergyEvseSessionEnergyCharged() + ~ReadPowerTopologyAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSessionEnergyChargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionEnergyCharged response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE SessionEnergyCharged read Error", error); + LogNSError("PowerTopology AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87790,25 +87731,25 @@ class ReadEnergyEvseSessionEnergyCharged : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseSessionEnergyCharged : public SubscribeAttribute { +class SubscribeAttributePowerTopologyAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseSessionEnergyCharged() - : SubscribeAttribute("session-energy-charged") + SubscribeAttributePowerTopologyAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEnergyEvseSessionEnergyCharged() + ~SubscribeAttributePowerTopologyAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyCharged::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87819,10 +87760,10 @@ class SubscribeAttributeEnergyEvseSessionEnergyCharged : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSessionEnergyChargedWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionEnergyCharged response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87839,34 +87780,34 @@ class SubscribeAttributeEnergyEvseSessionEnergyCharged : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute SessionEnergyDischarged + * Attribute FeatureMap */ -class ReadEnergyEvseSessionEnergyDischarged : public ReadAttribute { +class ReadPowerTopologyFeatureMap : public ReadAttribute { public: - ReadEnergyEvseSessionEnergyDischarged() - : ReadAttribute("session-energy-discharged") + ReadPowerTopologyFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadEnergyEvseSessionEnergyDischarged() + ~ReadPowerTopologyFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSessionEnergyDischargedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionEnergyDischarged response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE SessionEnergyDischarged read Error", error); + LogNSError("PowerTopology FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87875,25 +87816,25 @@ class ReadEnergyEvseSessionEnergyDischarged : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseSessionEnergyDischarged : public SubscribeAttribute { +class SubscribeAttributePowerTopologyFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseSessionEnergyDischarged() - : SubscribeAttribute("session-energy-discharged") + SubscribeAttributePowerTopologyFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEnergyEvseSessionEnergyDischarged() + ~SubscribeAttributePowerTopologyFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::SessionEnergyDischarged::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87904,10 +87845,10 @@ class SubscribeAttributeEnergyEvseSessionEnergyDischarged : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSessionEnergyDischargedWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.SessionEnergyDischarged response %@", [value description]); + NSLog(@"PowerTopology.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -87924,34 +87865,34 @@ class SubscribeAttributeEnergyEvseSessionEnergyDischarged : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadEnergyEvseGeneratedCommandList : public ReadAttribute { +class ReadPowerTopologyClusterRevision : public ReadAttribute { public: - ReadEnergyEvseGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerTopologyClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadEnergyEvseGeneratedCommandList() + ~ReadPowerTopologyClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE GeneratedCommandList read Error", error); + LogNSError("PowerTopology ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -87960,25 +87901,25 @@ class ReadEnergyEvseGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerTopologyClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerTopologyClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEnergyEvseGeneratedCommandList() + ~SubscribeAttributePowerTopologyClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -87989,10 +87930,10 @@ class SubscribeAttributeEnergyEvseGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerTopology.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88005,38 +87946,121 @@ class SubscribeAttributeEnergyEvseGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster EnergyEvseMode | 0x009D | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Command ChangeToMode */ -class ReadEnergyEvseAcceptedCommandList : public ReadAttribute { +class EnergyEvseModeChangeToMode : public ClusterCommand { public: - ReadEnergyEvseAcceptedCommandList() - : ReadAttribute("accepted-command-list") + EnergyEvseModeChangeToMode() + : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadEnergyEvseAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREnergyEVSEModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTREnergyEVSEModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::EnergyEvseMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadEnergyEvseModeSupportedModes : public ReadAttribute { +public: + ReadEnergyEvseModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadEnergyEvseModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE AcceptedCommandList read Error", error); + LogNSError("EnergyEVSEMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88045,25 +88069,25 @@ class ReadEnergyEvseAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeEnergyEvseModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeEnergyEvseAcceptedCommandList() + ~SubscribeAttributeEnergyEvseModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88074,10 +88098,10 @@ class SubscribeAttributeEnergyEvseAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.AcceptedCommandList response %@", [value description]); + NSLog(@"EnergyEVSEMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88094,34 +88118,34 @@ class SubscribeAttributeEnergyEvseAcceptedCommandList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute CurrentMode */ -class ReadEnergyEvseEventList : public ReadAttribute { +class ReadEnergyEvseModeCurrentMode : public ReadAttribute { public: - ReadEnergyEvseEventList() - : ReadAttribute("event-list") + ReadEnergyEvseModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadEnergyEvseEventList() + ~ReadEnergyEvseModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE EventList read Error", error); + LogNSError("EnergyEVSEMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88130,25 +88154,25 @@ class ReadEnergyEvseEventList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseEventList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeEnergyEvseModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeEnergyEvseEventList() + ~SubscribeAttributeEnergyEvseModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88159,10 +88183,10 @@ class SubscribeAttributeEnergyEvseEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88179,34 +88203,34 @@ class SubscribeAttributeEnergyEvseEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute StartUpMode */ -class ReadEnergyEvseAttributeList : public ReadAttribute { +class ReadEnergyEvseModeStartUpMode : public ReadAttribute { public: - ReadEnergyEvseAttributeList() - : ReadAttribute("attribute-list") + ReadEnergyEvseModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadEnergyEvseAttributeList() + ~ReadEnergyEvseModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE AttributeList read Error", error); + LogNSError("EnergyEVSEMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88215,25 +88239,69 @@ class ReadEnergyEvseAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseAttributeList : public SubscribeAttribute { +class WriteEnergyEvseModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeEnergyEvseAttributeList() - : SubscribeAttribute("attribute-list") + WriteEnergyEvseModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeEnergyEvseAttributeList() + ~WriteEnergyEvseModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSEMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeEnergyEvseModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeEnergyEvseModeStartUpMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88244,10 +88312,10 @@ class SubscribeAttributeEnergyEvseAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88264,34 +88332,34 @@ class SubscribeAttributeEnergyEvseAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute OnMode */ -class ReadEnergyEvseFeatureMap : public ReadAttribute { +class ReadEnergyEvseModeOnMode : public ReadAttribute { public: - ReadEnergyEvseFeatureMap() - : ReadAttribute("feature-map") + ReadEnergyEvseModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadEnergyEvseFeatureMap() + ~ReadEnergyEvseModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE FeatureMap read Error", error); + LogNSError("EnergyEVSEMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88300,25 +88368,69 @@ class ReadEnergyEvseFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseFeatureMap : public SubscribeAttribute { +class WriteEnergyEvseModeOnMode : public WriteAttribute { public: - SubscribeAttributeEnergyEvseFeatureMap() - : SubscribeAttribute("feature-map") + WriteEnergyEvseModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeEnergyEvseFeatureMap() + ~WriteEnergyEvseModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("EnergyEVSEMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeEnergyEvseModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeEnergyEvseModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeEnergyEvseModeOnMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88329,10 +88441,10 @@ class SubscribeAttributeEnergyEvseFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.FeatureMap response %@", [value description]); + NSLog(@"EnergyEVSEMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88349,34 +88461,34 @@ class SubscribeAttributeEnergyEvseFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadEnergyEvseClusterRevision : public ReadAttribute { +class ReadEnergyEvseModeGeneratedCommandList : public ReadAttribute { public: - ReadEnergyEvseClusterRevision() - : ReadAttribute("cluster-revision") + ReadEnergyEvseModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadEnergyEvseClusterRevision() + ~ReadEnergyEvseModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSE ClusterRevision read Error", error); + LogNSError("EnergyEVSEMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88385,25 +88497,25 @@ class ReadEnergyEvseClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseClusterRevision : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeEnergyEvseModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEnergyEvseClusterRevision() + ~SubscribeAttributeEnergyEvseModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88414,10 +88526,10 @@ class SubscribeAttributeEnergyEvseClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSE.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88431,60 +88543,37 @@ class SubscribeAttributeEnergyEvseClusterRevision : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster EnergyPreference | 0x009B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * EnergyBalances | 0x0000 | -| * CurrentEnergyBalance | 0x0001 | -| * EnergyPriorities | 0x0002 | -| * LowPowerModeSensitivities | 0x0003 | -| * CurrentLowPowerModeSensitivity | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute EnergyBalances + * Attribute AcceptedCommandList */ -class ReadEnergyPreferenceEnergyBalances : public ReadAttribute { +class ReadEnergyEvseModeAcceptedCommandList : public ReadAttribute { public: - ReadEnergyPreferenceEnergyBalances() - : ReadAttribute("energy-balances") + ReadEnergyEvseModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadEnergyPreferenceEnergyBalances() + ~ReadEnergyEvseModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyBalances::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnergyBalancesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EnergyBalances response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference EnergyBalances read Error", error); + LogNSError("EnergyEVSEMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88493,25 +88582,25 @@ class ReadEnergyPreferenceEnergyBalances : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceEnergyBalances : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceEnergyBalances() - : SubscribeAttribute("energy-balances") + SubscribeAttributeEnergyEvseModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeEnergyPreferenceEnergyBalances() + ~SubscribeAttributeEnergyEvseModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyBalances::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88522,10 +88611,10 @@ class SubscribeAttributeEnergyPreferenceEnergyBalances : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnergyBalancesWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EnergyBalances response %@", [value description]); + NSLog(@"EnergyEVSEMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88542,34 +88631,34 @@ class SubscribeAttributeEnergyPreferenceEnergyBalances : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentEnergyBalance + * Attribute EventList */ -class ReadEnergyPreferenceCurrentEnergyBalance : public ReadAttribute { +class ReadEnergyEvseModeEventList : public ReadAttribute { public: - ReadEnergyPreferenceCurrentEnergyBalance() - : ReadAttribute("current-energy-balance") + ReadEnergyEvseModeEventList() + : ReadAttribute("event-list") { } - ~ReadEnergyPreferenceCurrentEnergyBalance() + ~ReadEnergyEvseModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentEnergyBalanceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.CurrentEnergyBalance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference CurrentEnergyBalance read Error", error); + LogNSError("EnergyEVSEMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88578,151 +88667,25 @@ class ReadEnergyPreferenceCurrentEnergyBalance : public ReadAttribute { } }; -class WriteEnergyPreferenceCurrentEnergyBalance : public WriteAttribute { +class SubscribeAttributeEnergyEvseModeEventList : public SubscribeAttribute { public: - WriteEnergyPreferenceCurrentEnergyBalance() - : WriteAttribute("current-energy-balance") + SubscribeAttributeEnergyEvseModeEventList() + : SubscribeAttribute("event-list") { - AddArgument("attr-name", "current-energy-balance"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteEnergyPreferenceCurrentEnergyBalance() + ~SubscribeAttributeEnergyEvseModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeCurrentEnergyBalanceWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("EnergyPreference CurrentEnergyBalance write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeEnergyPreferenceCurrentEnergyBalance : public SubscribeAttribute { -public: - SubscribeAttributeEnergyPreferenceCurrentEnergyBalance() - : SubscribeAttribute("current-energy-balance") - { - } - - ~SubscribeAttributeEnergyPreferenceCurrentEnergyBalance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentEnergyBalance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentEnergyBalanceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.CurrentEnergyBalance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EnergyPriorities - */ -class ReadEnergyPreferenceEnergyPriorities : public ReadAttribute { -public: - ReadEnergyPreferenceEnergyPriorities() - : ReadAttribute("energy-priorities") - { - } - - ~ReadEnergyPreferenceEnergyPriorities() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyPriorities::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnergyPrioritiesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EnergyPriorities response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyPreference EnergyPriorities read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEnergyPreferenceEnergyPriorities : public SubscribeAttribute { -public: - SubscribeAttributeEnergyPreferenceEnergyPriorities() - : SubscribeAttribute("energy-priorities") - { - } - - ~SubscribeAttributeEnergyPreferenceEnergyPriorities() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EnergyPriorities::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88733,10 +88696,10 @@ class SubscribeAttributeEnergyPreferenceEnergyPriorities : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnergyPrioritiesWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EnergyPriorities response %@", [value description]); + NSLog(@"EnergyEVSEMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88753,34 +88716,34 @@ class SubscribeAttributeEnergyPreferenceEnergyPriorities : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute LowPowerModeSensitivities + * Attribute AttributeList */ -class ReadEnergyPreferenceLowPowerModeSensitivities : public ReadAttribute { +class ReadEnergyEvseModeAttributeList : public ReadAttribute { public: - ReadEnergyPreferenceLowPowerModeSensitivities() - : ReadAttribute("low-power-mode-sensitivities") + ReadEnergyEvseModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadEnergyPreferenceLowPowerModeSensitivities() + ~ReadEnergyEvseModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::LowPowerModeSensitivities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLowPowerModeSensitivitiesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.LowPowerModeSensitivities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference LowPowerModeSensitivities read Error", error); + LogNSError("EnergyEVSEMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -88789,25 +88752,25 @@ class ReadEnergyPreferenceLowPowerModeSensitivities : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities() - : SubscribeAttribute("low-power-mode-sensitivities") + SubscribeAttributeEnergyEvseModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities() + ~SubscribeAttributeEnergyEvseModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::LowPowerModeSensitivities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88818,10 +88781,10 @@ class SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLowPowerModeSensitivitiesWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.LowPowerModeSensitivities response %@", [value description]); + NSLog(@"EnergyEVSEMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88838,102 +88801,61 @@ class SubscribeAttributeEnergyPreferenceLowPowerModeSensitivities : public Subsc #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentLowPowerModeSensitivity + * Attribute FeatureMap */ -class ReadEnergyPreferenceCurrentLowPowerModeSensitivity : public ReadAttribute { +class ReadEnergyEvseModeFeatureMap : public ReadAttribute { public: - ReadEnergyPreferenceCurrentLowPowerModeSensitivity() - : ReadAttribute("current-low-power-mode-sensitivity") + ReadEnergyEvseModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadEnergyPreferenceCurrentLowPowerModeSensitivity() + ~ReadEnergyEvseModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentLowPowerModeSensitivityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.CurrentLowPowerModeSensitivity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference CurrentLowPowerModeSensitivity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteEnergyPreferenceCurrentLowPowerModeSensitivity : public WriteAttribute { -public: - WriteEnergyPreferenceCurrentLowPowerModeSensitivity() - : WriteAttribute("current-low-power-mode-sensitivity") - { - AddArgument("attr-name", "current-low-power-mode-sensitivity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteEnergyPreferenceCurrentLowPowerModeSensitivity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeCurrentLowPowerModeSensitivityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("EnergyPreference CurrentLowPowerModeSensitivity write Error", error); + LogNSError("EnergyEVSEMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity() - : SubscribeAttribute("current-low-power-mode-sensitivity") + SubscribeAttributeEnergyEvseModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity() + ~SubscribeAttributeEnergyEvseModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::CurrentLowPowerModeSensitivity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -88944,10 +88866,10 @@ class SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentLowPowerModeSensitivityWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.CurrentLowPowerModeSensitivity response %@", [value description]); + NSLog(@"EnergyEVSEMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -88964,34 +88886,34 @@ class SubscribeAttributeEnergyPreferenceCurrentLowPowerModeSensitivity : public #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadEnergyPreferenceGeneratedCommandList : public ReadAttribute { +class ReadEnergyEvseModeClusterRevision : public ReadAttribute { public: - ReadEnergyPreferenceGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadEnergyEvseModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadEnergyPreferenceGeneratedCommandList() + ~ReadEnergyEvseModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference GeneratedCommandList read Error", error); + LogNSError("EnergyEVSEMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89000,25 +88922,25 @@ class ReadEnergyPreferenceGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeEnergyEvseModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeEnergyEvseModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEnergyPreferenceGeneratedCommandList() + ~SubscribeAttributeEnergyEvseModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89029,10 +88951,10 @@ class SubscribeAttributeEnergyPreferenceGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EnergyEVSEMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89045,123 +88967,121 @@ class SubscribeAttributeEnergyPreferenceGeneratedCommandList : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster WaterHeaterMode | 0x009E | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Command ChangeToMode */ -class ReadEnergyPreferenceAcceptedCommandList : public ReadAttribute { +class WaterHeaterModeChangeToMode : public ClusterCommand { public: - ReadEnergyPreferenceAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadEnergyPreferenceAcceptedCommandList() + WaterHeaterModeChangeToMode() + : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyPreference AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEnergyPreferenceAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeEnergyPreferenceAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeEnergyPreferenceAcceptedCommandList() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToMode::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AcceptedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWaterHeaterModeClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params completion: + ^(MTRWaterHeaterModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WaterHeaterMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute SupportedModes */ -class ReadEnergyPreferenceEventList : public ReadAttribute { +class ReadWaterHeaterModeSupportedModes : public ReadAttribute { public: - ReadEnergyPreferenceEventList() - : ReadAttribute("event-list") + ReadWaterHeaterModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadEnergyPreferenceEventList() + ~ReadWaterHeaterModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference EventList read Error", error); + LogNSError("WaterHeaterMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89170,25 +89090,25 @@ class ReadEnergyPreferenceEventList : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceEventList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWaterHeaterModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeEnergyPreferenceEventList() + ~SubscribeAttributeWaterHeaterModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89199,10 +89119,10 @@ class SubscribeAttributeEnergyPreferenceEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.EventList response %@", [value description]); + NSLog(@"WaterHeaterMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89219,34 +89139,34 @@ class SubscribeAttributeEnergyPreferenceEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute CurrentMode */ -class ReadEnergyPreferenceAttributeList : public ReadAttribute { +class ReadWaterHeaterModeCurrentMode : public ReadAttribute { public: - ReadEnergyPreferenceAttributeList() - : ReadAttribute("attribute-list") + ReadWaterHeaterModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadEnergyPreferenceAttributeList() + ~ReadWaterHeaterModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference AttributeList read Error", error); + LogNSError("WaterHeaterMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89255,25 +89175,25 @@ class ReadEnergyPreferenceAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceAttributeList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWaterHeaterModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeEnergyPreferenceAttributeList() + ~SubscribeAttributeWaterHeaterModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89284,10 +89204,10 @@ class SubscribeAttributeEnergyPreferenceAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89304,34 +89224,34 @@ class SubscribeAttributeEnergyPreferenceAttributeList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute StartUpMode */ -class ReadEnergyPreferenceFeatureMap : public ReadAttribute { +class ReadWaterHeaterModeStartUpMode : public ReadAttribute { public: - ReadEnergyPreferenceFeatureMap() - : ReadAttribute("feature-map") + ReadWaterHeaterModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadEnergyPreferenceFeatureMap() + ~ReadWaterHeaterModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyPreference FeatureMap read Error", error); + LogNSError("WaterHeaterMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89340,110 +89260,69 @@ class ReadEnergyPreferenceFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEnergyPreferenceFeatureMap : public SubscribeAttribute { +class WriteWaterHeaterModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeEnergyPreferenceFeatureMap() - : SubscribeAttribute("feature-map") + WriteWaterHeaterModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeEnergyPreferenceFeatureMap() + ~WriteWaterHeaterModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute ClusterRevision - */ -class ReadEnergyPreferenceClusterRevision : public ReadAttribute { -public: - ReadEnergyPreferenceClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadEnergyPreferenceClusterRevision() - { - } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyPreference::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EnergyPreference ClusterRevision read Error", error); + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WaterHeaterMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyPreferenceClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWaterHeaterModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeEnergyPreferenceClusterRevision() + ~SubscribeAttributeWaterHeaterModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyPreference::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyPreference::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyPreference alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89454,10 +89333,10 @@ class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyPreference.ClusterRevision response %@", [value description]); + NSLog(@"WaterHeaterMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89471,57 +89350,37 @@ class SubscribeAttributeEnergyPreferenceClusterRevision : public SubscribeAttrib }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster PowerTopology | 0x009C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AvailableEndpoints | 0x0000 | -| * ActiveEndpoints | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - #if MTR_ENABLE_PROVISIONAL /* - * Attribute AvailableEndpoints + * Attribute OnMode */ -class ReadPowerTopologyAvailableEndpoints : public ReadAttribute { +class ReadWaterHeaterModeOnMode : public ReadAttribute { public: - ReadPowerTopologyAvailableEndpoints() - : ReadAttribute("available-endpoints") + ReadWaterHeaterModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadPowerTopologyAvailableEndpoints() + ~ReadWaterHeaterModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AvailableEndpoints::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAvailableEndpointsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AvailableEndpoints response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology AvailableEndpoints read Error", error); + LogNSError("WaterHeaterMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89530,110 +89389,69 @@ class ReadPowerTopologyAvailableEndpoints : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyAvailableEndpoints : public SubscribeAttribute { +class WriteWaterHeaterModeOnMode : public WriteAttribute { public: - SubscribeAttributePowerTopologyAvailableEndpoints() - : SubscribeAttribute("available-endpoints") + WriteWaterHeaterModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePowerTopologyAvailableEndpoints() + ~WriteWaterHeaterModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AvailableEndpoints::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster subscribeAttributeAvailableEndpointsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AvailableEndpoints response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute ActiveEndpoints - */ -class ReadPowerTopologyActiveEndpoints : public ReadAttribute { -public: - ReadPowerTopologyActiveEndpoints() - : ReadAttribute("active-endpoints") - { - } - - ~ReadPowerTopologyActiveEndpoints() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::ActiveEndpoints::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveEndpointsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.ActiveEndpoints response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerTopology ActiveEndpoints read Error", error); + [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WaterHeaterMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributePowerTopologyActiveEndpoints : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeOnMode : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyActiveEndpoints() - : SubscribeAttribute("active-endpoints") + SubscribeAttributeWaterHeaterModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributePowerTopologyActiveEndpoints() + ~SubscribeAttributeWaterHeaterModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::ActiveEndpoints::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89644,10 +89462,10 @@ class SubscribeAttributePowerTopologyActiveEndpoints : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveEndpointsWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.ActiveEndpoints response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WaterHeaterMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89666,32 +89484,32 @@ class SubscribeAttributePowerTopologyActiveEndpoints : public SubscribeAttribute /* * Attribute GeneratedCommandList */ -class ReadPowerTopologyGeneratedCommandList : public ReadAttribute { +class ReadWaterHeaterModeGeneratedCommandList : public ReadAttribute { public: - ReadPowerTopologyGeneratedCommandList() + ReadWaterHeaterModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadPowerTopologyGeneratedCommandList() + ~ReadWaterHeaterModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.GeneratedCommandList response %@", [value description]); + NSLog(@"WaterHeaterMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology GeneratedCommandList read Error", error); + LogNSError("WaterHeaterMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89700,25 +89518,25 @@ class ReadPowerTopologyGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyGeneratedCommandList() + SubscribeAttributeWaterHeaterModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerTopologyGeneratedCommandList() + ~SubscribeAttributeWaterHeaterModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89732,7 +89550,7 @@ class SubscribeAttributePowerTopologyGeneratedCommandList : public SubscribeAttr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.GeneratedCommandList response %@", [value description]); + NSLog(@"WaterHeaterMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89751,32 +89569,32 @@ class SubscribeAttributePowerTopologyGeneratedCommandList : public SubscribeAttr /* * Attribute AcceptedCommandList */ -class ReadPowerTopologyAcceptedCommandList : public ReadAttribute { +class ReadWaterHeaterModeAcceptedCommandList : public ReadAttribute { public: - ReadPowerTopologyAcceptedCommandList() + ReadWaterHeaterModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadPowerTopologyAcceptedCommandList() + ~ReadWaterHeaterModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AcceptedCommandList response %@", [value description]); + NSLog(@"WaterHeaterMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology AcceptedCommandList read Error", error); + LogNSError("WaterHeaterMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89785,25 +89603,25 @@ class ReadPowerTopologyAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyAcceptedCommandList() + SubscribeAttributeWaterHeaterModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerTopologyAcceptedCommandList() + ~SubscribeAttributeWaterHeaterModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89817,7 +89635,7 @@ class SubscribeAttributePowerTopologyAcceptedCommandList : public SubscribeAttri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AcceptedCommandList response %@", [value description]); + NSLog(@"WaterHeaterMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89836,32 +89654,32 @@ class SubscribeAttributePowerTopologyAcceptedCommandList : public SubscribeAttri /* * Attribute EventList */ -class ReadPowerTopologyEventList : public ReadAttribute { +class ReadWaterHeaterModeEventList : public ReadAttribute { public: - ReadPowerTopologyEventList() + ReadWaterHeaterModeEventList() : ReadAttribute("event-list") { } - ~ReadPowerTopologyEventList() + ~ReadWaterHeaterModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.EventList response %@", [value description]); + NSLog(@"WaterHeaterMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology EventList read Error", error); + LogNSError("WaterHeaterMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89870,25 +89688,25 @@ class ReadPowerTopologyEventList : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyEventList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeEventList : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyEventList() + SubscribeAttributeWaterHeaterModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerTopologyEventList() + ~SubscribeAttributeWaterHeaterModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89902,7 +89720,7 @@ class SubscribeAttributePowerTopologyEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.EventList response %@", [value description]); + NSLog(@"WaterHeaterMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -89921,32 +89739,32 @@ class SubscribeAttributePowerTopologyEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadPowerTopologyAttributeList : public ReadAttribute { +class ReadWaterHeaterModeAttributeList : public ReadAttribute { public: - ReadPowerTopologyAttributeList() + ReadWaterHeaterModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPowerTopologyAttributeList() + ~ReadWaterHeaterModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AttributeList response %@", [value description]); + NSLog(@"WaterHeaterMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology AttributeList read Error", error); + LogNSError("WaterHeaterMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -89955,25 +89773,25 @@ class ReadPowerTopologyAttributeList : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyAttributeList : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyAttributeList() + SubscribeAttributeWaterHeaterModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerTopologyAttributeList() + ~SubscribeAttributeWaterHeaterModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -89987,7 +89805,7 @@ class SubscribeAttributePowerTopologyAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.AttributeList response %@", [value description]); + NSLog(@"WaterHeaterMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90006,32 +89824,32 @@ class SubscribeAttributePowerTopologyAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadPowerTopologyFeatureMap : public ReadAttribute { +class ReadWaterHeaterModeFeatureMap : public ReadAttribute { public: - ReadPowerTopologyFeatureMap() + ReadWaterHeaterModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPowerTopologyFeatureMap() + ~ReadWaterHeaterModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.FeatureMap response %@", [value description]); + NSLog(@"WaterHeaterMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology FeatureMap read Error", error); + LogNSError("WaterHeaterMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90040,25 +89858,25 @@ class ReadPowerTopologyFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyFeatureMap() + SubscribeAttributeWaterHeaterModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerTopologyFeatureMap() + ~SubscribeAttributeWaterHeaterModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90072,7 +89890,7 @@ class SubscribeAttributePowerTopologyFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.FeatureMap response %@", [value description]); + NSLog(@"WaterHeaterMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90091,32 +89909,32 @@ class SubscribeAttributePowerTopologyFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadPowerTopologyClusterRevision : public ReadAttribute { +class ReadWaterHeaterModeClusterRevision : public ReadAttribute { public: - ReadPowerTopologyClusterRevision() + ReadWaterHeaterModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPowerTopologyClusterRevision() + ~ReadWaterHeaterModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerTopology::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.ClusterRevision response %@", [value description]); + NSLog(@"WaterHeaterMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerTopology ClusterRevision read Error", error); + LogNSError("WaterHeaterMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90125,25 +89943,25 @@ class ReadPowerTopologyClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePowerTopologyClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWaterHeaterModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerTopologyClusterRevision() + SubscribeAttributeWaterHeaterModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerTopologyClusterRevision() + ~SubscribeAttributeWaterHeaterModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerTopology::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerTopology::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerTopology alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90157,7 +89975,7 @@ class SubscribeAttributePowerTopologyClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerTopology.ClusterRevision response %@", [value description]); + NSLog(@"WaterHeaterMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90174,7 +89992,7 @@ class SubscribeAttributePowerTopologyClusterRevision : public SubscribeAttribute #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster EnergyEvseMode | 0x009D | +| Cluster DeviceEnergyManagementMode | 0x009F | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -90198,9 +90016,9 @@ class SubscribeAttributePowerTopologyClusterRevision : public SubscribeAttribute /* * Command ChangeToMode */ -class EnergyEvseModeChangeToMode : public ClusterCommand { +class DeviceEnergyManagementModeChangeToMode : public ClusterCommand { public: - EnergyEvseModeChangeToMode() + DeviceEnergyManagementModeChangeToMode() : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL @@ -90211,14 +90029,14 @@ class EnergyEvseModeChangeToMode : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREnergyEVSEModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDeviceEnergyManagementModeClusterChangeToModeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; @@ -90227,17 +90045,17 @@ class EnergyEvseModeChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTREnergyEVSEModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -90249,7 +90067,7 @@ class EnergyEvseModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::EnergyEvseMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -90259,32 +90077,32 @@ class EnergyEvseModeChangeToMode : public ClusterCommand { /* * Attribute SupportedModes */ -class ReadEnergyEvseModeSupportedModes : public ReadAttribute { +class ReadDeviceEnergyManagementModeSupportedModes : public ReadAttribute { public: - ReadEnergyEvseModeSupportedModes() + ReadDeviceEnergyManagementModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadEnergyEvseModeSupportedModes() + ~ReadDeviceEnergyManagementModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.SupportedModes response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode SupportedModes read Error", error); + LogNSError("DeviceEnergyManagementMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90293,25 +90111,25 @@ class ReadEnergyEvseModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeSupportedModes() + SubscribeAttributeDeviceEnergyManagementModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeEnergyEvseModeSupportedModes() + ~SubscribeAttributeDeviceEnergyManagementModeSupportedModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::SupportedModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90325,7 +90143,7 @@ class SubscribeAttributeEnergyEvseModeSupportedModes : public SubscribeAttribute [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.SupportedModes response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90344,32 +90162,32 @@ class SubscribeAttributeEnergyEvseModeSupportedModes : public SubscribeAttribute /* * Attribute CurrentMode */ -class ReadEnergyEvseModeCurrentMode : public ReadAttribute { +class ReadDeviceEnergyManagementModeCurrentMode : public ReadAttribute { public: - ReadEnergyEvseModeCurrentMode() + ReadDeviceEnergyManagementModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadEnergyEvseModeCurrentMode() + ~ReadDeviceEnergyManagementModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.CurrentMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode CurrentMode read Error", error); + LogNSError("DeviceEnergyManagementMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90378,25 +90196,25 @@ class ReadEnergyEvseModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeCurrentMode() + SubscribeAttributeDeviceEnergyManagementModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeEnergyEvseModeCurrentMode() + ~SubscribeAttributeDeviceEnergyManagementModeCurrentMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::CurrentMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90410,7 +90228,7 @@ class SubscribeAttributeEnergyEvseModeCurrentMode : public SubscribeAttribute { [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.CurrentMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90429,32 +90247,32 @@ class SubscribeAttributeEnergyEvseModeCurrentMode : public SubscribeAttribute { /* * Attribute StartUpMode */ -class ReadEnergyEvseModeStartUpMode : public ReadAttribute { +class ReadDeviceEnergyManagementModeStartUpMode : public ReadAttribute { public: - ReadEnergyEvseModeStartUpMode() + ReadDeviceEnergyManagementModeStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadEnergyEvseModeStartUpMode() + ~ReadDeviceEnergyManagementModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.StartUpMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode StartUpMode read Error", error); + LogNSError("DeviceEnergyManagementMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90463,9 +90281,9 @@ class ReadEnergyEvseModeStartUpMode : public ReadAttribute { } }; -class WriteEnergyEvseModeStartUpMode : public WriteAttribute { +class WriteDeviceEnergyManagementModeStartUpMode : public WriteAttribute { public: - WriteEnergyEvseModeStartUpMode() + WriteDeviceEnergyManagementModeStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -90473,18 +90291,18 @@ class WriteEnergyEvseModeStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteEnergyEvseModeStartUpMode() + ~WriteDeviceEnergyManagementModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90495,7 +90313,7 @@ class WriteEnergyEvseModeStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("EnergyEVSEMode StartUpMode write Error", error); + LogNSError("DeviceEnergyManagementMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90507,25 +90325,25 @@ class WriteEnergyEvseModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeEnergyEvseModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeStartUpMode() + SubscribeAttributeDeviceEnergyManagementModeStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeEnergyEvseModeStartUpMode() + ~SubscribeAttributeDeviceEnergyManagementModeStartUpMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90539,7 +90357,7 @@ class SubscribeAttributeEnergyEvseModeStartUpMode : public SubscribeAttribute { [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.StartUpMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90558,32 +90376,32 @@ class SubscribeAttributeEnergyEvseModeStartUpMode : public SubscribeAttribute { /* * Attribute OnMode */ -class ReadEnergyEvseModeOnMode : public ReadAttribute { +class ReadDeviceEnergyManagementModeOnMode : public ReadAttribute { public: - ReadEnergyEvseModeOnMode() + ReadDeviceEnergyManagementModeOnMode() : ReadAttribute("on-mode") { } - ~ReadEnergyEvseModeOnMode() + ~ReadDeviceEnergyManagementModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.OnMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode OnMode read Error", error); + LogNSError("DeviceEnergyManagementMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90592,9 +90410,9 @@ class ReadEnergyEvseModeOnMode : public ReadAttribute { } }; -class WriteEnergyEvseModeOnMode : public WriteAttribute { +class WriteDeviceEnergyManagementModeOnMode : public WriteAttribute { public: - WriteEnergyEvseModeOnMode() + WriteDeviceEnergyManagementModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -90602,18 +90420,18 @@ class WriteEnergyEvseModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteEnergyEvseModeOnMode() + ~WriteDeviceEnergyManagementModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; @@ -90624,7 +90442,7 @@ class WriteEnergyEvseModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("EnergyEVSEMode OnMode write Error", error); + LogNSError("DeviceEnergyManagementMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90636,25 +90454,25 @@ class WriteEnergyEvseModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeEnergyEvseModeOnMode : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeOnMode() + SubscribeAttributeDeviceEnergyManagementModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeEnergyEvseModeOnMode() + ~SubscribeAttributeDeviceEnergyManagementModeOnMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90668,7 +90486,7 @@ class SubscribeAttributeEnergyEvseModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.OnMode response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90687,32 +90505,32 @@ class SubscribeAttributeEnergyEvseModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadEnergyEvseModeGeneratedCommandList : public ReadAttribute { +class ReadDeviceEnergyManagementModeGeneratedCommandList : public ReadAttribute { public: - ReadEnergyEvseModeGeneratedCommandList() + ReadDeviceEnergyManagementModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadEnergyEvseModeGeneratedCommandList() + ~ReadDeviceEnergyManagementModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.GeneratedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode GeneratedCommandList read Error", error); + LogNSError("DeviceEnergyManagementMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90721,25 +90539,25 @@ class ReadEnergyEvseModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeGeneratedCommandList() + SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEnergyEvseModeGeneratedCommandList() + ~SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90753,7 +90571,7 @@ class SubscribeAttributeEnergyEvseModeGeneratedCommandList : public SubscribeAtt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.GeneratedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90772,32 +90590,32 @@ class SubscribeAttributeEnergyEvseModeGeneratedCommandList : public SubscribeAtt /* * Attribute AcceptedCommandList */ -class ReadEnergyEvseModeAcceptedCommandList : public ReadAttribute { +class ReadDeviceEnergyManagementModeAcceptedCommandList : public ReadAttribute { public: - ReadEnergyEvseModeAcceptedCommandList() + ReadDeviceEnergyManagementModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadEnergyEvseModeAcceptedCommandList() + ~ReadDeviceEnergyManagementModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.AcceptedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode AcceptedCommandList read Error", error); + LogNSError("DeviceEnergyManagementMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90806,25 +90624,25 @@ class ReadEnergyEvseModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeAcceptedCommandList() + SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeEnergyEvseModeAcceptedCommandList() + ~SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90838,7 +90656,7 @@ class SubscribeAttributeEnergyEvseModeAcceptedCommandList : public SubscribeAttr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.AcceptedCommandList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90857,32 +90675,32 @@ class SubscribeAttributeEnergyEvseModeAcceptedCommandList : public SubscribeAttr /* * Attribute EventList */ -class ReadEnergyEvseModeEventList : public ReadAttribute { +class ReadDeviceEnergyManagementModeEventList : public ReadAttribute { public: - ReadEnergyEvseModeEventList() + ReadDeviceEnergyManagementModeEventList() : ReadAttribute("event-list") { } - ~ReadEnergyEvseModeEventList() + ~ReadDeviceEnergyManagementModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.EventList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode EventList read Error", error); + LogNSError("DeviceEnergyManagementMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90891,25 +90709,25 @@ class ReadEnergyEvseModeEventList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeEventList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeEventList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeEventList() + SubscribeAttributeDeviceEnergyManagementModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeEnergyEvseModeEventList() + ~SubscribeAttributeDeviceEnergyManagementModeEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -90923,7 +90741,7 @@ class SubscribeAttributeEnergyEvseModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.EventList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -90942,32 +90760,32 @@ class SubscribeAttributeEnergyEvseModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadEnergyEvseModeAttributeList : public ReadAttribute { +class ReadDeviceEnergyManagementModeAttributeList : public ReadAttribute { public: - ReadEnergyEvseModeAttributeList() + ReadDeviceEnergyManagementModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadEnergyEvseModeAttributeList() + ~ReadDeviceEnergyManagementModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.AttributeList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode AttributeList read Error", error); + LogNSError("DeviceEnergyManagementMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -90976,25 +90794,25 @@ class ReadEnergyEvseModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeAttributeList() + SubscribeAttributeDeviceEnergyManagementModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEnergyEvseModeAttributeList() + ~SubscribeAttributeDeviceEnergyManagementModeAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91008,7 +90826,7 @@ class SubscribeAttributeEnergyEvseModeAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.AttributeList response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91027,32 +90845,32 @@ class SubscribeAttributeEnergyEvseModeAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadEnergyEvseModeFeatureMap : public ReadAttribute { +class ReadDeviceEnergyManagementModeFeatureMap : public ReadAttribute { public: - ReadEnergyEvseModeFeatureMap() + ReadDeviceEnergyManagementModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadEnergyEvseModeFeatureMap() + ~ReadDeviceEnergyManagementModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.FeatureMap response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode FeatureMap read Error", error); + LogNSError("DeviceEnergyManagementMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91061,25 +90879,25 @@ class ReadEnergyEvseModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeFeatureMap() + SubscribeAttributeDeviceEnergyManagementModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEnergyEvseModeFeatureMap() + ~SubscribeAttributeDeviceEnergyManagementModeFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91093,7 +90911,7 @@ class SubscribeAttributeEnergyEvseModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.FeatureMap response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91112,32 +90930,32 @@ class SubscribeAttributeEnergyEvseModeFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadEnergyEvseModeClusterRevision : public ReadAttribute { +class ReadDeviceEnergyManagementModeClusterRevision : public ReadAttribute { public: - ReadEnergyEvseModeClusterRevision() + ReadDeviceEnergyManagementModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadEnergyEvseModeClusterRevision() + ~ReadDeviceEnergyManagementModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.ClusterRevision response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EnergyEVSEMode ClusterRevision read Error", error); + LogNSError("DeviceEnergyManagementMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91146,25 +90964,25 @@ class ReadEnergyEvseModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeEnergyEvseModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDeviceEnergyManagementModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEnergyEvseModeClusterRevision() + SubscribeAttributeDeviceEnergyManagementModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEnergyEvseModeClusterRevision() + ~SubscribeAttributeDeviceEnergyManagementModeClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvseMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvseMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEnergyEVSEMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91178,7 +90996,7 @@ class SubscribeAttributeEnergyEvseModeClusterRevision : public SubscribeAttribut [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EnergyEVSEMode.ClusterRevision response %@", [value description]); + NSLog(@"DeviceEnergyManagementMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91193,18 +91011,78 @@ class SubscribeAttributeEnergyEvseModeClusterRevision : public SubscribeAttribut #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster WaterHeaterMode | 0x009E | +| Cluster DoorLock | 0x0101 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +| * UnboltDoor | 0x27 | +| * SetAliroReaderConfig | 0x28 | +| * ClearAliroReaderConfig | 0x29 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | +| * AliroReaderVerificationKey | 0x0080 | +| * AliroReaderGroupIdentifier | 0x0081 | +| * AliroReaderGroupSubIdentifier | 0x0082 | +| * AliroExpeditedTransactionSupportedProtocolVersions | 0x0083 | +| * AliroGroupResolvingKey | 0x0084 | +| * AliroSupportedBLEUWBProtocolVersions | 0x0085 | +| * AliroBLEAdvertisingVersion | 0x0086 | +| * NumberOfAliroCredentialIssuerKeysSupported | 0x0087 | +| * NumberOfAliroEndpointKeysSupported | 0x0088 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -91213,697 +91091,1219 @@ class SubscribeAttributeEnergyEvseModeClusterRevision : public SubscribeAttribut | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeToMode + * Command LockDoor */ -class WaterHeaterModeChangeToMode : public ClusterCommand { +class DoorLockLockDoor : public ClusterCommand { public: - WaterHeaterModeChangeToMode() - : ClusterCommand("change-to-mode") + DoorLockLockDoor() + : ClusterCommand("lock-door") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL + AddArgument("PINCode", &mRequest.PINCode); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWaterHeaterModeClusterChangeToModeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRWaterHeaterModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::WaterHeaterMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster lockDoorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::WaterHeaterMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedModes + * Command UnlockDoor */ -class ReadWaterHeaterModeSupportedModes : public ReadAttribute { +class DoorLockUnlockDoor : public ClusterCommand { public: - ReadWaterHeaterModeSupportedModes() - : ReadAttribute("supported-modes") - { - } - - ~ReadWaterHeaterModeSupportedModes() + DoorLockUnlockDoor() + : ClusterCommand("unlock-door") { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.SupportedModes response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode SupportedModes read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockDoorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; -class SubscribeAttributeWaterHeaterModeSupportedModes : public SubscribeAttribute { +/* + * Command UnlockWithTimeout + */ +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeSupportedModes() - : SubscribeAttribute("supported-modes") - { - } - - ~SubscribeAttributeWaterHeaterModeSupportedModes() + DoorLockUnlockWithTimeout() + : ClusterCommand("unlock-with-timeout") { + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockWithTimeoutWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSupportedModesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.SupportedModes response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; +}; /* - * Attribute CurrentMode + * Command SetWeekDaySchedule */ -class ReadWaterHeaterModeCurrentMode : public ReadAttribute { +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - ReadWaterHeaterModeCurrentMode() - : ReadAttribute("current-mode") - { - } - - ~ReadWaterHeaterModeCurrentMode() + DoorLockSetWeekDaySchedule() + : ClusterCommand("set-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode CurrentMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; + params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; + params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; + params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; + params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeekDayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; -class SubscribeAttributeWaterHeaterModeCurrentMode : public SubscribeAttribute { +/* + * Command GetWeekDaySchedule + */ +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeCurrentMode() - : SubscribeAttribute("current-mode") - { - } - - ~SubscribeAttributeWaterHeaterModeCurrentMode() + DoorLockGetWeekDaySchedule() + : ClusterCommand("get-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeekDayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeCurrentModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; +}; /* - * Attribute StartUpMode + * Command ClearWeekDaySchedule */ -class ReadWaterHeaterModeStartUpMode : public ReadAttribute { +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - ReadWaterHeaterModeStartUpMode() - : ReadAttribute("start-up-mode") - { - } - - ~ReadWaterHeaterModeStartUpMode() + DoorLockClearWeekDaySchedule() + : ClusterCommand("clear-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode StartUpMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeekDayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; -class WriteWaterHeaterModeStartUpMode : public WriteAttribute { +/* + * Command SetYearDaySchedule + */ +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - WriteWaterHeaterModeStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWaterHeaterModeStartUpMode() + DoorLockSetYearDaySchedule() + : ClusterCommand("set-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setYearDayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WaterHeaterMode StartUpMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; -class SubscribeAttributeWaterHeaterModeStartUpMode : public SubscribeAttribute { +/* + * Command GetYearDaySchedule + */ +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeStartUpMode() - : SubscribeAttribute("start-up-mode") - { - } - - ~SubscribeAttributeWaterHeaterModeStartUpMode() + DoorLockGetYearDaySchedule() + : ClusterCommand("get-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getYearDayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeStartUpModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.StartUpMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; +}; /* - * Attribute OnMode + * Command ClearYearDaySchedule */ -class ReadWaterHeaterModeOnMode : public ReadAttribute { +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - ReadWaterHeaterModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadWaterHeaterModeOnMode() + DoorLockClearYearDaySchedule() + : ClusterCommand("clear-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearYearDayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; -class WriteWaterHeaterModeOnMode : public WriteAttribute { +/* + * Command SetHolidaySchedule + */ +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - WriteWaterHeaterModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWaterHeaterModeOnMode() + DoorLockSetHolidaySchedule() + : ClusterCommand("set-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setHolidayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WaterHeaterMode OnMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; -class SubscribeAttributeWaterHeaterModeOnMode : public SubscribeAttribute { +/* + * Command GetHolidaySchedule + */ +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeOnMode() - : SubscribeAttribute("on-mode") + DoorLockGetHolidaySchedule() + : ClusterCommand("get-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeWaterHeaterModeOnMode() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getHolidayScheduleWithParams:params completion: + ^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; +}; + +/* + * Command ClearHolidaySchedule + */ +class DoorLockClearHolidaySchedule : public ClusterCommand { +public: + DoorLockClearHolidaySchedule() + : ClusterCommand("clear-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearHolidayScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.OnMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; +}; /* - * Attribute GeneratedCommandList + * Command SetUser */ -class ReadWaterHeaterModeGeneratedCommandList : public ReadAttribute { +class DoorLockSetUser : public ClusterCommand { public: - ReadWaterHeaterModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + DoorLockSetUser() + : ClusterCommand("set-user") { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); + ClusterCommand::AddArguments(); } - ~ReadWaterHeaterModeGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + if (mRequest.userName.IsNull()) { + params.userName = nil; + } else { + params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() length:mRequest.userName.Value().size() encoding:NSUTF8StringEncoding]; + } + if (mRequest.userUniqueID.IsNull()) { + params.userUniqueID = nil; + } else { + params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; + } + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + if (mRequest.credentialRule.IsNull()) { + params.credentialRule = nil; + } else { + params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setUserWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; +}; + +/* + * Command GetUser + */ +class DoorLockGetUser : public ClusterCommand { +public: + DoorLockGetUser() + : ClusterCommand("get-user") { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getUserWithParams:params completion: + ^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; -class SubscribeAttributeWaterHeaterModeGeneratedCommandList : public SubscribeAttribute { +/* + * Command ClearUser + */ +class DoorLockClearUser : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + DoorLockClearUser() + : ClusterCommand("clear-user") { + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeWaterHeaterModeGeneratedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearUserWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; +}; + +/* + * Command SetCredential + */ +class DoorLockSetCredential : public ClusterCommand { +public: + DoorLockSetCredential() + : ClusterCommand("set-credential") + , mComplex_Credential(&mRequest.credential) { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; + if (mRequest.userIndex.IsNull()) { + params.userIndex = nil; + } else { + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setCredentialWithParams:params completion: + ^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; +}; /* - * Attribute AcceptedCommandList + * Command GetCredentialStatus */ -class ReadWaterHeaterModeAcceptedCommandList : public ReadAttribute { +class DoorLockGetCredentialStatus : public ClusterCommand { public: - ReadWaterHeaterModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + DoorLockGetCredentialStatus() + : ClusterCommand("get-credential-status") + , mComplex_Credential(&mRequest.credential) { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); } - ~ReadWaterHeaterModeAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getCredentialStatusWithParams:params completion: + ^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; +}; + +/* + * Command ClearCredential + */ +class DoorLockClearCredential : public ClusterCommand { +public: + DoorLockClearCredential() + : ClusterCommand("clear-credential") + , mComplex_Credential(&mRequest.credential) { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WaterHeaterMode AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.credential.IsNull()) { + params.credential = nil; + } else { + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearCredentialWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> mComplex_Credential; }; -class SubscribeAttributeWaterHeaterModeAcceptedCommandList : public SubscribeAttribute { +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnboltDoor + */ +class DoorLockUnboltDoor : public ClusterCommand { public: - SubscribeAttributeWaterHeaterModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + DoorLockUnboltDoor() + : ClusterCommand("unbolt-door") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PINCode", &mRequest.PINCode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~SubscribeAttributeWaterHeaterModeAcceptedCommandList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unboltDoorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetAliroReaderConfig + */ +class DoorLockSetAliroReaderConfig : public ClusterCommand { +public: + DoorLockSetAliroReaderConfig() + : ClusterCommand("set-aliro-reader-config") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("SigningKey", &mRequest.signingKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VerificationKey", &mRequest.verificationKey); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupIdentifier", &mRequest.groupIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("GroupResolvingKey", &mRequest.groupResolvingKey); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.signingKey = [NSData dataWithBytes:mRequest.signingKey.data() length:mRequest.signingKey.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.data() length:mRequest.verificationKey.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.groupIdentifier = [NSData dataWithBytes:mRequest.groupIdentifier.data() length:mRequest.groupIdentifier.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.groupResolvingKey.HasValue()) { + params.groupResolvingKey = [NSData dataWithBytes:mRequest.groupResolvingKey.Value().data() length:mRequest.groupResolvingKey.Value().size()]; + } else { + params.groupResolvingKey = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setAliroReaderConfigWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/* + * Command ClearAliroReaderConfig + */ +class DoorLockClearAliroReaderConfig : public ClusterCommand { +public: + DoorLockClearAliroReaderConfig() + : ClusterCommand("clear-aliro-reader-config") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearAliroReaderConfigWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute LockState */ -class ReadWaterHeaterModeEventList : public ReadAttribute { +class ReadDoorLockLockState : public ReadAttribute { public: - ReadWaterHeaterModeEventList() - : ReadAttribute("event-list") + ReadDoorLockLockState() + : ReadAttribute("lock-state") { } - ~ReadWaterHeaterModeEventList() + ~ReadDoorLockLockState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterMode EventList read Error", error); + LogNSError("DoorLock LockState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91912,25 +92312,25 @@ class ReadWaterHeaterModeEventList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterModeEventList : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDoorLockLockState() + : SubscribeAttribute("lock-state") { } - ~SubscribeAttributeWaterHeaterModeEventList() + ~SubscribeAttributeDoorLockLockState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -91941,10 +92341,10 @@ class SubscribeAttributeWaterHeaterModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeLockStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -91957,38 +92357,35 @@ class SubscribeAttributeWaterHeaterModeEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute LockType */ -class ReadWaterHeaterModeAttributeList : public ReadAttribute { +class ReadDoorLockLockType : public ReadAttribute { public: - ReadWaterHeaterModeAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockLockType() + : ReadAttribute("lock-type") { } - ~ReadWaterHeaterModeAttributeList() + ~ReadDoorLockLockType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterMode AttributeList read Error", error); + LogNSError("DoorLock LockType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -91997,25 +92394,25 @@ class ReadWaterHeaterModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockLockType() + : SubscribeAttribute("lock-type") { } - ~SubscribeAttributeWaterHeaterModeAttributeList() + ~SubscribeAttributeDoorLockLockType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92026,10 +92423,10 @@ class SubscribeAttributeWaterHeaterModeAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeLockTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92042,38 +92439,35 @@ class SubscribeAttributeWaterHeaterModeAttributeList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute ActuatorEnabled */ -class ReadWaterHeaterModeFeatureMap : public ReadAttribute { +class ReadDoorLockActuatorEnabled : public ReadAttribute { public: - ReadWaterHeaterModeFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockActuatorEnabled() + : ReadAttribute("actuator-enabled") { } - ~ReadWaterHeaterModeFeatureMap() + ~ReadDoorLockActuatorEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterMode FeatureMap read Error", error); + LogNSError("DoorLock ActuatorEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92082,25 +92476,25 @@ class ReadWaterHeaterModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockActuatorEnabled() + : SubscribeAttribute("actuator-enabled") { } - ~SubscribeAttributeWaterHeaterModeFeatureMap() + ~SubscribeAttributeDoorLockActuatorEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92111,10 +92505,10 @@ class SubscribeAttributeWaterHeaterModeFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeActuatorEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92127,38 +92521,35 @@ class SubscribeAttributeWaterHeaterModeFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute DoorState */ -class ReadWaterHeaterModeClusterRevision : public ReadAttribute { +class ReadDoorLockDoorState : public ReadAttribute { public: - ReadWaterHeaterModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockDoorState() + : ReadAttribute("door-state") { } - ~ReadWaterHeaterModeClusterRevision() + ~ReadDoorLockDoorState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WaterHeaterMode ClusterRevision read Error", error); + LogNSError("DoorLock DoorState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92167,25 +92558,25 @@ class ReadWaterHeaterModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWaterHeaterModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { public: - SubscribeAttributeWaterHeaterModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockDoorState() + : SubscribeAttribute("door-state") { } - ~SubscribeAttributeWaterHeaterModeClusterRevision() + ~SubscribeAttributeDoorLockDoorState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WaterHeaterMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WaterHeaterMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWaterHeaterMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92196,10 +92587,10 @@ class SubscribeAttributeWaterHeaterModeClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeDoorStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WaterHeaterMode.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.DoorState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92212,148 +92603,103 @@ class SubscribeAttributeWaterHeaterModeClusterRevision : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster DeviceEnergyManagementMode | 0x009F | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL /* - * Command ChangeToMode + * Attribute DoorOpenEvents */ -class DeviceEnergyManagementModeChangeToMode : public ClusterCommand { +class ReadDoorLockDoorOpenEvents : public ReadAttribute { public: - DeviceEnergyManagementModeChangeToMode() - : ClusterCommand("change-to-mode") + ReadDoorLockDoorOpenEvents() + : ReadAttribute("door-open-events") + { + } + + ~ReadDoorLockDoorOpenEvents() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDeviceEnergyManagementModeClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params completion: - ^(MTRDeviceEnergyManagementModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToModeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock DoorOpenEvents read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DeviceEnergyManagementMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute SupportedModes - */ -class ReadDeviceEnergyManagementModeSupportedModes : public ReadAttribute { +class WriteDoorLockDoorOpenEvents : public WriteAttribute { public: - ReadDeviceEnergyManagementModeSupportedModes() - : ReadAttribute("supported-modes") + WriteDoorLockDoorOpenEvents() + : WriteAttribute("door-open-events") { + AddArgument("attr-name", "door-open-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadDeviceEnergyManagementModeSupportedModes() + ~WriteDoorLockDoorOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::SupportedModes::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.SupportedModes response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DeviceEnergyManagementMode SupportedModes read Error", error); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint32_t mValue; }; -class SubscribeAttributeDeviceEnergyManagementModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeDoorLockDoorOpenEvents() + : SubscribeAttribute("door-open-events") { } - ~SubscribeAttributeDeviceEnergyManagementModeSupportedModes() + ~SubscribeAttributeDoorLockDoorOpenEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::SupportedModes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92364,10 +92710,10 @@ class SubscribeAttributeDeviceEnergyManagementModeSupportedModes : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeDoorOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92380,38 +92726,35 @@ class SubscribeAttributeDeviceEnergyManagementModeSupportedModes : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CurrentMode + * Attribute DoorClosedEvents */ -class ReadDeviceEnergyManagementModeCurrentMode : public ReadAttribute { +class ReadDoorLockDoorClosedEvents : public ReadAttribute { public: - ReadDeviceEnergyManagementModeCurrentMode() - : ReadAttribute("current-mode") + ReadDoorLockDoorClosedEvents() + : ReadAttribute("door-closed-events") { } - ~ReadDeviceEnergyManagementModeCurrentMode() + ~ReadDoorLockDoorClosedEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::CurrentMode::Id; - + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.CurrentMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode CurrentMode read Error", error); + LogNSError("DoorLock DoorClosedEvents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92420,25 +92763,66 @@ class ReadDeviceEnergyManagementModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeCurrentMode : public SubscribeAttribute { +class WriteDoorLockDoorClosedEvents : public WriteAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeCurrentMode() - : SubscribeAttribute("current-mode") + WriteDoorLockDoorClosedEvents() + : WriteAttribute("door-closed-events") { + AddArgument("attr-name", "door-closed-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDeviceEnergyManagementModeCurrentMode() + ~WriteDoorLockDoorClosedEvents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::CurrentMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorClosedEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorClosedEvents() + : SubscribeAttribute("door-closed-events") + { + } + + ~SubscribeAttributeDoorLockDoorClosedEvents() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92449,10 +92833,10 @@ class SubscribeAttributeDeviceEnergyManagementModeCurrentMode : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeDoorClosedEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.CurrentMode response %@", [value description]); + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92465,38 +92849,35 @@ class SubscribeAttributeDeviceEnergyManagementModeCurrentMode : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute StartUpMode + * Attribute OpenPeriod */ -class ReadDeviceEnergyManagementModeStartUpMode : public ReadAttribute { +class ReadDoorLockOpenPeriod : public ReadAttribute { public: - ReadDeviceEnergyManagementModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadDoorLockOpenPeriod() + : ReadAttribute("open-period") { } - ~ReadDeviceEnergyManagementModeStartUpMode() + ~ReadDoorLockOpenPeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.StartUpMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode StartUpMode read Error", error); + LogNSError("DoorLock OpenPeriod read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92505,39 +92886,36 @@ class ReadDeviceEnergyManagementModeStartUpMode : public ReadAttribute { } }; -class WriteDeviceEnergyManagementModeStartUpMode : public WriteAttribute { +class WriteDoorLockOpenPeriod : public WriteAttribute { public: - WriteDeviceEnergyManagementModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteDoorLockOpenPeriod() + : WriteAttribute("open-period") { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteDeviceEnergyManagementModeStartUpMode() + ~WriteDoorLockOpenPeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DeviceEnergyManagementMode StartUpMode write Error", error); + LogNSError("DoorLock OpenPeriod write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92546,28 +92924,28 @@ class WriteDeviceEnergyManagementModeStartUpMode : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint16_t mValue; }; -class SubscribeAttributeDeviceEnergyManagementModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeDoorLockOpenPeriod() + : SubscribeAttribute("open-period") { } - ~SubscribeAttributeDeviceEnergyManagementModeStartUpMode() + ~SubscribeAttributeDoorLockOpenPeriod() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::StartUpMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92578,10 +92956,10 @@ class SubscribeAttributeDeviceEnergyManagementModeStartUpMode : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.StartUpMode response %@", [value description]); + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92594,38 +92972,35 @@ class SubscribeAttributeDeviceEnergyManagementModeStartUpMode : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OnMode + * Attribute NumberOfTotalUsersSupported */ -class ReadDeviceEnergyManagementModeOnMode : public ReadAttribute { +class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { public: - ReadDeviceEnergyManagementModeOnMode() - : ReadAttribute("on-mode") + ReadDoorLockNumberOfTotalUsersSupported() + : ReadAttribute("number-of-total-users-supported") { } - ~ReadDeviceEnergyManagementModeOnMode() + ~ReadDoorLockNumberOfTotalUsersSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.OnMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode OnMode read Error", error); + LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92634,69 +93009,107 @@ class ReadDeviceEnergyManagementModeOnMode : public ReadAttribute { } }; -class WriteDeviceEnergyManagementModeOnMode : public WriteAttribute { +class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { public: - WriteDeviceEnergyManagementModeOnMode() - : WriteAttribute("on-mode") + SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + : SubscribeAttribute("number-of-total-users-supported") { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteDeviceEnergyManagementModeOnMode() + ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DeviceEnergyManagementMode OnMode write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute NumberOfPINUsersSupported + */ +class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { +public: + ReadDoorLockNumberOfPINUsersSupported() + : ReadAttribute("number-of-pinusers-supported") + { + } + + ~ReadDoorLockNumberOfPINUsersSupported() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeDeviceEnergyManagementModeOnMode : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeDoorLockNumberOfPINUsersSupported() + : SubscribeAttribute("number-of-pinusers-supported") { } - ~SubscribeAttributeDeviceEnergyManagementModeOnMode() + ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::OnMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92707,10 +93120,10 @@ class SubscribeAttributeDeviceEnergyManagementModeOnMode : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.OnMode response %@", [value description]); + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92723,38 +93136,35 @@ class SubscribeAttributeDeviceEnergyManagementModeOnMode : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute NumberOfRFIDUsersSupported */ -class ReadDeviceEnergyManagementModeGeneratedCommandList : public ReadAttribute { +class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { public: - ReadDeviceEnergyManagementModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockNumberOfRFIDUsersSupported() + : ReadAttribute("number-of-rfidusers-supported") { } - ~ReadDeviceEnergyManagementModeGeneratedCommandList() + ~ReadDoorLockNumberOfRFIDUsersSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode GeneratedCommandList read Error", error); + LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92763,25 +93173,25 @@ class ReadDeviceEnergyManagementModeGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + : SubscribeAttribute("number-of-rfidusers-supported") { } - ~SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList() + ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92792,10 +93202,10 @@ class SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92808,38 +93218,35 @@ class SubscribeAttributeDeviceEnergyManagementModeGeneratedCommandList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute NumberOfWeekDaySchedulesSupportedPerUser */ -class ReadDeviceEnergyManagementModeAcceptedCommandList : public ReadAttribute { +class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadDeviceEnergyManagementModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-week-day-schedules-supported-per-user") { } - ~ReadDeviceEnergyManagementModeAcceptedCommandList() + ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode AcceptedCommandList read Error", error); + LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92848,25 +93255,25 @@ class ReadDeviceEnergyManagementModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") { } - ~SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList() + ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92877,10 +93284,10 @@ class SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92893,38 +93300,35 @@ class SubscribeAttributeDeviceEnergyManagementModeAcceptedCommandList : public S } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute NumberOfYearDaySchedulesSupportedPerUser */ -class ReadDeviceEnergyManagementModeEventList : public ReadAttribute { +class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadDeviceEnergyManagementModeEventList() - : ReadAttribute("event-list") + ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-year-day-schedules-supported-per-user") { } - ~ReadDeviceEnergyManagementModeEventList() + ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode EventList read Error", error); + LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -92933,25 +93337,25 @@ class ReadDeviceEnergyManagementModeEventList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeEventList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") { } - ~SubscribeAttributeDeviceEnergyManagementModeEventList() + ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -92962,10 +93366,10 @@ class SubscribeAttributeDeviceEnergyManagementModeEventList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -92978,38 +93382,35 @@ class SubscribeAttributeDeviceEnergyManagementModeEventList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute NumberOfHolidaySchedulesSupported */ -class ReadDeviceEnergyManagementModeAttributeList : public ReadAttribute { +class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { public: - ReadDeviceEnergyManagementModeAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockNumberOfHolidaySchedulesSupported() + : ReadAttribute("number-of-holiday-schedules-supported") { } - ~ReadDeviceEnergyManagementModeAttributeList() + ~ReadDoorLockNumberOfHolidaySchedulesSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode AttributeList read Error", error); + LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93018,25 +93419,25 @@ class ReadDeviceEnergyManagementModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + : SubscribeAttribute("number-of-holiday-schedules-supported") { } - ~SubscribeAttributeDeviceEnergyManagementModeAttributeList() + ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -93047,10 +93448,10 @@ class SubscribeAttributeDeviceEnergyManagementModeAttributeList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93063,38 +93464,35 @@ class SubscribeAttributeDeviceEnergyManagementModeAttributeList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute MaxPINCodeLength */ -class ReadDeviceEnergyManagementModeFeatureMap : public ReadAttribute { +class ReadDoorLockMaxPINCodeLength : public ReadAttribute { public: - ReadDeviceEnergyManagementModeFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockMaxPINCodeLength() + : ReadAttribute("max-pincode-length") { } - ~ReadDeviceEnergyManagementModeFeatureMap() + ~ReadDoorLockMaxPINCodeLength() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode FeatureMap read Error", error); + LogNSError("DoorLock MaxPINCodeLength read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93103,25 +93501,25 @@ class ReadDeviceEnergyManagementModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockMaxPINCodeLength() + : SubscribeAttribute("max-pincode-length") { } - ~SubscribeAttributeDeviceEnergyManagementModeFeatureMap() + ~SubscribeAttributeDoorLockMaxPINCodeLength() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -93132,10 +93530,10 @@ class SubscribeAttributeDeviceEnergyManagementModeFeatureMap : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93148,38 +93546,35 @@ class SubscribeAttributeDeviceEnergyManagementModeFeatureMap : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute MinPINCodeLength */ -class ReadDeviceEnergyManagementModeClusterRevision : public ReadAttribute { +class ReadDoorLockMinPINCodeLength : public ReadAttribute { public: - ReadDeviceEnergyManagementModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockMinPINCodeLength() + : ReadAttribute("min-pincode-length") { } - ~ReadDeviceEnergyManagementModeClusterRevision() + ~ReadDoorLockMinPINCodeLength() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DeviceEnergyManagementMode ClusterRevision read Error", error); + LogNSError("DoorLock MinPINCodeLength read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -93188,25 +93583,25 @@ class ReadDeviceEnergyManagementModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDeviceEnergyManagementModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeDeviceEnergyManagementModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDoorLockMinPINCodeLength() + : SubscribeAttribute("min-pincode-length") { } - ~SubscribeAttributeDeviceEnergyManagementModeClusterRevision() + ~SubscribeAttributeDoorLockMinPINCodeLength() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DeviceEnergyManagementMode::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DeviceEnergyManagementMode::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDeviceEnergyManagementMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -93217,10 +93612,10 @@ class SubscribeAttributeDeviceEnergyManagementModeClusterRevision : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DeviceEnergyManagementMode.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -93233,1324 +93628,673 @@ class SubscribeAttributeDeviceEnergyManagementModeClusterRevision : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | -|------------------------------------------------------------------------------| -| Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -| * UnboltDoor | 0x27 | -| * SetAliroReaderConfig | 0x28 | -| * ClearAliroReaderConfig | 0x29 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | -| * AliroReaderVerificationKey | 0x0080 | -| * AliroReaderGroupIdentifier | 0x0081 | -| * AliroReaderGroupSubIdentifier | 0x0082 | -| * AliroExpeditedTransactionSupportedProtocolVersions | 0x0083 | -| * AliroGroupResolvingKey | 0x0084 | -| * AliroSupportedBLEUWBProtocolVersions | 0x0085 | -| * AliroBLEAdvertisingVersion | 0x0086 | -| * NumberOfAliroCredentialIssuerKeysSupported | 0x0087 | -| * NumberOfAliroEndpointKeysSupported | 0x0088 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | -\*----------------------------------------------------------------------------*/ - /* - * Command LockDoor + * Attribute MaxRFIDCodeLength */ -class DoorLockLockDoor : public ClusterCommand { +class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { public: - DoorLockLockDoor() - : ClusterCommand("lock-door") + ReadDoorLockMaxRFIDCodeLength() + : ReadAttribute("max-rfidcode-length") + { + } + + ~ReadDoorLockMaxRFIDCodeLength() { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::LockDoor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster lockDoorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; -/* - * Command UnlockDoor - */ -class DoorLockUnlockDoor : public ClusterCommand { +class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { public: - DoorLockUnlockDoor() - : ClusterCommand("unlock-door") + SubscribeAttributeDoorLockMaxRFIDCodeLength() + : SubscribeAttribute("max-rfidcode-length") + { + } + + ~SubscribeAttributeDoorLockMaxRFIDCodeLength() { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockDoor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockDoorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command UnlockWithTimeout + * Attribute MinRFIDCodeLength */ -class DoorLockUnlockWithTimeout : public ClusterCommand { +class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { public: - DoorLockUnlockWithTimeout() - : ClusterCommand("unlock-with-timeout") + ReadDoorLockMinRFIDCodeLength() + : ReadAttribute("min-rfidcode-length") + { + } + + ~ReadDoorLockMinRFIDCodeLength() { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockWithTimeoutWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock MinRFIDCodeLength read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; -/* - * Command SetWeekDaySchedule - */ -class DoorLockSetWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { public: - DoorLockSetWeekDaySchedule() - : ClusterCommand("set-week-day-schedule") + SubscribeAttributeDoorLockMinRFIDCodeLength() + : SubscribeAttribute("min-rfidcode-length") + { + } + + ~SubscribeAttributeDoorLockMinRFIDCodeLength() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; - params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; - params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; - params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; - params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeekDayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; /* - * Command GetWeekDaySchedule + * Attribute CredentialRulesSupport */ -class DoorLockGetWeekDaySchedule : public ClusterCommand { +class ReadDoorLockCredentialRulesSupport : public ReadAttribute { public: - DoorLockGetWeekDaySchedule() - : ClusterCommand("get-week-day-schedule") + ReadDoorLockCredentialRulesSupport() + : ReadAttribute("credential-rules-support") + { + } + + ~ReadDoorLockCredentialRulesSupport() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeekDayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock CredentialRulesSupport read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; -/* - * Command ClearWeekDaySchedule - */ -class DoorLockClearWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { public: - DoorLockClearWeekDaySchedule() - : ClusterCommand("clear-week-day-schedule") + SubscribeAttributeDoorLockCredentialRulesSupport() + : SubscribeAttribute("credential-rules-support") + { + } + + ~SubscribeAttributeDoorLockCredentialRulesSupport() { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeekDayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCredentialRulesSupportWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; /* - * Command SetYearDaySchedule + * Attribute NumberOfCredentialsSupportedPerUser */ -class DoorLockSetYearDaySchedule : public ClusterCommand { +class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { public: - DoorLockSetYearDaySchedule() - : ClusterCommand("set-year-day-schedule") + ReadDoorLockNumberOfCredentialsSupportedPerUser() + : ReadAttribute("number-of-credentials-supported-per-user") + { + } + + ~ReadDoorLockNumberOfCredentialsSupportedPerUser() { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setYearDayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; -/* - * Command GetYearDaySchedule - */ -class DoorLockGetYearDaySchedule : public ClusterCommand { +class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { public: - DoorLockGetYearDaySchedule() - : ClusterCommand("get-year-day-schedule") - { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + : SubscribeAttribute("number-of-credentials-supported-per-user") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getYearDayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; -}; - -/* - * Command ClearYearDaySchedule - */ -class DoorLockClearYearDaySchedule : public ClusterCommand { -public: - DoorLockClearYearDaySchedule() - : ClusterCommand("clear-year-day-schedule") + ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearYearDayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; /* - * Command SetHolidaySchedule + * Attribute Language */ -class DoorLockSetHolidaySchedule : public ClusterCommand { +class ReadDoorLockLanguage : public ReadAttribute { public: - DoorLockSetHolidaySchedule() - : ClusterCommand("set-holiday-schedule") - { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadDoorLockLanguage() + : ReadAttribute("language") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setHolidayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; -}; - -/* - * Command GetHolidaySchedule - */ -class DoorLockGetHolidaySchedule : public ClusterCommand { -public: - DoorLockGetHolidaySchedule() - : ClusterCommand("get-holiday-schedule") + ~ReadDoorLockLanguage() { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getHolidayScheduleWithParams:params completion: - ^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock Language read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; -/* - * Command ClearHolidaySchedule - */ -class DoorLockClearHolidaySchedule : public ClusterCommand { +class WriteDoorLockLanguage : public WriteAttribute { public: - DoorLockClearHolidaySchedule() - : ClusterCommand("clear-holiday-schedule") + WriteDoorLockLanguage() + : WriteAttribute("language") + { + AddArgument("attr-name", "language"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteDoorLockLanguage() { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearHolidayScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLanguageWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; + chip::ByteSpan mValue; }; -/* - * Command SetUser - */ -class DoorLockSetUser : public ClusterCommand { +class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { public: - DoorLockSetUser() - : ClusterCommand("set-user") + SubscribeAttributeDoorLockLanguage() + : SubscribeAttribute("language") + { + } + + ~SubscribeAttributeDoorLockLanguage() { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetUser::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - if (mRequest.userName.IsNull()) { - params.userName = nil; - } else { - params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() length:mRequest.userName.Value().size() encoding:NSUTF8StringEncoding]; - } - if (mRequest.userUniqueID.IsNull()) { - params.userUniqueID = nil; - } else { - params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - if (mRequest.credentialRule.IsNull()) { - params.credentialRule = nil; - } else { - params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUserWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLanguageWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command GetUser + * Attribute LEDSettings */ -class DoorLockGetUser : public ClusterCommand { +class ReadDoorLockLEDSettings : public ReadAttribute { public: - DoorLockGetUser() - : ClusterCommand("get-user") - { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadDoorLockLEDSettings() + : ReadAttribute("ledsettings") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetUser::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getUserWithParams:params completion: - ^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetUserResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; -}; - -/* - * Command ClearUser - */ -class DoorLockClearUser : public ClusterCommand { -public: - DoorLockClearUser() - : ClusterCommand("clear-user") + ~ReadDoorLockLEDSettings() { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearUserWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock LEDSettings read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; -/* - * Command SetCredential - */ -class DoorLockSetCredential : public ClusterCommand { +class WriteDoorLockLEDSettings : public WriteAttribute { public: - DoorLockSetCredential() - : ClusterCommand("set-credential") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + WriteDoorLockLEDSettings() + : WriteAttribute("ledsettings") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetCredential::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; - if (mRequest.userIndex.IsNull()) { - params.userIndex = nil; - } else { - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCredentialWithParams:params completion: - ^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; + AddArgument("attr-name", "ledsettings"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } -private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command GetCredentialStatus - */ -class DoorLockGetCredentialStatus : public ClusterCommand { -public: - DoorLockGetCredentialStatus() - : ClusterCommand("get-credential-status") - , mComplex_Credential(&mRequest.credential) + ~WriteDoorLockLEDSettings() { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getCredentialStatusWithParams:params completion: - ^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLEDSettingsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; + uint8_t mValue; }; -/* - * Command ClearCredential - */ -class DoorLockClearCredential : public ClusterCommand { +class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { public: - DoorLockClearCredential() - : ClusterCommand("clear-credential") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeDoorLockLEDSettings() + : SubscribeAttribute("ledsettings") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearCredential::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.credential.IsNull()) { - params.credential = nil; - } else { - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearCredentialWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> mComplex_Credential; -}; - -#if MTR_ENABLE_PROVISIONAL -/* - * Command UnboltDoor - */ -class DoorLockUnboltDoor : public ClusterCommand { -public: - DoorLockUnboltDoor() - : ClusterCommand("unbolt-door") + ~SubscribeAttributeDoorLockLEDSettings() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("PINCode", &mRequest.PINCode); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::UnboltDoor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unboltDoorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLEDSettingsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command SetAliroReaderConfig + * Attribute AutoRelockTime */ -class DoorLockSetAliroReaderConfig : public ClusterCommand { +class ReadDoorLockAutoRelockTime : public ReadAttribute { public: - DoorLockSetAliroReaderConfig() - : ClusterCommand("set-aliro-reader-config") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("SigningKey", &mRequest.signingKey); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("VerificationKey", &mRequest.verificationKey); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupIdentifier", &mRequest.groupIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("GroupResolvingKey", &mRequest.groupResolvingKey); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadDoorLockAutoRelockTime() + : ReadAttribute("auto-relock-time") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.signingKey = [NSData dataWithBytes:mRequest.signingKey.data() length:mRequest.signingKey.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.verificationKey = [NSData dataWithBytes:mRequest.verificationKey.data() length:mRequest.verificationKey.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.groupIdentifier = [NSData dataWithBytes:mRequest.groupIdentifier.data() length:mRequest.groupIdentifier.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.groupResolvingKey.HasValue()) { - params.groupResolvingKey = [NSData dataWithBytes:mRequest.groupResolvingKey.Value().data() length:mRequest.groupResolvingKey.Value().size()]; - } else { - params.groupResolvingKey = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setAliroReaderConfigWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ClearAliroReaderConfig - */ -class DoorLockClearAliroReaderConfig : public ClusterCommand { -public: - DoorLockClearAliroReaderConfig() - : ClusterCommand("clear-aliro-reader-config") + ~ReadDoorLockAutoRelockTime() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearAliroReaderConfigWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("DoorLock AutoRelockTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute LockState - */ -class ReadDoorLockLockState : public ReadAttribute { +class WriteDoorLockAutoRelockTime : public WriteAttribute { public: - ReadDoorLockLockState() - : ReadAttribute("lock-state") + WriteDoorLockAutoRelockTime() + : WriteAttribute("auto-relock-time") { + AddArgument("attr-name", "auto-relock-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadDoorLockLockState() + ~WriteDoorLockAutoRelockTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock LockState read Error", error); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeAutoRelockTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint32_t mValue; }; -class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { +class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLockState() - : SubscribeAttribute("lock-state") + SubscribeAttributeDoorLockAutoRelockTime() + : SubscribeAttribute("auto-relock-time") { } - ~SubscribeAttributeDoorLockLockState() + ~SubscribeAttributeDoorLockAutoRelockTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -94565,10 +94309,10 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockStateWithParams:params + [cluster subscribeAttributeAutoRelockTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94582,34 +94326,34 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { }; /* - * Attribute LockType + * Attribute SoundVolume */ -class ReadDoorLockLockType : public ReadAttribute { +class ReadDoorLockSoundVolume : public ReadAttribute { public: - ReadDoorLockLockType() - : ReadAttribute("lock-type") + ReadDoorLockSoundVolume() + : ReadAttribute("sound-volume") { } - ~ReadDoorLockLockType() + ~ReadDoorLockSoundVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); + [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock LockType read Error", error); + LogNSError("DoorLock SoundVolume read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94618,21 +94362,62 @@ class ReadDoorLockLockType : public ReadAttribute { } }; -class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { +class WriteDoorLockSoundVolume : public WriteAttribute { public: - SubscribeAttributeDoorLockLockType() - : SubscribeAttribute("lock-type") + WriteDoorLockSoundVolume() + : WriteAttribute("sound-volume") { + AddArgument("attr-name", "sound-volume"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockLockType() + ~WriteDoorLockSoundVolume() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LockType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSoundVolumeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSoundVolume() + : SubscribeAttribute("sound-volume") + { + } + + ~SubscribeAttributeDoorLockSoundVolume() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -94647,10 +94432,10 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockTypeWithParams:params + [cluster subscribeAttributeSoundVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94664,34 +94449,34 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { }; /* - * Attribute ActuatorEnabled + * Attribute OperatingMode */ -class ReadDoorLockActuatorEnabled : public ReadAttribute { +class ReadDoorLockOperatingMode : public ReadAttribute { public: - ReadDoorLockActuatorEnabled() - : ReadAttribute("actuator-enabled") + ReadDoorLockOperatingMode() + : ReadAttribute("operating-mode") { } - ~ReadDoorLockActuatorEnabled() + ~ReadDoorLockOperatingMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ActuatorEnabled read Error", error); + LogNSError("DoorLock OperatingMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94700,39 +94485,80 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { } }; -class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { +class WriteDoorLockOperatingMode : public WriteAttribute { public: - SubscribeAttributeDoorLockActuatorEnabled() - : SubscribeAttribute("actuator-enabled") + WriteDoorLockOperatingMode() + : WriteAttribute("operating-mode") { + AddArgument("attr-name", "operating-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockActuatorEnabled() + ~WriteDoorLockOperatingMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ActuatorEnabled::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperatingModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOperatingMode() + : SubscribeAttribute("operating-mode") + { + } + + ~SubscribeAttributeDoorLockOperatingMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActuatorEnabledWithParams:params + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94746,34 +94572,34 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { }; /* - * Attribute DoorState + * Attribute SupportedOperatingModes */ -class ReadDoorLockDoorState : public ReadAttribute { +class ReadDoorLockSupportedOperatingModes : public ReadAttribute { public: - ReadDoorLockDoorState() - : ReadAttribute("door-state") + ReadDoorLockSupportedOperatingModes() + : ReadAttribute("supported-operating-modes") { } - ~ReadDoorLockDoorState() + ~ReadDoorLockSupportedOperatingModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorState read Error", error); + LogNSError("DoorLock SupportedOperatingModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94782,21 +94608,21 @@ class ReadDoorLockDoorState : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { +class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorState() - : SubscribeAttribute("door-state") + SubscribeAttributeDoorLockSupportedOperatingModes() + : SubscribeAttribute("supported-operating-modes") { } - ~SubscribeAttributeDoorLockDoorState() + ~SubscribeAttributeDoorLockSupportedOperatingModes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -94811,10 +94637,10 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorStateWithParams:params + [cluster subscribeAttributeSupportedOperatingModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94828,98 +94654,57 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { }; /* - * Attribute DoorOpenEvents + * Attribute DefaultConfigurationRegister */ -class ReadDoorLockDoorOpenEvents : public ReadAttribute { +class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { public: - ReadDoorLockDoorOpenEvents() - : ReadAttribute("door-open-events") + ReadDoorLockDefaultConfigurationRegister() + : ReadAttribute("default-configuration-register") { } - ~ReadDoorLockDoorOpenEvents() + ~ReadDoorLockDefaultConfigurationRegister() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorOpenEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockDoorOpenEvents : public WriteAttribute { -public: - WriteDoorLockDoorOpenEvents() - : WriteAttribute("door-open-events") - { - AddArgument("attr-name", "door-open-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorOpenEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeDoorOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); + LogNSError("DoorLock DefaultConfigurationRegister read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorOpenEvents() - : SubscribeAttribute("door-open-events") + SubscribeAttributeDoorLockDefaultConfigurationRegister() + : SubscribeAttribute("default-configuration-register") { } - ~SubscribeAttributeDoorLockDoorOpenEvents() + ~SubscribeAttributeDoorLockDefaultConfigurationRegister() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorOpenEvents::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -94934,10 +94719,10 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorOpenEventsWithParams:params + [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -94951,34 +94736,34 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { }; /* - * Attribute DoorClosedEvents + * Attribute EnableLocalProgramming */ -class ReadDoorLockDoorClosedEvents : public ReadAttribute { +class ReadDoorLockEnableLocalProgramming : public ReadAttribute { public: - ReadDoorLockDoorClosedEvents() - : ReadAttribute("door-closed-events") + ReadDoorLockEnableLocalProgramming() + : ReadAttribute("enable-local-programming") { } - ~ReadDoorLockDoorClosedEvents() + ~ReadDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DoorClosedEvents read Error", error); + LogNSError("DoorLock EnableLocalProgramming read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -94987,24 +94772,24 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { } }; -class WriteDoorLockDoorClosedEvents : public WriteAttribute { +class WriteDoorLockEnableLocalProgramming : public WriteAttribute { public: - WriteDoorLockDoorClosedEvents() - : WriteAttribute("door-closed-events") + WriteDoorLockEnableLocalProgramming() + : WriteAttribute("enable-local-programming") { - AddArgument("attr-name", "door-closed-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "enable-local-programming"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockDoorClosedEvents() + ~WriteDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95012,11 +94797,11 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeDoorClosedEventsWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); + LogNSError("DoorLock EnableLocalProgramming write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95025,24 +94810,24 @@ class WriteDoorLockDoorClosedEvents : public WriteAttribute { } private: - uint32_t mValue; + bool mValue; }; -class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorClosedEvents() - : SubscribeAttribute("door-closed-events") + SubscribeAttributeDoorLockEnableLocalProgramming() + : SubscribeAttribute("enable-local-programming") { } - ~SubscribeAttributeDoorLockDoorClosedEvents() + ~SubscribeAttributeDoorLockEnableLocalProgramming() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DoorClosedEvents::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95057,10 +94842,10 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorClosedEventsWithParams:params + [cluster subscribeAttributeEnableLocalProgrammingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95074,34 +94859,34 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { }; /* - * Attribute OpenPeriod + * Attribute EnableOneTouchLocking */ -class ReadDoorLockOpenPeriod : public ReadAttribute { +class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { public: - ReadDoorLockOpenPeriod() - : ReadAttribute("open-period") + ReadDoorLockEnableOneTouchLocking() + : ReadAttribute("enable-one-touch-locking") { } - ~ReadDoorLockOpenPeriod() + ~ReadDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock OpenPeriod read Error", error); + LogNSError("DoorLock EnableOneTouchLocking read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95110,24 +94895,24 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { } }; -class WriteDoorLockOpenPeriod : public WriteAttribute { +class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { public: - WriteDoorLockOpenPeriod() - : WriteAttribute("open-period") + WriteDoorLockEnableOneTouchLocking() + : WriteAttribute("enable-one-touch-locking") { - AddArgument("attr-name", "open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "enable-one-touch-locking"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockOpenPeriod() + ~WriteDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95135,11 +94920,11 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); + LogNSError("DoorLock EnableOneTouchLocking write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95148,24 +94933,24 @@ class WriteDoorLockOpenPeriod : public WriteAttribute { } private: - uint16_t mValue; + bool mValue; }; -class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { public: - SubscribeAttributeDoorLockOpenPeriod() - : SubscribeAttribute("open-period") + SubscribeAttributeDoorLockEnableOneTouchLocking() + : SubscribeAttribute("enable-one-touch-locking") { } - ~SubscribeAttributeDoorLockOpenPeriod() + ~SubscribeAttributeDoorLockEnableOneTouchLocking() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OpenPeriod::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95180,10 +94965,10 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOpenPeriodWithParams:params + [cluster subscribeAttributeEnableOneTouchLockingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95197,34 +94982,34 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { }; /* - * Attribute NumberOfTotalUsersSupported + * Attribute EnableInsideStatusLED */ -class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { +class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { public: - ReadDoorLockNumberOfTotalUsersSupported() - : ReadAttribute("number-of-total-users-supported") + ReadDoorLockEnableInsideStatusLED() + : ReadAttribute("enable-inside-status-led") { } - ~ReadDoorLockNumberOfTotalUsersSupported() + ~ReadDoorLockEnableInsideStatusLED() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + LogNSError("DoorLock EnableInsideStatusLED read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95233,21 +95018,62 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { +class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfTotalUsersSupported() - : SubscribeAttribute("number-of-total-users-supported") + WriteDoorLockEnableInsideStatusLED() + : WriteAttribute("enable-inside-status-led") { + AddArgument("attr-name", "enable-inside-status-led"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + ~WriteDoorLockEnableInsideStatusLED() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfTotalUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableInsideStatusLED write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableInsideStatusLED() + : SubscribeAttribute("enable-inside-status-led") + { + } + + ~SubscribeAttributeDoorLockEnableInsideStatusLED() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95262,10 +95088,10 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params + [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95279,34 +95105,34 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt }; /* - * Attribute NumberOfPINUsersSupported + * Attribute EnablePrivacyModeButton */ -class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { +class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { public: - ReadDoorLockNumberOfPINUsersSupported() - : ReadAttribute("number-of-pinusers-supported") + ReadDoorLockEnablePrivacyModeButton() + : ReadAttribute("enable-privacy-mode-button") { } - ~ReadDoorLockNumberOfPINUsersSupported() + ~ReadDoorLockEnablePrivacyModeButton() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + LogNSError("DoorLock EnablePrivacyModeButton read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95315,21 +95141,62 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { +class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfPINUsersSupported() - : SubscribeAttribute("number-of-pinusers-supported") + WriteDoorLockEnablePrivacyModeButton() + : WriteAttribute("enable-privacy-mode-button") { + AddArgument("attr-name", "enable-privacy-mode-button"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() + ~WriteDoorLockEnablePrivacyModeButton() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfPINUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnablePrivacyModeButton() + : SubscribeAttribute("enable-privacy-mode-button") + { + } + + ~SubscribeAttributeDoorLockEnablePrivacyModeButton() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95344,10 +95211,10 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params + [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95361,34 +95228,34 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr }; /* - * Attribute NumberOfRFIDUsersSupported + * Attribute LocalProgrammingFeatures */ -class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { +class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { public: - ReadDoorLockNumberOfRFIDUsersSupported() - : ReadAttribute("number-of-rfidusers-supported") + ReadDoorLockLocalProgrammingFeatures() + : ReadAttribute("local-programming-features") { } - ~ReadDoorLockNumberOfRFIDUsersSupported() + ~ReadDoorLockLocalProgrammingFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + LogNSError("DoorLock LocalProgrammingFeatures read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95397,21 +95264,62 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { +class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() - : SubscribeAttribute("number-of-rfidusers-supported") + WriteDoorLockLocalProgrammingFeatures() + : WriteAttribute("local-programming-features") { + AddArgument("attr-name", "local-programming-features"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + ~WriteDoorLockLocalProgrammingFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfRFIDUsersSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockLocalProgrammingFeatures() + : SubscribeAttribute("local-programming-features") + { + } + + ~SubscribeAttributeDoorLockLocalProgrammingFeatures() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95426,10 +95334,10 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params + [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95443,34 +95351,34 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt }; /* - * Attribute NumberOfWeekDaySchedulesSupportedPerUser + * Attribute WrongCodeEntryLimit */ -class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { +class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { public: - ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-week-day-schedules-supported-per-user") + ReadDoorLockWrongCodeEntryLimit() + : ReadAttribute("wrong-code-entry-limit") { } - ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + ~ReadDoorLockWrongCodeEntryLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + LogNSError("DoorLock WrongCodeEntryLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95479,21 +95387,62 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut } }; -class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { +class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") + WriteDoorLockWrongCodeEntryLimit() + : WriteAttribute("wrong-code-entry-limit") { + AddArgument("attr-name", "wrong-code-entry-limit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + ~WriteDoorLockWrongCodeEntryLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfWeekDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockWrongCodeEntryLimit() + : SubscribeAttribute("wrong-code-entry-limit") + { + } + + ~SubscribeAttributeDoorLockWrongCodeEntryLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95508,10 +95457,10 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params + [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95525,34 +95474,34 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi }; /* - * Attribute NumberOfYearDaySchedulesSupportedPerUser + * Attribute UserCodeTemporaryDisableTime */ -class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { +class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { public: - ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-year-day-schedules-supported-per-user") + ReadDoorLockUserCodeTemporaryDisableTime() + : ReadAttribute("user-code-temporary-disable-time") { } - ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + ~ReadDoorLockUserCodeTemporaryDisableTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95561,21 +95510,62 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut } }; -class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { +class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") + WriteDoorLockUserCodeTemporaryDisableTime() + : WriteAttribute("user-code-temporary-disable-time") { + AddArgument("attr-name", "user-code-temporary-disable-time"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + ~WriteDoorLockUserCodeTemporaryDisableTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfYearDaySchedulesSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + : SubscribeAttribute("user-code-temporary-disable-time") + { + } + + ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95590,10 +95580,10 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95607,34 +95597,34 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi }; /* - * Attribute NumberOfHolidaySchedulesSupported + * Attribute SendPINOverTheAir */ -class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { +class ReadDoorLockSendPINOverTheAir : public ReadAttribute { public: - ReadDoorLockNumberOfHolidaySchedulesSupported() - : ReadAttribute("number-of-holiday-schedules-supported") + ReadDoorLockSendPINOverTheAir() + : ReadAttribute("send-pinover-the-air") { } - ~ReadDoorLockNumberOfHolidaySchedulesSupported() + ~ReadDoorLockSendPINOverTheAir() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); + LogNSError("DoorLock SendPINOverTheAir read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95643,21 +95633,62 @@ class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { +class WriteDoorLockSendPINOverTheAir : public WriteAttribute { public: - SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() - : SubscribeAttribute("number-of-holiday-schedules-supported") + WriteDoorLockSendPINOverTheAir() + : WriteAttribute("send-pinover-the-air") { + AddArgument("attr-name", "send-pinover-the-air"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + ~WriteDoorLockSendPINOverTheAir() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfHolidaySchedulesSupported::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeSendPINOverTheAirWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSendPINOverTheAir() + : SubscribeAttribute("send-pinover-the-air") + { + } + + ~SubscribeAttributeDoorLockSendPINOverTheAir() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95672,10 +95703,10 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params + [cluster subscribeAttributeSendPINOverTheAirWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95689,34 +95720,34 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc }; /* - * Attribute MaxPINCodeLength + * Attribute RequirePINforRemoteOperation */ -class ReadDoorLockMaxPINCodeLength : public ReadAttribute { +class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { public: - ReadDoorLockMaxPINCodeLength() - : ReadAttribute("max-pincode-length") + ReadDoorLockRequirePINforRemoteOperation() + : ReadAttribute("require-pinfor-remote-operation") { } - ~ReadDoorLockMaxPINCodeLength() + ~ReadDoorLockRequirePINforRemoteOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MaxPINCodeLength read Error", error); + LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95725,21 +95756,62 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { +class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { public: - SubscribeAttributeDoorLockMaxPINCodeLength() - : SubscribeAttribute("max-pincode-length") + WriteDoorLockRequirePINforRemoteOperation() + : WriteAttribute("require-pinfor-remote-operation") { + AddArgument("attr-name", "require-pinfor-remote-operation"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockMaxPINCodeLength() + ~WriteDoorLockRequirePINforRemoteOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockRequirePINforRemoteOperation() + : SubscribeAttribute("require-pinfor-remote-operation") + { + } + + ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95754,10 +95826,10 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPINCodeLengthWithParams:params + [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95771,34 +95843,34 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { }; /* - * Attribute MinPINCodeLength + * Attribute ExpiringUserTimeout */ -class ReadDoorLockMinPINCodeLength : public ReadAttribute { +class ReadDoorLockExpiringUserTimeout : public ReadAttribute { public: - ReadDoorLockMinPINCodeLength() - : ReadAttribute("min-pincode-length") + ReadDoorLockExpiringUserTimeout() + : ReadAttribute("expiring-user-timeout") { } - ~ReadDoorLockMinPINCodeLength() + ~ReadDoorLockExpiringUserTimeout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MinPINCodeLength read Error", error); + LogNSError("DoorLock ExpiringUserTimeout read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95807,21 +95879,62 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { +class WriteDoorLockExpiringUserTimeout : public WriteAttribute { public: - SubscribeAttributeDoorLockMinPINCodeLength() - : SubscribeAttribute("min-pincode-length") + WriteDoorLockExpiringUserTimeout() + : WriteAttribute("expiring-user-timeout") { + AddArgument("attr-name", "expiring-user-timeout"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeDoorLockMinPINCodeLength() + ~WriteDoorLockExpiringUserTimeout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinPINCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockExpiringUserTimeout() + : SubscribeAttribute("expiring-user-timeout") + { + } + + ~SubscribeAttributeDoorLockExpiringUserTimeout() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95836,10 +95949,10 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPINCodeLengthWithParams:params + [cluster subscribeAttributeExpiringUserTimeoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95852,35 +95965,37 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxRFIDCodeLength + * Attribute AliroReaderVerificationKey */ -class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { +class ReadDoorLockAliroReaderVerificationKey : public ReadAttribute { public: - ReadDoorLockMaxRFIDCodeLength() - : ReadAttribute("max-rfidcode-length") + ReadDoorLockAliroReaderVerificationKey() + : ReadAttribute("aliro-reader-verification-key") { } - ~ReadDoorLockMaxRFIDCodeLength() + ~ReadDoorLockAliroReaderVerificationKey() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + [cluster readAttributeAliroReaderVerificationKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + LogNSError("DoorLock AliroReaderVerificationKey read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95889,21 +96004,21 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroReaderVerificationKey : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMaxRFIDCodeLength() - : SubscribeAttribute("max-rfidcode-length") + SubscribeAttributeDoorLockAliroReaderVerificationKey() + : SubscribeAttribute("aliro-reader-verification-key") { } - ~SubscribeAttributeDoorLockMaxRFIDCodeLength() + ~SubscribeAttributeDoorLockAliroReaderVerificationKey() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MaxRFIDCodeLength::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95918,10 +96033,10 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params + [cluster subscribeAttributeAliroReaderVerificationKeyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95934,35 +96049,38 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MinRFIDCodeLength + * Attribute AliroReaderGroupIdentifier */ -class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { +class ReadDoorLockAliroReaderGroupIdentifier : public ReadAttribute { public: - ReadDoorLockMinRFIDCodeLength() - : ReadAttribute("min-rfidcode-length") + ReadDoorLockAliroReaderGroupIdentifier() + : ReadAttribute("aliro-reader-group-identifier") { } - ~ReadDoorLockMinRFIDCodeLength() + ~ReadDoorLockAliroReaderGroupIdentifier() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + [cluster readAttributeAliroReaderGroupIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock MinRFIDCodeLength read Error", error); + LogNSError("DoorLock AliroReaderGroupIdentifier read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95971,21 +96089,21 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroReaderGroupIdentifier : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMinRFIDCodeLength() - : SubscribeAttribute("min-rfidcode-length") + SubscribeAttributeDoorLockAliroReaderGroupIdentifier() + : SubscribeAttribute("aliro-reader-group-identifier") { } - ~SubscribeAttributeDoorLockMinRFIDCodeLength() + ~SubscribeAttributeDoorLockAliroReaderGroupIdentifier() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::MinRFIDCodeLength::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96000,10 +96118,10 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params + [cluster subscribeAttributeAliroReaderGroupIdentifierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96016,35 +96134,38 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CredentialRulesSupport + * Attribute AliroReaderGroupSubIdentifier */ -class ReadDoorLockCredentialRulesSupport : public ReadAttribute { +class ReadDoorLockAliroReaderGroupSubIdentifier : public ReadAttribute { public: - ReadDoorLockCredentialRulesSupport() - : ReadAttribute("credential-rules-support") + ReadDoorLockAliroReaderGroupSubIdentifier() + : ReadAttribute("aliro-reader-group-sub-identifier") { } - ~ReadDoorLockCredentialRulesSupport() + ~ReadDoorLockAliroReaderGroupSubIdentifier() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + [cluster readAttributeAliroReaderGroupSubIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock CredentialRulesSupport read Error", error); + LogNSError("DoorLock AliroReaderGroupSubIdentifier read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96053,21 +96174,21 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { } }; -class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier : public SubscribeAttribute { public: - SubscribeAttributeDoorLockCredentialRulesSupport() - : SubscribeAttribute("credential-rules-support") + SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() + : SubscribeAttribute("aliro-reader-group-sub-identifier") { } - ~SubscribeAttributeDoorLockCredentialRulesSupport() + ~SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96082,10 +96203,10 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCredentialRulesSupportWithParams:params + [cluster subscribeAttributeAliroReaderGroupSubIdentifierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96098,35 +96219,38 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute NumberOfCredentialsSupportedPerUser + * Attribute AliroExpeditedTransactionSupportedProtocolVersions */ -class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { +class ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public ReadAttribute { public: - ReadDoorLockNumberOfCredentialsSupportedPerUser() - : ReadAttribute("number-of-credentials-supported-per-user") + ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + : ReadAttribute("aliro-expedited-transaction-supported-protocol-versions") { } - ~ReadDoorLockNumberOfCredentialsSupportedPerUser() + ~ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + [cluster readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + LogNSError("DoorLock AliroExpeditedTransactionSupportedProtocolVersions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96135,21 +96259,21 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() - : SubscribeAttribute("number-of-credentials-supported-per-user") + SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + : SubscribeAttribute("aliro-expedited-transaction-supported-protocol-versions") { } - ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + ~SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfCredentialsSupportedPerUser::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96164,10 +96288,10 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + [cluster subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96180,35 +96304,38 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Language + * Attribute AliroGroupResolvingKey */ -class ReadDoorLockLanguage : public ReadAttribute { +class ReadDoorLockAliroGroupResolvingKey : public ReadAttribute { public: - ReadDoorLockLanguage() - : ReadAttribute("language") + ReadDoorLockAliroGroupResolvingKey() + : ReadAttribute("aliro-group-resolving-key") { } - ~ReadDoorLockLanguage() + ~ReadDoorLockAliroGroupResolvingKey() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); + [cluster readAttributeAliroGroupResolvingKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock Language read Error", error); + LogNSError("DoorLock AliroGroupResolvingKey read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96217,62 +96344,21 @@ class ReadDoorLockLanguage : public ReadAttribute { } }; -class WriteDoorLockLanguage : public WriteAttribute { +class SubscribeAttributeDoorLockAliroGroupResolvingKey : public SubscribeAttribute { public: - WriteDoorLockLanguage() - : WriteAttribute("language") + SubscribeAttributeDoorLockAliroGroupResolvingKey() + : SubscribeAttribute("aliro-group-resolving-key") { - AddArgument("attr-name", "language"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); } - ~WriteDoorLockLanguage() + ~SubscribeAttributeDoorLockAliroGroupResolvingKey() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLanguageWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockLanguage() - : SubscribeAttribute("language") - { - } - - ~SubscribeAttributeDoorLockLanguage() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::Language::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96287,10 +96373,10 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLanguageWithParams:params + [cluster subscribeAttributeAliroGroupResolvingKeyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96303,99 +96389,61 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute LEDSettings + * Attribute AliroSupportedBLEUWBProtocolVersions */ -class ReadDoorLockLEDSettings : public ReadAttribute { +class ReadDoorLockAliroSupportedBLEUWBProtocolVersions : public ReadAttribute { public: - ReadDoorLockLEDSettings() - : ReadAttribute("ledsettings") + ReadDoorLockAliroSupportedBLEUWBProtocolVersions() + : ReadAttribute("aliro-supported-bleuwbprotocol-versions") { } - ~ReadDoorLockLEDSettings() + ~ReadDoorLockAliroSupportedBLEUWBProtocolVersions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + [cluster readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock LEDSettings read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockLEDSettings : public WriteAttribute { -public: - WriteDoorLockLEDSettings() - : WriteAttribute("ledsettings") - { - AddArgument("attr-name", "ledsettings"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLEDSettings() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLEDSettingsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); + LogNSError("DoorLock AliroSupportedBLEUWBProtocolVersions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLEDSettings() - : SubscribeAttribute("ledsettings") + SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() + : SubscribeAttribute("aliro-supported-bleuwbprotocol-versions") { } - ~SubscribeAttributeDoorLockLEDSettings() + ~SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LEDSettings::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96410,10 +96458,10 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLEDSettingsWithParams:params + [cluster subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96426,99 +96474,61 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AutoRelockTime + * Attribute AliroBLEAdvertisingVersion */ -class ReadDoorLockAutoRelockTime : public ReadAttribute { +class ReadDoorLockAliroBLEAdvertisingVersion : public ReadAttribute { public: - ReadDoorLockAutoRelockTime() - : ReadAttribute("auto-relock-time") + ReadDoorLockAliroBLEAdvertisingVersion() + : ReadAttribute("aliro-bleadvertising-version") { } - ~ReadDoorLockAutoRelockTime() + ~ReadDoorLockAliroBLEAdvertisingVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + [cluster readAttributeAliroBLEAdvertisingVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AutoRelockTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockAutoRelockTime : public WriteAttribute { -public: - WriteDoorLockAutoRelockTime() - : WriteAttribute("auto-relock-time") - { - AddArgument("attr-name", "auto-relock-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockAutoRelockTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeAutoRelockTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); + LogNSError("DoorLock AliroBLEAdvertisingVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { +class SubscribeAttributeDoorLockAliroBLEAdvertisingVersion : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAutoRelockTime() - : SubscribeAttribute("auto-relock-time") + SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() + : SubscribeAttribute("aliro-bleadvertising-version") { } - ~SubscribeAttributeDoorLockAutoRelockTime() + ~SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AutoRelockTime::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96533,10 +96543,10 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAutoRelockTimeWithParams:params + [cluster subscribeAttributeAliroBLEAdvertisingVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96549,99 +96559,61 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SoundVolume + * Attribute NumberOfAliroCredentialIssuerKeysSupported */ -class ReadDoorLockSoundVolume : public ReadAttribute { +class ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported : public ReadAttribute { public: - ReadDoorLockSoundVolume() - : ReadAttribute("sound-volume") + ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() + : ReadAttribute("number-of-aliro-credential-issuer-keys-supported") { } - ~ReadDoorLockSoundVolume() + ~ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); + [cluster readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SoundVolume read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSoundVolume : public WriteAttribute { -public: - WriteDoorLockSoundVolume() - : WriteAttribute("sound-volume") - { - AddArgument("attr-name", "sound-volume"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSoundVolume() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSoundVolumeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); + LogNSError("DoorLock NumberOfAliroCredentialIssuerKeysSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSoundVolume() - : SubscribeAttribute("sound-volume") + SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() + : SubscribeAttribute("number-of-aliro-credential-issuer-keys-supported") { } - ~SubscribeAttributeDoorLockSoundVolume() + ~SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SoundVolume::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96656,10 +96628,10 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoundVolumeWithParams:params + [cluster subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); + NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96672,99 +96644,61 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OperatingMode + * Attribute NumberOfAliroEndpointKeysSupported */ -class ReadDoorLockOperatingMode : public ReadAttribute { +class ReadDoorLockNumberOfAliroEndpointKeysSupported : public ReadAttribute { public: - ReadDoorLockOperatingMode() - : ReadAttribute("operating-mode") + ReadDoorLockNumberOfAliroEndpointKeysSupported() + : ReadAttribute("number-of-aliro-endpoint-keys-supported") { } - ~ReadDoorLockOperatingMode() + ~ReadDoorLockNumberOfAliroEndpointKeysSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); + [cluster readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock OperatingMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockOperatingMode : public WriteAttribute { -public: - WriteDoorLockOperatingMode() - : WriteAttribute("operating-mode") - { - AddArgument("attr-name", "operating-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOperatingMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOperatingModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); + LogNSError("DoorLock NumberOfAliroEndpointKeysSupported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported : public SubscribeAttribute { public: - SubscribeAttributeDoorLockOperatingMode() - : SubscribeAttribute("operating-mode") + SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() + : SubscribeAttribute("number-of-aliro-endpoint-keys-supported") { } - ~SubscribeAttributeDoorLockOperatingMode() + ~SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::OperatingMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96779,10 +96713,10 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperatingModeWithParams:params + [cluster subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); + NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96795,35 +96729,37 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedOperatingModes + * Attribute GeneratedCommandList */ -class ReadDoorLockSupportedOperatingModes : public ReadAttribute { +class ReadDoorLockGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockSupportedOperatingModes() - : ReadAttribute("supported-operating-modes") + ReadDoorLockGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockSupportedOperatingModes() + ~ReadDoorLockGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SupportedOperatingModes read Error", error); + LogNSError("DoorLock GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96832,21 +96768,21 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { } }; -class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { +class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSupportedOperatingModes() - : SubscribeAttribute("supported-operating-modes") + SubscribeAttributeDoorLockGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockSupportedOperatingModes() + ~SubscribeAttributeDoorLockGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96861,10 +96797,10 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedOperatingModesWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96878,34 +96814,34 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib }; /* - * Attribute DefaultConfigurationRegister + * Attribute AcceptedCommandList */ -class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { +class ReadDoorLockAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockDefaultConfigurationRegister() - : ReadAttribute("default-configuration-register") + ReadDoorLockAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockDefaultConfigurationRegister() + ~ReadDoorLockAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock DefaultConfigurationRegister read Error", error); + LogNSError("DoorLock AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96914,21 +96850,21 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { +class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDefaultConfigurationRegister() - : SubscribeAttribute("default-configuration-register") + SubscribeAttributeDoorLockAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockDefaultConfigurationRegister() + ~SubscribeAttributeDoorLockAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96943,10 +96879,10 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96959,99 +96895,60 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EnableLocalProgramming + * Attribute EventList */ -class ReadDoorLockEnableLocalProgramming : public ReadAttribute { +class ReadDoorLockEventList : public ReadAttribute { public: - ReadDoorLockEnableLocalProgramming() - : ReadAttribute("enable-local-programming") + ReadDoorLockEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockEnableLocalProgramming() + ~ReadDoorLockEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableLocalProgramming read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableLocalProgramming : public WriteAttribute { -public: - WriteDoorLockEnableLocalProgramming() - : WriteAttribute("enable-local-programming") - { - AddArgument("attr-name", "enable-local-programming"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableLocalProgramming() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableLocalProgrammingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); + LogNSError("DoorLock EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { +class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableLocalProgramming() - : SubscribeAttribute("enable-local-programming") + SubscribeAttributeDoorLockEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockEnableLocalProgramming() + ~SubscribeAttributeDoorLockEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableLocalProgramming::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -97066,10 +96963,10 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableLocalProgrammingWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97082,99 +96979,60 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute EnableOneTouchLocking + * Attribute AttributeList */ -class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { +class ReadDoorLockAttributeList : public ReadAttribute { public: - ReadDoorLockEnableOneTouchLocking() - : ReadAttribute("enable-one-touch-locking") + ReadDoorLockAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockEnableOneTouchLocking() + ~ReadDoorLockAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableOneTouchLocking read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { -public: - WriteDoorLockEnableOneTouchLocking() - : WriteAttribute("enable-one-touch-locking") - { - AddArgument("attr-name", "enable-one-touch-locking"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableOneTouchLocking() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableOneTouchLockingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); + LogNSError("DoorLock AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { +class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableOneTouchLocking() - : SubscribeAttribute("enable-one-touch-locking") + SubscribeAttributeDoorLockAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockEnableOneTouchLocking() + ~SubscribeAttributeDoorLockAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableOneTouchLocking::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -97189,10 +97047,10 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableOneTouchLockingWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97206,98 +97064,57 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut }; /* - * Attribute EnableInsideStatusLED + * Attribute FeatureMap */ -class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { +class ReadDoorLockFeatureMap : public ReadAttribute { public: - ReadDoorLockEnableInsideStatusLED() - : ReadAttribute("enable-inside-status-led") + ReadDoorLockFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockEnableInsideStatusLED() + ~ReadDoorLockFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnableInsideStatusLED read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { -public: - WriteDoorLockEnableInsideStatusLED() - : WriteAttribute("enable-inside-status-led") - { - AddArgument("attr-name", "enable-inside-status-led"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableInsideStatusLED() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableInsideStatusLEDWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); + LogNSError("DoorLock FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableInsideStatusLED() - : SubscribeAttribute("enable-inside-status-led") + SubscribeAttributeDoorLockFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockEnableInsideStatusLED() + ~SubscribeAttributeDoorLockFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnableInsideStatusLED::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -97312,10 +97129,10 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97329,98 +97146,57 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut }; /* - * Attribute EnablePrivacyModeButton + * Attribute ClusterRevision */ -class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { +class ReadDoorLockClusterRevision : public ReadAttribute { public: - ReadDoorLockEnablePrivacyModeButton() - : ReadAttribute("enable-privacy-mode-button") + ReadDoorLockClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockEnablePrivacyModeButton() + ~ReadDoorLockClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EnablePrivacyModeButton read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { -public: - WriteDoorLockEnablePrivacyModeButton() - : WriteAttribute("enable-privacy-mode-button") - { - AddArgument("attr-name", "enable-privacy-mode-button"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnablePrivacyModeButton() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnablePrivacyModeButtonWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + LogNSError("DoorLock ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnablePrivacyModeButton() - : SubscribeAttribute("enable-privacy-mode-button") + SubscribeAttributeDoorLockClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockEnablePrivacyModeButton() + ~SubscribeAttributeDoorLockClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EnablePrivacyModeButton::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -97435,10 +97211,10 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97451,349 +97227,427 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster WindowCovering | 0x0102 | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LocalProgrammingFeatures + * Command UpOrOpen */ -class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { +class WindowCoveringUpOrOpen : public ClusterCommand { public: - ReadDoorLockLocalProgrammingFeatures() - : ReadAttribute("local-programming-features") - { - } - - ~ReadDoorLockLocalProgrammingFeatures() + WindowCoveringUpOrOpen() + : ClusterCommand("up-or-open") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock LocalProgrammingFeatures read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster upOrOpenWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { +/* + * Command DownOrClose + */ +class WindowCoveringDownOrClose : public ClusterCommand { public: - WriteDoorLockLocalProgrammingFeatures() - : WriteAttribute("local-programming-features") - { - AddArgument("attr-name", "local-programming-features"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLocalProgrammingFeatures() + WindowCoveringDownOrClose() + : ClusterCommand("down-or-close") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeLocalProgrammingFeaturesWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster downOrCloseWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { +/* + * Command StopMotion + */ +class WindowCoveringStopMotion : public ClusterCommand { public: - SubscribeAttributeDoorLockLocalProgrammingFeatures() - : SubscribeAttribute("local-programming-features") - { - } - - ~SubscribeAttributeDoorLockLocalProgrammingFeatures() + WindowCoveringStopMotion() + : ClusterCommand("stop-motion") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMotionWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute WrongCodeEntryLimit + * Command GoToLiftValue */ -class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - ReadDoorLockWrongCodeEntryLimit() - : ReadAttribute("wrong-code-entry-limit") - { - } - - ~ReadDoorLockWrongCodeEntryLimit() + WindowCoveringGoToLiftValue() + : ClusterCommand("go-to-lift-value") { + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock WrongCodeEntryLimit read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftValueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; -class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { +/* + * Command GoToLiftPercentage + */ +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - WriteDoorLockWrongCodeEntryLimit() - : WriteAttribute("wrong-code-entry-limit") - { - AddArgument("attr-name", "wrong-code-entry-limit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockWrongCodeEntryLimit() + WindowCoveringGoToLiftPercentage() + : ClusterCommand("go-to-lift-percentage") { + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeWrongCodeEntryLimitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftPercentageWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } private: - uint8_t mValue; + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; -class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { +/* + * Command GoToTiltValue + */ +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - SubscribeAttributeDoorLockWrongCodeEntryLimit() - : SubscribeAttribute("wrong-code-entry-limit") - { - } - - ~SubscribeAttributeDoorLockWrongCodeEntryLimit() + WindowCoveringGoToTiltValue() + : ClusterCommand("go-to-tilt-value") { + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::WrongCodeEntryLimit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltValueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; }; /* - * Attribute UserCodeTemporaryDisableTime + * Command GoToTiltPercentage */ -class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { +class WindowCoveringGoToTiltPercentage : public ClusterCommand { public: - ReadDoorLockUserCodeTemporaryDisableTime() - : ReadAttribute("user-code-temporary-disable-time") - { - } - - ~ReadDoorLockUserCodeTemporaryDisableTime() + WindowCoveringGoToTiltPercentage() + : ClusterCommand("go-to-tilt-percentage") { + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltPercentageWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { +/* + * Attribute Type + */ +class ReadWindowCoveringType : public ReadAttribute { public: - WriteDoorLockUserCodeTemporaryDisableTime() - : WriteAttribute("user-code-temporary-disable-time") + ReadWindowCoveringType() + : ReadAttribute("type") { - AddArgument("attr-name", "user-code-temporary-disable-time"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteDoorLockUserCodeTemporaryDisableTime() + ~ReadWindowCoveringType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Type response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering Type read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { public: - SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() - : SubscribeAttribute("user-code-temporary-disable-time") + SubscribeAttributeWindowCoveringType() + : SubscribeAttribute("type") { } - ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + ~SubscribeAttributeWindowCoveringType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::UserCodeTemporaryDisableTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97804,10 +97658,10 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params + [cluster subscribeAttributeTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + NSLog(@"WindowCovering.Type response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97821,102 +97675,61 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA }; /* - * Attribute SendPINOverTheAir + * Attribute PhysicalClosedLimitLift */ -class ReadDoorLockSendPINOverTheAir : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { public: - ReadDoorLockSendPINOverTheAir() - : ReadAttribute("send-pinover-the-air") + ReadWindowCoveringPhysicalClosedLimitLift() + : ReadAttribute("physical-closed-limit-lift") { } - ~ReadDoorLockSendPINOverTheAir() + ~ReadWindowCoveringPhysicalClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock SendPINOverTheAir read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockSendPINOverTheAir : public WriteAttribute { -public: - WriteDoorLockSendPINOverTheAir() - : WriteAttribute("send-pinover-the-air") - { - AddArgument("attr-name", "send-pinover-the-air"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSendPINOverTheAir() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeSendPINOverTheAirWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); + LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSendPINOverTheAir() - : SubscribeAttribute("send-pinover-the-air") + SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + : SubscribeAttribute("physical-closed-limit-lift") { } - ~SubscribeAttributeDoorLockSendPINOverTheAir() + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::SendPINOverTheAir::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97927,10 +97740,10 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSendPINOverTheAirWithParams:params + [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97944,102 +97757,61 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { }; /* - * Attribute RequirePINforRemoteOperation + * Attribute PhysicalClosedLimitTilt */ -class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { public: - ReadDoorLockRequirePINforRemoteOperation() - : ReadAttribute("require-pinfor-remote-operation") + ReadWindowCoveringPhysicalClosedLimitTilt() + : ReadAttribute("physical-closed-limit-tilt") { } - ~ReadDoorLockRequirePINforRemoteOperation() + ~ReadWindowCoveringPhysicalClosedLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { -public: - WriteDoorLockRequirePINforRemoteOperation() - : WriteAttribute("require-pinfor-remote-operation") - { - AddArgument("attr-name", "require-pinfor-remote-operation"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockRequirePINforRemoteOperation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeRequirePINforRemoteOperationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockRequirePINforRemoteOperation() - : SubscribeAttribute("require-pinfor-remote-operation") + SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + : SubscribeAttribute("physical-closed-limit-tilt") { } - ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::RequirePINforRemoteOperation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98050,10 +97822,10 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params + [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98067,102 +97839,61 @@ class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeA }; /* - * Attribute ExpiringUserTimeout + * Attribute CurrentPositionLift */ -class ReadDoorLockExpiringUserTimeout : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { public: - ReadDoorLockExpiringUserTimeout() - : ReadAttribute("expiring-user-timeout") + ReadWindowCoveringCurrentPositionLift() + : ReadAttribute("current-position-lift") { } - ~ReadDoorLockExpiringUserTimeout() + ~ReadWindowCoveringCurrentPositionLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ExpiringUserTimeout read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockExpiringUserTimeout : public WriteAttribute { -public: - WriteDoorLockExpiringUserTimeout() - : WriteAttribute("expiring-user-timeout") - { - AddArgument("attr-name", "expiring-user-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockExpiringUserTimeout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeExpiringUserTimeoutWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); + LogNSError("WindowCovering CurrentPositionLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockExpiringUserTimeout() - : SubscribeAttribute("expiring-user-timeout") + SubscribeAttributeWindowCoveringCurrentPositionLift() + : SubscribeAttribute("current-position-lift") { } - ~SubscribeAttributeDoorLockExpiringUserTimeout() + ~SubscribeAttributeWindowCoveringCurrentPositionLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ExpiringUserTimeout::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98173,10 +97904,10 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiringUserTimeoutWithParams:params + [cluster subscribeAttributeCurrentPositionLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98189,37 +97920,35 @@ class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroReaderVerificationKey + * Attribute CurrentPositionTilt */ -class ReadDoorLockAliroReaderVerificationKey : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { public: - ReadDoorLockAliroReaderVerificationKey() - : ReadAttribute("aliro-reader-verification-key") + ReadWindowCoveringCurrentPositionTilt() + : ReadAttribute("current-position-tilt") { } - ~ReadDoorLockAliroReaderVerificationKey() + ~ReadWindowCoveringCurrentPositionTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroReaderVerificationKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroReaderVerificationKey read Error", error); + LogNSError("WindowCovering CurrentPositionTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98228,25 +97957,25 @@ class ReadDoorLockAliroReaderVerificationKey : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroReaderVerificationKey : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroReaderVerificationKey() - : SubscribeAttribute("aliro-reader-verification-key") + SubscribeAttributeWindowCoveringCurrentPositionTilt() + : SubscribeAttribute("current-position-tilt") { } - ~SubscribeAttributeDoorLockAliroReaderVerificationKey() + ~SubscribeAttributeWindowCoveringCurrentPositionTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderVerificationKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98257,10 +97986,10 @@ class SubscribeAttributeDoorLockAliroReaderVerificationKey : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroReaderVerificationKeyWithParams:params + [cluster subscribeAttributeCurrentPositionTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderVerificationKey response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98273,38 +98002,35 @@ class SubscribeAttributeDoorLockAliroReaderVerificationKey : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroReaderGroupIdentifier + * Attribute NumberOfActuationsLift */ -class ReadDoorLockAliroReaderGroupIdentifier : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { public: - ReadDoorLockAliroReaderGroupIdentifier() - : ReadAttribute("aliro-reader-group-identifier") + ReadWindowCoveringNumberOfActuationsLift() + : ReadAttribute("number-of-actuations-lift") { } - ~ReadDoorLockAliroReaderGroupIdentifier() + ~ReadWindowCoveringNumberOfActuationsLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroReaderGroupIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroReaderGroupIdentifier read Error", error); + LogNSError("WindowCovering NumberOfActuationsLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98313,25 +98039,25 @@ class ReadDoorLockAliroReaderGroupIdentifier : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroReaderGroupIdentifier : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroReaderGroupIdentifier() - : SubscribeAttribute("aliro-reader-group-identifier") + SubscribeAttributeWindowCoveringNumberOfActuationsLift() + : SubscribeAttribute("number-of-actuations-lift") { } - ~SubscribeAttributeDoorLockAliroReaderGroupIdentifier() + ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupIdentifier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98342,10 +98068,10 @@ class SubscribeAttributeDoorLockAliroReaderGroupIdentifier : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroReaderGroupIdentifierWithParams:params + [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderGroupIdentifier response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98358,38 +98084,35 @@ class SubscribeAttributeDoorLockAliroReaderGroupIdentifier : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroReaderGroupSubIdentifier + * Attribute NumberOfActuationsTilt */ -class ReadDoorLockAliroReaderGroupSubIdentifier : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { public: - ReadDoorLockAliroReaderGroupSubIdentifier() - : ReadAttribute("aliro-reader-group-sub-identifier") + ReadWindowCoveringNumberOfActuationsTilt() + : ReadAttribute("number-of-actuations-tilt") { } - ~ReadDoorLockAliroReaderGroupSubIdentifier() + ~ReadWindowCoveringNumberOfActuationsTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroReaderGroupSubIdentifierWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroReaderGroupSubIdentifier read Error", error); + LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98398,25 +98121,25 @@ class ReadDoorLockAliroReaderGroupSubIdentifier : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() - : SubscribeAttribute("aliro-reader-group-sub-identifier") + SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + : SubscribeAttribute("number-of-actuations-tilt") { } - ~SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier() + ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroReaderGroupSubIdentifier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98427,10 +98150,10 @@ class SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroReaderGroupSubIdentifierWithParams:params + [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroReaderGroupSubIdentifier response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98443,38 +98166,35 @@ class SubscribeAttributeDoorLockAliroReaderGroupSubIdentifier : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroExpeditedTransactionSupportedProtocolVersions + * Attribute ConfigStatus */ -class ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public ReadAttribute { +class ReadWindowCoveringConfigStatus : public ReadAttribute { public: - ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() - : ReadAttribute("aliro-expedited-transaction-supported-protocol-versions") + ReadWindowCoveringConfigStatus() + : ReadAttribute("config-status") { } - ~ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + ~ReadWindowCoveringConfigStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroExpeditedTransactionSupportedProtocolVersions read Error", error); + LogNSError("WindowCovering ConfigStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98483,25 +98203,25 @@ class ReadDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public Re } }; -class SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() - : SubscribeAttribute("aliro-expedited-transaction-supported-protocol-versions") + SubscribeAttributeWindowCoveringConfigStatus() + : SubscribeAttribute("config-status") { } - ~SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersions() + ~SubscribeAttributeWindowCoveringConfigStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroExpeditedTransactionSupportedProtocolVersions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98512,10 +98232,10 @@ class SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersio if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroExpeditedTransactionSupportedProtocolVersionsWithParams:params + [cluster subscribeAttributeConfigStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroExpeditedTransactionSupportedProtocolVersions response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98528,38 +98248,35 @@ class SubscribeAttributeDoorLockAliroExpeditedTransactionSupportedProtocolVersio } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroGroupResolvingKey + * Attribute CurrentPositionLiftPercentage */ -class ReadDoorLockAliroGroupResolvingKey : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { public: - ReadDoorLockAliroGroupResolvingKey() - : ReadAttribute("aliro-group-resolving-key") + ReadWindowCoveringCurrentPositionLiftPercentage() + : ReadAttribute("current-position-lift-percentage") { } - ~ReadDoorLockAliroGroupResolvingKey() + ~ReadWindowCoveringCurrentPositionLiftPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroGroupResolvingKeyWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroGroupResolvingKey read Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98568,25 +98285,25 @@ class ReadDoorLockAliroGroupResolvingKey : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroGroupResolvingKey : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroGroupResolvingKey() - : SubscribeAttribute("aliro-group-resolving-key") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + : SubscribeAttribute("current-position-lift-percentage") { } - ~SubscribeAttributeDoorLockAliroGroupResolvingKey() + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroGroupResolvingKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98597,10 +98314,10 @@ class SubscribeAttributeDoorLockAliroGroupResolvingKey : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroGroupResolvingKeyWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroGroupResolvingKey response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98613,38 +98330,35 @@ class SubscribeAttributeDoorLockAliroGroupResolvingKey : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroSupportedBLEUWBProtocolVersions + * Attribute CurrentPositionTiltPercentage */ -class ReadDoorLockAliroSupportedBLEUWBProtocolVersions : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { public: - ReadDoorLockAliroSupportedBLEUWBProtocolVersions() - : ReadAttribute("aliro-supported-bleuwbprotocol-versions") + ReadWindowCoveringCurrentPositionTiltPercentage() + : ReadAttribute("current-position-tilt-percentage") { } - ~ReadDoorLockAliroSupportedBLEUWBProtocolVersions() + ~ReadWindowCoveringCurrentPositionTiltPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroSupportedBLEUWBProtocolVersionsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroSupportedBLEUWBProtocolVersions read Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98653,25 +98367,25 @@ class ReadDoorLockAliroSupportedBLEUWBProtocolVersions : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() - : SubscribeAttribute("aliro-supported-bleuwbprotocol-versions") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + : SubscribeAttribute("current-position-tilt-percentage") { } - ~SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions() + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroSupportedBLEUWBProtocolVersions::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98682,10 +98396,10 @@ class SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroSupportedBLEUWBProtocolVersionsWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroSupportedBLEUWBProtocolVersions response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98698,38 +98412,35 @@ class SubscribeAttributeDoorLockAliroSupportedBLEUWBProtocolVersions : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AliroBLEAdvertisingVersion + * Attribute OperationalStatus */ -class ReadDoorLockAliroBLEAdvertisingVersion : public ReadAttribute { +class ReadWindowCoveringOperationalStatus : public ReadAttribute { public: - ReadDoorLockAliroBLEAdvertisingVersion() - : ReadAttribute("aliro-bleadvertising-version") + ReadWindowCoveringOperationalStatus() + : ReadAttribute("operational-status") { } - ~ReadDoorLockAliroBLEAdvertisingVersion() + ~ReadWindowCoveringOperationalStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAliroBLEAdvertisingVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AliroBLEAdvertisingVersion read Error", error); + LogNSError("WindowCovering OperationalStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98738,25 +98449,25 @@ class ReadDoorLockAliroBLEAdvertisingVersion : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAliroBLEAdvertisingVersion : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() - : SubscribeAttribute("aliro-bleadvertising-version") + SubscribeAttributeWindowCoveringOperationalStatus() + : SubscribeAttribute("operational-status") { } - ~SubscribeAttributeDoorLockAliroBLEAdvertisingVersion() + ~SubscribeAttributeWindowCoveringOperationalStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AliroBLEAdvertisingVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98767,10 +98478,10 @@ class SubscribeAttributeDoorLockAliroBLEAdvertisingVersion : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAliroBLEAdvertisingVersionWithParams:params + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AliroBLEAdvertisingVersion response %@", [value description]); + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98783,38 +98494,35 @@ class SubscribeAttributeDoorLockAliroBLEAdvertisingVersion : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NumberOfAliroCredentialIssuerKeysSupported + * Attribute TargetPositionLiftPercent100ths */ -class ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported : public ReadAttribute { +class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { public: - ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() - : ReadAttribute("number-of-aliro-credential-issuer-keys-supported") + ReadWindowCoveringTargetPositionLiftPercent100ths() + : ReadAttribute("target-position-lift-percent100ths") { } - ~ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported() + ~ReadWindowCoveringTargetPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfAliroCredentialIssuerKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfAliroCredentialIssuerKeysSupported read Error", error); + LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98823,25 +98531,25 @@ class ReadDoorLockNumberOfAliroCredentialIssuerKeysSupported : public ReadAttrib } }; -class SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() - : SubscribeAttribute("number-of-aliro-credential-issuer-keys-supported") + SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + : SubscribeAttribute("target-position-lift-percent100ths") { } - ~SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported() + ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroCredentialIssuerKeysSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98852,10 +98560,10 @@ class SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfAliroCredentialIssuerKeysSupportedWithParams:params + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfAliroCredentialIssuerKeysSupported response %@", [value description]); + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98868,38 +98576,35 @@ class SubscribeAttributeDoorLockNumberOfAliroCredentialIssuerKeysSupported : pub } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NumberOfAliroEndpointKeysSupported + * Attribute TargetPositionTiltPercent100ths */ -class ReadDoorLockNumberOfAliroEndpointKeysSupported : public ReadAttribute { +class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { public: - ReadDoorLockNumberOfAliroEndpointKeysSupported() - : ReadAttribute("number-of-aliro-endpoint-keys-supported") + ReadWindowCoveringTargetPositionTiltPercent100ths() + : ReadAttribute("target-position-tilt-percent100ths") { } - ~ReadDoorLockNumberOfAliroEndpointKeysSupported() + ~ReadWindowCoveringTargetPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfAliroEndpointKeysSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock NumberOfAliroEndpointKeysSupported read Error", error); + LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98908,25 +98613,25 @@ class ReadDoorLockNumberOfAliroEndpointKeysSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() - : SubscribeAttribute("number-of-aliro-endpoint-keys-supported") + SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + : SubscribeAttribute("target-position-tilt-percent100ths") { } - ~SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported() + ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::NumberOfAliroEndpointKeysSupported::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98937,10 +98642,10 @@ class SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfAliroEndpointKeysSupportedWithParams:params + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfAliroEndpointKeysSupported response %@", [value description]); + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98953,37 +98658,35 @@ class SubscribeAttributeDoorLockNumberOfAliroEndpointKeysSupported : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute EndProductType */ -class ReadDoorLockGeneratedCommandList : public ReadAttribute { +class ReadWindowCoveringEndProductType : public ReadAttribute { public: - ReadDoorLockGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWindowCoveringEndProductType() + : ReadAttribute("end-product-type") { } - ~ReadDoorLockGeneratedCommandList() + ~ReadWindowCoveringEndProductType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock GeneratedCommandList read Error", error); + LogNSError("WindowCovering EndProductType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98992,25 +98695,25 @@ class ReadDoorLockGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { public: - SubscribeAttributeDoorLockGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWindowCoveringEndProductType() + : SubscribeAttribute("end-product-type") { } - ~SubscribeAttributeDoorLockGeneratedCommandList() + ~SubscribeAttributeWindowCoveringEndProductType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99021,10 +98724,10 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEndProductTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99038,34 +98741,34 @@ class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute }; /* - * Attribute AcceptedCommandList + * Attribute CurrentPositionLiftPercent100ths */ -class ReadDoorLockAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { public: - ReadDoorLockAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWindowCoveringCurrentPositionLiftPercent100ths() + : ReadAttribute("current-position-lift-percent100ths") { } - ~ReadDoorLockAcceptedCommandList() + ~ReadWindowCoveringCurrentPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AcceptedCommandList read Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99074,25 +98777,25 @@ class ReadDoorLockAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + : SubscribeAttribute("current-position-lift-percent100ths") { } - ~SubscribeAttributeDoorLockAcceptedCommandList() + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99103,10 +98806,10 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99119,37 +98822,35 @@ class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CurrentPositionTiltPercent100ths */ -class ReadDoorLockEventList : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { public: - ReadDoorLockEventList() - : ReadAttribute("event-list") + ReadWindowCoveringCurrentPositionTiltPercent100ths() + : ReadAttribute("current-position-tilt-percent100ths") { } - ~ReadDoorLockEventList() + ~ReadWindowCoveringCurrentPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock EventList read Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99158,25 +98859,25 @@ class ReadDoorLockEventList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + : SubscribeAttribute("current-position-tilt-percent100ths") { } - ~SubscribeAttributeDoorLockEventList() + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99187,10 +98888,10 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99203,37 +98904,35 @@ class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute InstalledOpenLimitLift */ -class ReadDoorLockAttributeList : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { public: - ReadDoorLockAttributeList() - : ReadAttribute("attribute-list") + ReadWindowCoveringInstalledOpenLimitLift() + : ReadAttribute("installed-open-limit-lift") { } - ~ReadDoorLockAttributeList() + ~ReadWindowCoveringInstalledOpenLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock AttributeList read Error", error); + LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99242,25 +98941,25 @@ class ReadDoorLockAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + : SubscribeAttribute("installed-open-limit-lift") { } - ~SubscribeAttributeDoorLockAttributeList() + ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99271,10 +98970,10 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99288,34 +98987,34 @@ class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute InstalledClosedLimitLift */ -class ReadDoorLockFeatureMap : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { public: - ReadDoorLockFeatureMap() - : ReadAttribute("feature-map") + ReadWindowCoveringInstalledClosedLimitLift() + : ReadAttribute("installed-closed-limit-lift") { } - ~ReadDoorLockFeatureMap() + ~ReadWindowCoveringInstalledClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock FeatureMap read Error", error); + LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99324,25 +99023,25 @@ class ReadDoorLockFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributeDoorLockFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + : SubscribeAttribute("installed-closed-limit-lift") { } - ~SubscribeAttributeDoorLockFeatureMap() + ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99353,10 +99052,10 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99370,34 +99069,34 @@ class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute InstalledOpenLimitTilt */ -class ReadDoorLockClusterRevision : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { public: - ReadDoorLockClusterRevision() - : ReadAttribute("cluster-revision") + ReadWindowCoveringInstalledOpenLimitTilt() + : ReadAttribute("installed-open-limit-tilt") { } - ~ReadDoorLockClusterRevision() + ~ReadWindowCoveringInstalledOpenLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DoorLock ClusterRevision read Error", error); + LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99406,25 +99105,25 @@ class ReadDoorLockClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { public: - SubscribeAttributeDoorLockClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + : SubscribeAttribute("installed-open-limit-tilt") { } - ~SubscribeAttributeDoorLockClusterRevision() + ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DoorLock::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DoorLock::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -99435,10 +99134,10 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99451,423 +99150,181 @@ class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command UpOrOpen + * Attribute InstalledClosedLimitTilt */ -class WindowCoveringUpOrOpen : public ClusterCommand { +class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { public: - WindowCoveringUpOrOpen() - : ClusterCommand("up-or-open") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadWindowCoveringInstalledClosedLimitTilt() + : ReadAttribute("installed-closed-limit-tilt") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster upOrOpenWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command DownOrClose - */ -class WindowCoveringDownOrClose : public ClusterCommand { -public: - WindowCoveringDownOrClose() - : ClusterCommand("down-or-close") + ~ReadWindowCoveringInstalledClosedLimitTilt() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster downOrCloseWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command StopMotion - */ -class WindowCoveringStopMotion : public ClusterCommand { +class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { public: - WindowCoveringStopMotion() - : ClusterCommand("stop-motion") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + : SubscribeAttribute("installed-closed-limit-tilt") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::StopMotion::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMotionWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command GoToLiftValue - */ -class WindowCoveringGoToLiftValue : public ClusterCommand { -public: - WindowCoveringGoToLiftValue() - : ClusterCommand("go-to-lift-value") + ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftValueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; -}; - -/* - * Command GoToLiftPercentage - */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand { -public: - WindowCoveringGoToLiftPercentage() - : ClusterCommand("go-to-lift-percentage") - { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToLiftPercentageWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; /* - * Command GoToTiltValue + * Attribute Mode */ -class WindowCoveringGoToTiltValue : public ClusterCommand { +class ReadWindowCoveringMode : public ReadAttribute { public: - WindowCoveringGoToTiltValue() - : ClusterCommand("go-to-tilt-value") - { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadWindowCoveringMode() + : ReadAttribute("mode") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltValueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; -}; - -/* - * Command GoToTiltPercentage - */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand { -public: - WindowCoveringGoToTiltPercentage() - : ClusterCommand("go-to-tilt-percentage") + ~ReadWindowCoveringMode() { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster goToTiltPercentageWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WindowCovering Mode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -/* - * Attribute Type - */ -class ReadWindowCoveringType : public ReadAttribute { +class WriteWindowCoveringMode : public WriteAttribute { public: - ReadWindowCoveringType() - : ReadAttribute("type") + WriteWindowCoveringMode() + : WriteAttribute("mode") { + AddArgument("attr-name", "mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadWindowCoveringType() + ~WriteWindowCoveringMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("WindowCovering Type read Error", error); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringType() - : SubscribeAttribute("type") + SubscribeAttributeWindowCoveringMode() + : SubscribeAttribute("mode") { } - ~SubscribeAttributeWindowCoveringType() + ~SubscribeAttributeWindowCoveringMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Type::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99882,10 +99339,10 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTypeWithParams:params + [cluster subscribeAttributeModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); + NSLog(@"WindowCovering.Mode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99899,34 +99356,34 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { }; /* - * Attribute PhysicalClosedLimitLift + * Attribute SafetyStatus */ -class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { +class ReadWindowCoveringSafetyStatus : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitLift() - : ReadAttribute("physical-closed-limit-lift") + ReadWindowCoveringSafetyStatus() + : ReadAttribute("safety-status") { } - ~ReadWindowCoveringPhysicalClosedLimitLift() + ~ReadWindowCoveringSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + LogNSError("WindowCovering SafetyStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99935,21 +99392,21 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() - : SubscribeAttribute("physical-closed-limit-lift") + SubscribeAttributeWindowCoveringSafetyStatus() + : SubscribeAttribute("safety-status") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + ~SubscribeAttributeWindowCoveringSafetyStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99964,10 +99421,10 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params + [cluster subscribeAttributeSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99981,34 +99438,34 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe }; /* - * Attribute PhysicalClosedLimitTilt + * Attribute GeneratedCommandList */ -class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { +class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitTilt() - : ReadAttribute("physical-closed-limit-tilt") + ReadWindowCoveringGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadWindowCoveringPhysicalClosedLimitTilt() + ~ReadWindowCoveringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + LogNSError("WindowCovering GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100017,21 +99474,21 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() - : SubscribeAttribute("physical-closed-limit-tilt") + SubscribeAttributeWindowCoveringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + ~SubscribeAttributeWindowCoveringGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::PhysicalClosedLimitTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100046,10 +99503,10 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100063,34 +99520,34 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe }; /* - * Attribute CurrentPositionLift + * Attribute AcceptedCommandList */ -class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { +class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLift() - : ReadAttribute("current-position-lift") + ReadWindowCoveringAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadWindowCoveringCurrentPositionLift() + ~ReadWindowCoveringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLift read Error", error); + LogNSError("WindowCovering AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100099,21 +99556,21 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLift() - : SubscribeAttribute("current-position-lift") + SubscribeAttributeWindowCoveringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLift() + ~SubscribeAttributeWindowCoveringAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100128,10 +99585,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100144,35 +99601,37 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionTilt + * Attribute EventList */ -class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { +class ReadWindowCoveringEventList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTilt() - : ReadAttribute("current-position-tilt") + ReadWindowCoveringEventList() + : ReadAttribute("event-list") { } - ~ReadWindowCoveringCurrentPositionTilt() + ~ReadWindowCoveringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTilt read Error", error); + LogNSError("WindowCovering EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100181,21 +99640,21 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTilt() - : SubscribeAttribute("current-position-tilt") + SubscribeAttributeWindowCoveringEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTilt() + ~SubscribeAttributeWindowCoveringEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100210,10 +99669,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100226,35 +99685,37 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute NumberOfActuationsLift + * Attribute AttributeList */ -class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { +class ReadWindowCoveringAttributeList : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsLift() - : ReadAttribute("number-of-actuations-lift") + ReadWindowCoveringAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWindowCoveringNumberOfActuationsLift() + ~ReadWindowCoveringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering NumberOfActuationsLift read Error", error); + LogNSError("WindowCovering AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100263,21 +99724,21 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsLift() - : SubscribeAttribute("number-of-actuations-lift") + SubscribeAttributeWindowCoveringAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() + ~SubscribeAttributeWindowCoveringAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsLift::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100292,10 +99753,10 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100309,34 +99770,34 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA }; /* - * Attribute NumberOfActuationsTilt + * Attribute FeatureMap */ -class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { +class ReadWindowCoveringFeatureMap : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsTilt() - : ReadAttribute("number-of-actuations-tilt") + ReadWindowCoveringFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWindowCoveringNumberOfActuationsTilt() + ~ReadWindowCoveringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); + LogNSError("WindowCovering FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100345,21 +99806,21 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsTilt() - : SubscribeAttribute("number-of-actuations-tilt") + SubscribeAttributeWindowCoveringFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + ~SubscribeAttributeWindowCoveringFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::NumberOfActuationsTilt::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100374,10 +99835,10 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100391,34 +99852,34 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA }; /* - * Attribute ConfigStatus + * Attribute ClusterRevision */ -class ReadWindowCoveringConfigStatus : public ReadAttribute { +class ReadWindowCoveringClusterRevision : public ReadAttribute { public: - ReadWindowCoveringConfigStatus() - : ReadAttribute("config-status") + ReadWindowCoveringClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWindowCoveringConfigStatus() + ~ReadWindowCoveringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering ConfigStatus read Error", error); + LogNSError("WindowCovering ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100427,21 +99888,21 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringConfigStatus() - : SubscribeAttribute("config-status") + SubscribeAttributeWindowCoveringClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWindowCoveringConfigStatus() + ~SubscribeAttributeWindowCoveringClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100456,10 +99917,10 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConfigStatusWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100472,35 +99933,191 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ServiceArea | 0x0150 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectAreas | 0x00 | +| * SkipArea | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedAreas | 0x0000 | +| * SupportedMaps | 0x0001 | +| * SelectedAreas | 0x0002 | +| * CurrentArea | 0x0003 | +| * EstimatedEndTime | 0x0004 | +| * Progress | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentPositionLiftPercentage + * Command SelectAreas */ -class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { +class ServiceAreaSelectAreas : public ClusterCommand { public: - ReadWindowCoveringCurrentPositionLiftPercentage() - : ReadAttribute("current-position-lift-percentage") + ServiceAreaSelectAreas() + : ClusterCommand("select-areas") + , mComplex_NewAreas(&mRequest.newAreas) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewAreas", &mComplex_NewAreas); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectAreas::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.newAreas) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + params.newAreas = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster selectAreasWithParams:params completion: + ^(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadWindowCoveringCurrentPositionLiftPercentage() +private: + chip::app::Clusters::ServiceArea::Commands::SelectAreas::Type mRequest; + TypedComplexArgument> mComplex_NewAreas; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SkipArea + */ +class ServiceAreaSkipArea : public ClusterCommand { +public: + ServiceAreaSkipArea() + : ClusterCommand("skip-area") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("SkippedArea", 0, UINT32_MAX, &mRequest.skippedArea); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipArea::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.skippedArea = [NSNumber numberWithUnsignedInt:mRequest.skippedArea]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipAreaWithParams:params completion: + ^(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ServiceArea::Commands::SkipArea::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedAreas + */ +class ReadServiceAreaSupportedAreas : public ReadAttribute { +public: + ReadServiceAreaSupportedAreas() + : ReadAttribute("supported-areas") + { + } + + ~ReadServiceAreaSupportedAreas() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); + LogNSError("ServiceArea SupportedAreas read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100509,25 +100126,25 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { +class SubscribeAttributeServiceAreaSupportedAreas : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() - : SubscribeAttribute("current-position-lift-percentage") + SubscribeAttributeServiceAreaSupportedAreas() + : SubscribeAttribute("supported-areas") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + ~SubscribeAttributeServiceAreaSupportedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100538,10 +100155,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params + [cluster subscribeAttributeSupportedAreasWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100554,35 +100171,38 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionTiltPercentage + * Attribute SupportedMaps */ -class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { +class ReadServiceAreaSupportedMaps : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercentage() - : ReadAttribute("current-position-tilt-percentage") + ReadServiceAreaSupportedMaps() + : ReadAttribute("supported-maps") { } - ~ReadWindowCoveringCurrentPositionTiltPercentage() + ~ReadServiceAreaSupportedMaps() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedMaps::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedMapsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SupportedMaps response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); + LogNSError("ServiceArea SupportedMaps read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100591,25 +100211,25 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { +class SubscribeAttributeServiceAreaSupportedMaps : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() - : SubscribeAttribute("current-position-tilt-percentage") + SubscribeAttributeServiceAreaSupportedMaps() + : SubscribeAttribute("supported-maps") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + ~SubscribeAttributeServiceAreaSupportedMaps() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedMaps::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100620,10 +100240,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params + [cluster subscribeAttributeSupportedMapsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SupportedMaps response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100636,35 +100256,38 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OperationalStatus + * Attribute SelectedAreas */ -class ReadWindowCoveringOperationalStatus : public ReadAttribute { +class ReadServiceAreaSelectedAreas : public ReadAttribute { public: - ReadWindowCoveringOperationalStatus() - : ReadAttribute("operational-status") + ReadServiceAreaSelectedAreas() + : ReadAttribute("selected-areas") { } - ~ReadWindowCoveringOperationalStatus() + ~ReadServiceAreaSelectedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering OperationalStatus read Error", error); + LogNSError("ServiceArea SelectedAreas read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100673,25 +100296,25 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { +class SubscribeAttributeServiceAreaSelectedAreas : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringOperationalStatus() - : SubscribeAttribute("operational-status") + SubscribeAttributeServiceAreaSelectedAreas() + : SubscribeAttribute("selected-areas") { } - ~SubscribeAttributeWindowCoveringOperationalStatus() + ~SubscribeAttributeServiceAreaSelectedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100702,10 +100325,10 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStatusWithParams:params + [cluster subscribeAttributeSelectedAreasWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100718,35 +100341,38 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TargetPositionLiftPercent100ths + * Attribute CurrentArea */ -class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { +class ReadServiceAreaCurrentArea : public ReadAttribute { public: - ReadWindowCoveringTargetPositionLiftPercent100ths() - : ReadAttribute("target-position-lift-percent100ths") + ReadServiceAreaCurrentArea() + : ReadAttribute("current-area") { } - ~ReadWindowCoveringTargetPositionLiftPercent100ths() + ~ReadServiceAreaCurrentArea() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentAreaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.CurrentArea response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + LogNSError("ServiceArea CurrentArea read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100755,25 +100381,25 @@ class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { +class SubscribeAttributeServiceAreaCurrentArea : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() - : SubscribeAttribute("target-position-lift-percent100ths") + SubscribeAttributeServiceAreaCurrentArea() + : SubscribeAttribute("current-area") { } - ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + ~SubscribeAttributeServiceAreaCurrentArea() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100784,10 +100410,10 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeCurrentAreaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + NSLog(@"ServiceArea.CurrentArea response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100800,35 +100426,38 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TargetPositionTiltPercent100ths + * Attribute EstimatedEndTime */ -class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { +class ReadServiceAreaEstimatedEndTime : public ReadAttribute { public: - ReadWindowCoveringTargetPositionTiltPercent100ths() - : ReadAttribute("target-position-tilt-percent100ths") + ReadServiceAreaEstimatedEndTime() + : ReadAttribute("estimated-end-time") { } - ~ReadWindowCoveringTargetPositionTiltPercent100ths() + ~ReadServiceAreaEstimatedEndTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::EstimatedEndTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEstimatedEndTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.EstimatedEndTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + LogNSError("ServiceArea EstimatedEndTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100837,25 +100466,25 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { +class SubscribeAttributeServiceAreaEstimatedEndTime : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() - : SubscribeAttribute("target-position-tilt-percent100ths") + SubscribeAttributeServiceAreaEstimatedEndTime() + : SubscribeAttribute("estimated-end-time") { } - ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + ~SubscribeAttributeServiceAreaEstimatedEndTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::EstimatedEndTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100866,10 +100495,10 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeEstimatedEndTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + NSLog(@"ServiceArea.EstimatedEndTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100882,35 +100511,38 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EndProductType + * Attribute Progress */ -class ReadWindowCoveringEndProductType : public ReadAttribute { +class ReadServiceAreaProgress : public ReadAttribute { public: - ReadWindowCoveringEndProductType() - : ReadAttribute("end-product-type") + ReadServiceAreaProgress() + : ReadAttribute("progress") { } - ~ReadWindowCoveringEndProductType() + ~ReadServiceAreaProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::Progress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProgressWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.Progress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering EndProductType read Error", error); + LogNSError("ServiceArea Progress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100919,25 +100551,25 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { +class SubscribeAttributeServiceAreaProgress : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringEndProductType() - : SubscribeAttribute("end-product-type") + SubscribeAttributeServiceAreaProgress() + : SubscribeAttribute("progress") { } - ~SubscribeAttributeWindowCoveringEndProductType() + ~SubscribeAttributeServiceAreaProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EndProductType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::Progress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -100948,10 +100580,10 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndProductTypeWithParams:params + [cluster subscribeAttributeProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.Progress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100964,35 +100596,38 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionLiftPercent100ths + * Attribute GeneratedCommandList */ -class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { +class ReadServiceAreaGeneratedCommandList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLiftPercent100ths() - : ReadAttribute("current-position-lift-percent100ths") + ReadServiceAreaGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadWindowCoveringCurrentPositionLiftPercent100ths() + ~ReadServiceAreaGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + LogNSError("ServiceArea GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101001,25 +100636,25 @@ class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { +class SubscribeAttributeServiceAreaGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() - : SubscribeAttribute("current-position-lift-percent100ths") + SubscribeAttributeServiceAreaGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + ~SubscribeAttributeServiceAreaGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101030,10 +100665,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101046,35 +100681,38 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentPositionTiltPercent100ths + * Attribute AcceptedCommandList */ -class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { +class ReadServiceAreaAcceptedCommandList : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercent100ths() - : ReadAttribute("current-position-tilt-percent100ths") + ReadServiceAreaAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadWindowCoveringCurrentPositionTiltPercent100ths() + ~ReadServiceAreaAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + LogNSError("ServiceArea AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101083,25 +100721,25 @@ class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { +class SubscribeAttributeServiceAreaAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() - : SubscribeAttribute("current-position-tilt-percent100ths") + SubscribeAttributeServiceAreaAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + ~SubscribeAttributeServiceAreaAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101112,10 +100750,10 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101128,35 +100766,38 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InstalledOpenLimitLift + * Attribute EventList */ -class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { +class ReadServiceAreaEventList : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitLift() - : ReadAttribute("installed-open-limit-lift") + ReadServiceAreaEventList() + : ReadAttribute("event-list") { } - ~ReadWindowCoveringInstalledOpenLimitLift() + ~ReadServiceAreaEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); + LogNSError("ServiceArea EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101165,25 +100806,25 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { +class SubscribeAttributeServiceAreaEventList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitLift() - : SubscribeAttribute("installed-open-limit-lift") + SubscribeAttributeServiceAreaEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + ~SubscribeAttributeServiceAreaEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101194,10 +100835,10 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101210,35 +100851,38 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InstalledClosedLimitLift + * Attribute AttributeList */ -class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { +class ReadServiceAreaAttributeList : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitLift() - : ReadAttribute("installed-closed-limit-lift") + ReadServiceAreaAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadWindowCoveringInstalledClosedLimitLift() + ~ReadServiceAreaAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + LogNSError("ServiceArea AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101247,25 +100891,25 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeServiceAreaAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitLift() - : SubscribeAttribute("installed-closed-limit-lift") + SubscribeAttributeServiceAreaAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + ~SubscribeAttributeServiceAreaAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitLift::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101276,10 +100920,10 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101292,35 +100936,38 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InstalledOpenLimitTilt + * Attribute FeatureMap */ -class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { +class ReadServiceAreaFeatureMap : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitTilt() - : ReadAttribute("installed-open-limit-tilt") + ReadServiceAreaFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadWindowCoveringInstalledOpenLimitTilt() + ~ReadServiceAreaFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + LogNSError("ServiceArea FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101329,25 +100976,25 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { +class SubscribeAttributeServiceAreaFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() - : SubscribeAttribute("installed-open-limit-tilt") + SubscribeAttributeServiceAreaFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + ~SubscribeAttributeServiceAreaFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledOpenLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101358,10 +101005,10 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + NSLog(@"ServiceArea.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101374,35 +101021,38 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute InstalledClosedLimitTilt + * Attribute ClusterRevision */ -class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { +class ReadServiceAreaClusterRevision : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitTilt() - : ReadAttribute("installed-closed-limit-tilt") + ReadServiceAreaClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWindowCoveringInstalledClosedLimitTilt() + ~ReadServiceAreaClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + LogNSError("ServiceArea ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101411,25 +101061,25 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { +class SubscribeAttributeServiceAreaClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() - : SubscribeAttribute("installed-closed-limit-tilt") + SubscribeAttributeServiceAreaClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + ~SubscribeAttributeServiceAreaClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::InstalledClosedLimitTilt::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101440,10 +101090,10 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + NSLog(@"ServiceArea.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101456,103 +101106,120 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute Mode + * Attribute MaxPressure */ -class ReadWindowCoveringMode : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { public: - ReadWindowCoveringMode() - : ReadAttribute("mode") + ReadPumpConfigurationAndControlMaxPressure() + : ReadAttribute("max-pressure") { } - ~ReadWindowCoveringMode() + ~ReadPumpConfigurationAndControlMaxPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering Mode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteWindowCoveringMode : public WriteAttribute { -public: - WriteWindowCoveringMode() - : WriteAttribute("mode") - { - AddArgument("attr-name", "mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWindowCoveringMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); + LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringMode() - : SubscribeAttribute("mode") + SubscribeAttributePumpConfigurationAndControlMaxPressure() + : SubscribeAttribute("max-pressure") { } - ~SubscribeAttributeWindowCoveringMode() + ~SubscribeAttributePumpConfigurationAndControlMaxPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::Mode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101563,10 +101230,10 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeModeWithParams:params + [cluster subscribeAttributeMaxPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101580,34 +101247,34 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { }; /* - * Attribute SafetyStatus + * Attribute MaxSpeed */ -class ReadWindowCoveringSafetyStatus : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { public: - ReadWindowCoveringSafetyStatus() - : ReadAttribute("safety-status") + ReadPumpConfigurationAndControlMaxSpeed() + : ReadAttribute("max-speed") { } - ~ReadWindowCoveringSafetyStatus() + ~ReadPumpConfigurationAndControlMaxSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering SafetyStatus read Error", error); + LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101616,25 +101283,25 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringSafetyStatus() - : SubscribeAttribute("safety-status") + SubscribeAttributePumpConfigurationAndControlMaxSpeed() + : SubscribeAttribute("max-speed") { } - ~SubscribeAttributeWindowCoveringSafetyStatus() + ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101645,10 +101312,10 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSafetyStatusWithParams:params + [cluster subscribeAttributeMaxSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101662,34 +101329,34 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute MaxFlow */ -class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { public: - ReadWindowCoveringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPumpConfigurationAndControlMaxFlow() + : ReadAttribute("max-flow") { } - ~ReadWindowCoveringGeneratedCommandList() + ~ReadPumpConfigurationAndControlMaxFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101698,25 +101365,25 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePumpConfigurationAndControlMaxFlow() + : SubscribeAttribute("max-flow") { } - ~SubscribeAttributeWindowCoveringGeneratedCommandList() + ~SubscribeAttributePumpConfigurationAndControlMaxFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101727,10 +101394,10 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101744,34 +101411,34 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt }; /* - * Attribute AcceptedCommandList + * Attribute MinConstPressure */ -class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { public: - ReadWindowCoveringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPumpConfigurationAndControlMinConstPressure() + : ReadAttribute("min-const-pressure") { } - ~ReadWindowCoveringAcceptedCommandList() + ~ReadPumpConfigurationAndControlMinConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering AcceptedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101780,25 +101447,25 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePumpConfigurationAndControlMinConstPressure() + : SubscribeAttribute("min-const-pressure") { } - ~SubscribeAttributeWindowCoveringAcceptedCommandList() + ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101809,10 +101476,10 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101825,37 +101492,35 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxConstPressure */ -class ReadWindowCoveringEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { public: - ReadWindowCoveringEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlMaxConstPressure() + : ReadAttribute("max-const-pressure") { } - ~ReadWindowCoveringEventList() + ~ReadPumpConfigurationAndControlMaxConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering EventList read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101864,25 +101529,25 @@ class ReadWindowCoveringEventList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + : SubscribeAttribute("max-const-pressure") { } - ~SubscribeAttributeWindowCoveringEventList() + ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101893,10 +101558,10 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101909,37 +101574,35 @@ class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute MinCompPressure */ -class ReadWindowCoveringAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { public: - ReadWindowCoveringAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlMinCompPressure() + : ReadAttribute("min-comp-pressure") { } - ~ReadWindowCoveringAttributeList() + ~ReadPumpConfigurationAndControlMinCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101948,25 +101611,25 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePumpConfigurationAndControlMinCompPressure() + : SubscribeAttribute("min-comp-pressure") { } - ~SubscribeAttributeWindowCoveringAttributeList() + ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -101977,10 +101640,10 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101994,34 +101657,34 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute MaxCompPressure */ -class ReadWindowCoveringFeatureMap : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { public: - ReadWindowCoveringFeatureMap() - : ReadAttribute("feature-map") + ReadPumpConfigurationAndControlMaxCompPressure() + : ReadAttribute("max-comp-pressure") { } - ~ReadWindowCoveringFeatureMap() + ~ReadPumpConfigurationAndControlMaxCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering FeatureMap read Error", error); + LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102030,25 +101693,25 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + : SubscribeAttribute("max-comp-pressure") { } - ~SubscribeAttributeWindowCoveringFeatureMap() + ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102059,10 +101722,10 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102076,34 +101739,34 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MinConstSpeed */ -class ReadWindowCoveringClusterRevision : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { public: - ReadWindowCoveringClusterRevision() - : ReadAttribute("cluster-revision") + ReadPumpConfigurationAndControlMinConstSpeed() + : ReadAttribute("min-const-speed") { } - ~ReadWindowCoveringClusterRevision() + ~ReadPumpConfigurationAndControlMinConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WindowCovering ClusterRevision read Error", error); + LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102112,25 +101775,25 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + : SubscribeAttribute("min-const-speed") { } - ~SubscribeAttributeWindowCoveringClusterRevision() + ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WindowCovering::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WindowCovering::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102141,10 +101804,10 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102157,154 +101820,35 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command BarrierControlGoToPercent - */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand { -public: - BarrierControlBarrierControlGoToPercent() - : ClusterCommand("barrier-control-go-to-percent") - { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlGoToPercentWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; -}; - -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand { -public: - BarrierControlBarrierControlStop() - : ClusterCommand("barrier-control-stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlStopWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute BarrierMovingState + * Attribute MaxConstSpeed */ -class ReadBarrierControlBarrierMovingState : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { public: - ReadBarrierControlBarrierMovingState() - : ReadAttribute("barrier-moving-state") + ReadPumpConfigurationAndControlMaxConstSpeed() + : ReadAttribute("max-const-speed") { } - ~ReadBarrierControlBarrierMovingState() + ~ReadPumpConfigurationAndControlMaxConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierMovingState read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102313,25 +101857,25 @@ class ReadBarrierControlBarrierMovingState : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierMovingState() - : SubscribeAttribute("barrier-moving-state") + SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + : SubscribeAttribute("max-const-speed") { } - ~SubscribeAttributeBarrierControlBarrierMovingState() + ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102342,10 +101886,10 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierMovingStateWithParams:params + [cluster subscribeAttributeMaxConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102359,34 +101903,34 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri }; /* - * Attribute BarrierSafetyStatus + * Attribute MinConstFlow */ -class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { public: - ReadBarrierControlBarrierSafetyStatus() - : ReadAttribute("barrier-safety-status") + ReadPumpConfigurationAndControlMinConstFlow() + : ReadAttribute("min-const-flow") { } - ~ReadBarrierControlBarrierSafetyStatus() + ~ReadPumpConfigurationAndControlMinConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102395,25 +101939,25 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierSafetyStatus() - : SubscribeAttribute("barrier-safety-status") + SubscribeAttributePumpConfigurationAndControlMinConstFlow() + : SubscribeAttribute("min-const-flow") { } - ~SubscribeAttributeBarrierControlBarrierSafetyStatus() + ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102424,10 +101968,10 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierSafetyStatusWithParams:params + [cluster subscribeAttributeMinConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102441,34 +101985,34 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr }; /* - * Attribute BarrierCapabilities + * Attribute MaxConstFlow */ -class ReadBarrierControlBarrierCapabilities : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { public: - ReadBarrierControlBarrierCapabilities() - : ReadAttribute("barrier-capabilities") + ReadPumpConfigurationAndControlMaxConstFlow() + : ReadAttribute("max-const-flow") { } - ~ReadBarrierControlBarrierCapabilities() + ~ReadPumpConfigurationAndControlMaxConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCapabilities read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102477,25 +102021,25 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCapabilities() - : SubscribeAttribute("barrier-capabilities") + SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + : SubscribeAttribute("max-const-flow") { } - ~SubscribeAttributeBarrierControlBarrierCapabilities() + ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102506,10 +102050,10 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCapabilitiesWithParams:params + [cluster subscribeAttributeMaxConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102523,102 +102067,61 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr }; /* - * Attribute BarrierOpenEvents + * Attribute MinConstTemp */ -class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { public: - ReadBarrierControlBarrierOpenEvents() - : ReadAttribute("barrier-open-events") + ReadPumpConfigurationAndControlMinConstTemp() + : ReadAttribute("min-const-temp") { } - ~ReadBarrierControlBarrierOpenEvents() + ~ReadPumpConfigurationAndControlMinConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierOpenEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenEvents() - : WriteAttribute("barrier-open-events") - { - AddArgument("attr-name", "barrier-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); + LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenEvents() - : SubscribeAttribute("barrier-open-events") + SubscribeAttributePumpConfigurationAndControlMinConstTemp() + : SubscribeAttribute("min-const-temp") { } - ~SubscribeAttributeBarrierControlBarrierOpenEvents() + ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102629,10 +102132,10 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenEventsWithParams:params + [cluster subscribeAttributeMinConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102646,102 +102149,61 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib }; /* - * Attribute BarrierCloseEvents + * Attribute MaxConstTemp */ -class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { public: - ReadBarrierControlBarrierCloseEvents() - : ReadAttribute("barrier-close-events") + ReadPumpConfigurationAndControlMaxConstTemp() + : ReadAttribute("max-const-temp") { } - ~ReadBarrierControlBarrierCloseEvents() + ~ReadPumpConfigurationAndControlMaxConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCloseEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCloseEvents() - : WriteAttribute("barrier-close-events") - { - AddArgument("attr-name", "barrier-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCloseEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); + LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCloseEvents() - : SubscribeAttribute("barrier-close-events") + SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + : SubscribeAttribute("max-const-temp") { } - ~SubscribeAttributeBarrierControlBarrierCloseEvents() + ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102752,10 +102214,10 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCloseEventsWithParams:params + [cluster subscribeAttributeMaxConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102769,102 +102231,61 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri }; /* - * Attribute BarrierCommandOpenEvents + * Attribute PumpStatus */ -class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { public: - ReadBarrierControlBarrierCommandOpenEvents() - : ReadAttribute("barrier-command-open-events") + ReadPumpConfigurationAndControlPumpStatus() + : ReadAttribute("pump-status") { } - ~ReadBarrierControlBarrierCommandOpenEvents() + ~ReadPumpConfigurationAndControlPumpStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandOpenEvents() - : WriteAttribute("barrier-command-open-events") - { - AddArgument("attr-name", "barrier-command-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandOpenEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCommandOpenEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandOpenEvents() - : SubscribeAttribute("barrier-command-open-events") + SubscribeAttributePumpConfigurationAndControlPumpStatus() + : SubscribeAttribute("pump-status") { } - ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + ~SubscribeAttributePumpConfigurationAndControlPumpStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102875,10 +102296,10 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params + [cluster subscribeAttributePumpStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102892,102 +102313,61 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib }; /* - * Attribute BarrierCommandCloseEvents + * Attribute EffectiveOperationMode */ -class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { public: - ReadBarrierControlBarrierCommandCloseEvents() - : ReadAttribute("barrier-command-close-events") + ReadPumpConfigurationAndControlEffectiveOperationMode() + : ReadAttribute("effective-operation-mode") { } - ~ReadBarrierControlBarrierCommandCloseEvents() + ~ReadPumpConfigurationAndControlEffectiveOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { -public: - WriteBarrierControlBarrierCommandCloseEvents() - : WriteAttribute("barrier-command-close-events") - { - AddArgument("attr-name", "barrier-command-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierCommandCloseEvents() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierCommandCloseEventsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandCloseEvents() - : SubscribeAttribute("barrier-command-close-events") + SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + : SubscribeAttribute("effective-operation-mode") { } - ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -102998,10 +102378,10 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params + [cluster subscribeAttributeEffectiveOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103015,102 +102395,61 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri }; /* - * Attribute BarrierOpenPeriod + * Attribute EffectiveControlMode */ -class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { public: - ReadBarrierControlBarrierOpenPeriod() - : ReadAttribute("barrier-open-period") + ReadPumpConfigurationAndControlEffectiveControlMode() + : ReadAttribute("effective-control-mode") { } - ~ReadBarrierControlBarrierOpenPeriod() + ~ReadPumpConfigurationAndControlEffectiveControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierOpenPeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierOpenPeriod() - : WriteAttribute("barrier-open-period") - { - AddArgument("attr-name", "barrier-open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierOpenPeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierOpenPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenPeriod() - : SubscribeAttribute("barrier-open-period") + SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + : SubscribeAttribute("effective-control-mode") { } - ~SubscribeAttributeBarrierControlBarrierOpenPeriod() + ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103121,10 +102460,10 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenPeriodWithParams:params + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103138,102 +102477,61 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib }; /* - * Attribute BarrierClosePeriod + * Attribute Capacity */ -class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { +class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { public: - ReadBarrierControlBarrierClosePeriod() - : ReadAttribute("barrier-close-period") + ReadPumpConfigurationAndControlCapacity() + : ReadAttribute("capacity") { } - ~ReadBarrierControlBarrierClosePeriod() + ~ReadPumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierClosePeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { -public: - WriteBarrierControlBarrierClosePeriod() - : WriteAttribute("barrier-close-period") - { - AddArgument("attr-name", "barrier-close-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBarrierControlBarrierClosePeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeBarrierClosePeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); + LogNSError("PumpConfigurationAndControl Capacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierClosePeriod() - : SubscribeAttribute("barrier-close-period") + SubscribeAttributePumpConfigurationAndControlCapacity() + : SubscribeAttribute("capacity") { } - ~SubscribeAttributeBarrierControlBarrierClosePeriod() + ~SubscribeAttributePumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103244,10 +102542,10 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierClosePeriodWithParams:params + [cluster subscribeAttributeCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103261,34 +102559,34 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri }; /* - * Attribute BarrierPosition + * Attribute Speed */ -class ReadBarrierControlBarrierPosition : public ReadAttribute { +class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { public: - ReadBarrierControlBarrierPosition() - : ReadAttribute("barrier-position") + ReadPumpConfigurationAndControlSpeed() + : ReadAttribute("speed") { } - ~ReadBarrierControlBarrierPosition() + ~ReadPumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl BarrierPosition read Error", error); + LogNSError("PumpConfigurationAndControl Speed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103297,25 +102595,25 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierPosition() - : SubscribeAttribute("barrier-position") + SubscribeAttributePumpConfigurationAndControlSpeed() + : SubscribeAttribute("speed") { } - ~SubscribeAttributeBarrierControlBarrierPosition() + ~SubscribeAttributePumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103326,10 +102624,10 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierPositionWithParams:params + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103343,34 +102641,34 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut }; /* - * Attribute GeneratedCommandList + * Attribute LifetimeRunningHours */ -class ReadBarrierControlGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { public: - ReadBarrierControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPumpConfigurationAndControlLifetimeRunningHours() + : ReadAttribute("lifetime-running-hours") { } - ~ReadBarrierControlGeneratedCommandList() + ~ReadPumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103379,107 +102677,69 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { public: - SubscribeAttributeBarrierControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WritePumpConfigurationAndControlLifetimeRunningHours() + : WriteAttribute("lifetime-running-hours") { + AddArgument("attr-name", "lifetime-running-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlGeneratedCommandList() + ~WritePumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadBarrierControlAcceptedCommandList : public ReadAttribute { -public: - ReadBarrierControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadBarrierControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BarrierControl AcceptedCommandList read Error", error); + [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + : SubscribeAttribute("lifetime-running-hours") { } - ~SubscribeAttributeBarrierControlAcceptedCommandList() + ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103490,10 +102750,10 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103506,37 +102766,35 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute Power */ -class ReadBarrierControlEventList : public ReadAttribute { +class ReadPumpConfigurationAndControlPower : public ReadAttribute { public: - ReadBarrierControlEventList() - : ReadAttribute("event-list") + ReadPumpConfigurationAndControlPower() + : ReadAttribute("power") { } - ~ReadBarrierControlEventList() + ~ReadPumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl EventList read Error", error); + LogNSError("PumpConfigurationAndControl Power read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103545,25 +102803,25 @@ class ReadBarrierControlEventList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePumpConfigurationAndControlPower() + : SubscribeAttribute("power") { } - ~SubscribeAttributeBarrierControlEventList() + ~SubscribeAttributePumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103574,10 +102832,10 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103590,37 +102848,35 @@ class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute LifetimeEnergyConsumed */ -class ReadBarrierControlAttributeList : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { public: - ReadBarrierControlAttributeList() - : ReadAttribute("attribute-list") + ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + : ReadAttribute("lifetime-energy-consumed") { } - ~ReadBarrierControlAttributeList() + ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl AttributeList read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103629,107 +102885,69 @@ class ReadBarrierControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { public: - SubscribeAttributeBarrierControlAttributeList() - : SubscribeAttribute("attribute-list") + WritePumpConfigurationAndControlLifetimeEnergyConsumed() + : WriteAttribute("lifetime-energy-consumed") { + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlAttributeList() + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadBarrierControlFeatureMap : public ReadAttribute { -public: - ReadBarrierControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadBarrierControlFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BarrierControl FeatureMap read Error", error); + [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + : SubscribeAttribute("lifetime-energy-consumed") { } - ~SubscribeAttributeBarrierControlFeatureMap() + ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103740,10 +102958,10 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103757,34 +102975,34 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute OperationMode */ -class ReadBarrierControlClusterRevision : public ReadAttribute { +class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { public: - ReadBarrierControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadPumpConfigurationAndControlOperationMode() + : ReadAttribute("operation-mode") { } - ~ReadBarrierControlClusterRevision() + ~ReadPumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BarrierControl ClusterRevision read Error", error); + LogNSError("PumpConfigurationAndControl OperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103793,25 +103011,66 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { +class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { public: - SubscribeAttributeBarrierControlClusterRevision() - : SubscribeAttribute("cluster-revision") + WritePumpConfigurationAndControlOperationMode() + : WriteAttribute("operation-mode") + { + AddArgument("attr-name", "operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WritePumpConfigurationAndControlOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlOperationMode() + : SubscribeAttribute("operation-mode") { } - ~SubscribeAttributeBarrierControlClusterRevision() + ~SubscribeAttributePumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -103822,10 +103081,10 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103838,218 +103097,103 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ServiceArea | 0x0150 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectAreas | 0x00 | -| * SkipArea | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedAreas | 0x0000 | -| * SupportedMaps | 0x0001 | -| * SelectedAreas | 0x0002 | -| * CurrentArea | 0x0003 | -| * EstimatedEndTime | 0x0004 | -| * Progress | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL /* - * Command SelectAreas + * Attribute ControlMode */ -class ServiceAreaSelectAreas : public ClusterCommand { +class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { public: - ServiceAreaSelectAreas() - : ClusterCommand("select-areas") - , mComplex_NewAreas(&mRequest.newAreas) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewAreas", &mComplex_NewAreas); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadPumpConfigurationAndControlControlMode() + : ReadAttribute("control-mode") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectAreas::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.newAreas) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - params.newAreas = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectAreasWithParams:params completion: - ^(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ServiceArea::Commands::SelectAreas::Type mRequest; - TypedComplexArgument> mComplex_NewAreas; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SkipArea - */ -class ServiceAreaSkipArea : public ClusterCommand { -public: - ServiceAreaSkipArea() - : ClusterCommand("skip-area") + ~ReadPumpConfigurationAndControlControlMode() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("SkippedArea", 0, UINT32_MAX, &mRequest.skippedArea); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipArea::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.skippedArea = [NSNumber numberWithUnsignedInt:mRequest.skippedArea]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipAreaWithParams:params completion: - ^(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl ControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ServiceArea::Commands::SkipArea::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute SupportedAreas - */ -class ReadServiceAreaSupportedAreas : public ReadAttribute { +class WritePumpConfigurationAndControlControlMode : public WriteAttribute { public: - ReadServiceAreaSupportedAreas() - : ReadAttribute("supported-areas") + WritePumpConfigurationAndControlControlMode() + : WriteAttribute("control-mode") { + AddArgument("attr-name", "control-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadServiceAreaSupportedAreas() + ~WritePumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ServiceArea SupportedAreas read Error", error); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeServiceAreaSupportedAreas : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaSupportedAreas() - : SubscribeAttribute("supported-areas") + SubscribeAttributePumpConfigurationAndControlControlMode() + : SubscribeAttribute("control-mode") { } - ~SubscribeAttributeServiceAreaSupportedAreas() + ~SubscribeAttributePumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104060,10 +103204,10 @@ class SubscribeAttributeServiceAreaSupportedAreas : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedAreasWithParams:params + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104076,38 +103220,35 @@ class SubscribeAttributeServiceAreaSupportedAreas : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedMaps + * Attribute GeneratedCommandList */ -class ReadServiceAreaSupportedMaps : public ReadAttribute { +class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadServiceAreaSupportedMaps() - : ReadAttribute("supported-maps") + ReadPumpConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadServiceAreaSupportedMaps() + ~ReadPumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedMaps::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedMapsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedMaps response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea SupportedMaps read Error", error); + LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104116,25 +103257,25 @@ class ReadServiceAreaSupportedMaps : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaSupportedMaps : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaSupportedMaps() - : SubscribeAttribute("supported-maps") + SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeServiceAreaSupportedMaps() + ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedMaps::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104145,10 +103286,10 @@ class SubscribeAttributeServiceAreaSupportedMaps : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedMapsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedMaps response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104161,38 +103302,35 @@ class SubscribeAttributeServiceAreaSupportedMaps : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SelectedAreas + * Attribute AcceptedCommandList */ -class ReadServiceAreaSelectedAreas : public ReadAttribute { +class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadServiceAreaSelectedAreas() - : ReadAttribute("selected-areas") + ReadPumpConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadServiceAreaSelectedAreas() + ~ReadPumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea SelectedAreas read Error", error); + LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104201,25 +103339,25 @@ class ReadServiceAreaSelectedAreas : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaSelectedAreas : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaSelectedAreas() - : SubscribeAttribute("selected-areas") + SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeServiceAreaSelectedAreas() + ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104230,10 +103368,10 @@ class SubscribeAttributeServiceAreaSelectedAreas : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedAreasWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104246,38 +103384,37 @@ class SubscribeAttributeServiceAreaSelectedAreas : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentArea + * Attribute EventList */ -class ReadServiceAreaCurrentArea : public ReadAttribute { +class ReadPumpConfigurationAndControlEventList : public ReadAttribute { public: - ReadServiceAreaCurrentArea() - : ReadAttribute("current-area") + ReadPumpConfigurationAndControlEventList() + : ReadAttribute("event-list") { } - ~ReadServiceAreaCurrentArea() + ~ReadPumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentAreaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.CurrentArea response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea CurrentArea read Error", error); + LogNSError("PumpConfigurationAndControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104286,25 +103423,25 @@ class ReadServiceAreaCurrentArea : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaCurrentArea : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaCurrentArea() - : SubscribeAttribute("current-area") + SubscribeAttributePumpConfigurationAndControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeServiceAreaCurrentArea() + ~SubscribeAttributePumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104315,10 +103452,10 @@ class SubscribeAttributeServiceAreaCurrentArea : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentAreaWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.CurrentArea response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104332,37 +103469,36 @@ class SubscribeAttributeServiceAreaCurrentArea : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute EstimatedEndTime + * Attribute AttributeList */ -class ReadServiceAreaEstimatedEndTime : public ReadAttribute { +class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadServiceAreaEstimatedEndTime() - : ReadAttribute("estimated-end-time") + ReadPumpConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadServiceAreaEstimatedEndTime() + ~ReadPumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::EstimatedEndTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEstimatedEndTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.EstimatedEndTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea EstimatedEndTime read Error", error); + LogNSError("PumpConfigurationAndControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104371,25 +103507,25 @@ class ReadServiceAreaEstimatedEndTime : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaEstimatedEndTime : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaEstimatedEndTime() - : SubscribeAttribute("estimated-end-time") + SubscribeAttributePumpConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeServiceAreaEstimatedEndTime() + ~SubscribeAttributePumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::EstimatedEndTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104400,10 +103536,10 @@ class SubscribeAttributeServiceAreaEstimatedEndTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEstimatedEndTimeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.EstimatedEndTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104416,38 +103552,35 @@ class SubscribeAttributeServiceAreaEstimatedEndTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Progress + * Attribute FeatureMap */ -class ReadServiceAreaProgress : public ReadAttribute { +class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadServiceAreaProgress() - : ReadAttribute("progress") + ReadPumpConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadServiceAreaProgress() + ~ReadPumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::Progress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProgressWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.Progress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea Progress read Error", error); + LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104456,25 +103589,25 @@ class ReadServiceAreaProgress : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaProgress : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaProgress() - : SubscribeAttribute("progress") + SubscribeAttributePumpConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeServiceAreaProgress() + ~SubscribeAttributePumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::Progress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104485,10 +103618,10 @@ class SubscribeAttributeServiceAreaProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProgressWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.Progress response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104501,38 +103634,35 @@ class SubscribeAttributeServiceAreaProgress : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadServiceAreaGeneratedCommandList : public ReadAttribute { +class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { public: - ReadServiceAreaGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPumpConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadServiceAreaGeneratedCommandList() + ~ReadPumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea GeneratedCommandList read Error", error); + LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104541,25 +103671,25 @@ class ReadServiceAreaGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePumpConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeServiceAreaGeneratedCommandList() + ~SubscribeAttributePumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104570,10 +103700,10 @@ class SubscribeAttributeServiceAreaGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104586,293 +103716,536 @@ class SubscribeAttributeServiceAreaGeneratedCommandList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +| * SetActiveScheduleRequest | 0x05 | +| * SetActivePresetRequest | 0x06 | +| * AtomicRequest | 0xFE | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * PresetTypes | 0x0048 | +| * ScheduleTypes | 0x0049 | +| * NumberOfPresets | 0x004A | +| * NumberOfSchedules | 0x004B | +| * NumberOfScheduleTransitions | 0x004C | +| * NumberOfScheduleTransitionPerDay | 0x004D | +| * ActivePresetHandle | 0x004E | +| * ActiveScheduleHandle | 0x004F | +| * Presets | 0x0050 | +| * Schedules | 0x0051 | +| * SetpointHoldExpiryTimestamp | 0x0052 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute AcceptedCommandList + * Command SetpointRaiseLower */ -class ReadServiceAreaAcceptedCommandList : public ReadAttribute { +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ReadServiceAreaAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadServiceAreaAcceptedCommandList() + ThermostatSetpointRaiseLower() + : ClusterCommand("setpoint-raise-lower") { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ServiceArea AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; + params.amount = [NSNumber numberWithChar:mRequest.amount]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setpointRaiseLowerWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; -class SubscribeAttributeServiceAreaAcceptedCommandList : public SubscribeAttribute { +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand { public: - SubscribeAttributeServiceAreaAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeServiceAreaAcceptedCommandList() + ThermostatSetWeeklySchedule() + : ClusterCommand("set-weekly-schedule") + , mComplex_Transitions(&mRequest.transitions) { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; + params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.transitions) { + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; } - SetCommandExitStatus(error); - }]; - + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; + } + params.transitions = array_0; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeeklyScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument> mComplex_Transitions; +}; /* - * Attribute EventList + * Command GetWeeklySchedule */ -class ReadServiceAreaEventList : public ReadAttribute { +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - ReadServiceAreaEventList() - : ReadAttribute("event-list") - { - } - - ~ReadServiceAreaEventList() + ThermostatGetWeeklySchedule() + : ClusterCommand("get-weekly-schedule") { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ServiceArea EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; + params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeeklyScheduleWithParams:params completion: + ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; -class SubscribeAttributeServiceAreaEventList : public SubscribeAttribute { +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand { public: - SubscribeAttributeServiceAreaEventList() - : SubscribeAttribute("event-list") + ThermostatClearWeeklySchedule() + : ClusterCommand("clear-weekly-schedule") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeServiceAreaEventList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeeklyScheduleWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetActiveScheduleRequest + */ +class ThermostatSetActiveScheduleRequest : public ClusterCommand { +public: + ThermostatSetActiveScheduleRequest() + : ClusterCommand("set-active-schedule-request") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ScheduleHandle", &mRequest.scheduleHandle); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetActiveScheduleRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.scheduleHandle = [NSData dataWithBytes:mRequest.scheduleHandle.data() length:mRequest.scheduleHandle.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setActiveScheduleRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Command SetActivePresetRequest */ -class ReadServiceAreaAttributeList : public ReadAttribute { +class ThermostatSetActivePresetRequest : public ClusterCommand { public: - ReadServiceAreaAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadServiceAreaAttributeList() + ThermostatSetActivePresetRequest() + : ClusterCommand("set-active-preset-request") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PresetHandle", &mRequest.presetHandle); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ServiceArea AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetActivePresetRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.presetHandle.IsNull()) { + params.presetHandle = nil; + } else { + params.presetHandle = [NSData dataWithBytes:mRequest.presetHandle.Value().data() length:mRequest.presetHandle.Value().size()]; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setActivePresetRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::Type mRequest; }; -class SubscribeAttributeServiceAreaAttributeList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AtomicRequest + */ +class ThermostatAtomicRequest : public ClusterCommand { public: - SubscribeAttributeServiceAreaAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeServiceAreaAttributeList() + ThermostatAtomicRequest() + : ClusterCommand("atomic-request") + , mComplex_AttributeRequests(&mRequest.attributeRequests) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("RequestType", 0, UINT8_MAX, &mRequest.requestType); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("AttributeRequests", &mComplex_AttributeRequests); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::AtomicRequest::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterAtomicRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.requestType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestType)]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.attributeRequests) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + params.attributeRequests = array_0; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.timeout.HasValue()) { + params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout.Value()]; + } else { + params.timeout = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster atomicRequestWithParams:params completion: + ^(MTRThermostatClusterAtomicResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::AtomicResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::AtomicResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Thermostat::Commands::AtomicRequest::Type mRequest; + TypedComplexArgument> mComplex_AttributeRequests; }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute LocalTemperature */ -class ReadServiceAreaFeatureMap : public ReadAttribute { +class ReadThermostatLocalTemperature : public ReadAttribute { public: - ReadServiceAreaFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatLocalTemperature() + : ReadAttribute("local-temperature") { } - ~ReadServiceAreaFeatureMap() + ~ReadThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea FeatureMap read Error", error); + LogNSError("Thermostat LocalTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104881,25 +104254,25 @@ class ReadServiceAreaFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatLocalTemperature() + : SubscribeAttribute("local-temperature") { } - ~SubscribeAttributeServiceAreaFeatureMap() + ~SubscribeAttributeThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104910,10 +104283,10 @@ class SubscribeAttributeServiceAreaFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104926,38 +104299,35 @@ class SubscribeAttributeServiceAreaFeatureMap : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute OutdoorTemperature */ -class ReadServiceAreaClusterRevision : public ReadAttribute { +class ReadThermostatOutdoorTemperature : public ReadAttribute { public: - ReadServiceAreaClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatOutdoorTemperature() + : ReadAttribute("outdoor-temperature") { } - ~ReadServiceAreaClusterRevision() + ~ReadThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea ClusterRevision read Error", error); + LogNSError("Thermostat OutdoorTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104966,25 +104336,25 @@ class ReadServiceAreaClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThermostatOutdoorTemperature() + : SubscribeAttribute("outdoor-temperature") { } - ~SubscribeAttributeServiceAreaClusterRevision() + ~SubscribeAttributeThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -104995,10 +104365,10 @@ class SubscribeAttributeServiceAreaClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105011,93 +104381,35 @@ class SubscribeAttributeServiceAreaClusterRevision : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MaxPressure + * Attribute Occupancy */ -class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { +class ReadThermostatOccupancy : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxPressure() - : ReadAttribute("max-pressure") + ReadThermostatOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPumpConfigurationAndControlMaxPressure() + ~ReadThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + LogNSError("Thermostat Occupancy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105106,25 +104418,25 @@ class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxPressure() - : SubscribeAttribute("max-pressure") + SubscribeAttributeThermostatOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePumpConfigurationAndControlMaxPressure() + ~SubscribeAttributeThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105135,10 +104447,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPressureWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105152,34 +104464,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxPressure : public Subscrib }; /* - * Attribute MaxSpeed + * Attribute AbsMinHeatSetpointLimit */ -class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { +class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxSpeed() - : ReadAttribute("max-speed") + ReadThermostatAbsMinHeatSetpointLimit() + : ReadAttribute("abs-min-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMaxSpeed() + ~ReadThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105188,25 +104500,25 @@ class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxSpeed() - : SubscribeAttribute("max-speed") + SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + : SubscribeAttribute("abs-min-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() + ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105217,10 +104529,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxSpeedWithParams:params + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105234,34 +104546,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAt }; /* - * Attribute MaxFlow + * Attribute AbsMaxHeatSetpointLimit */ -class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { +class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxFlow() - : ReadAttribute("max-flow") + ReadThermostatAbsMaxHeatSetpointLimit() + : ReadAttribute("abs-max-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMaxFlow() + ~ReadThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105270,25 +104582,25 @@ class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxFlow() - : SubscribeAttribute("max-flow") + SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + : SubscribeAttribute("abs-max-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMaxFlow() + ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105299,10 +104611,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxFlowWithParams:params + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105316,34 +104628,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAtt }; /* - * Attribute MinConstPressure + * Attribute AbsMinCoolSetpointLimit */ -class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { +class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstPressure() - : ReadAttribute("min-const-pressure") + ReadThermostatAbsMinCoolSetpointLimit() + : ReadAttribute("abs-min-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMinConstPressure() + ~ReadThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105352,25 +104664,25 @@ class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstPressure() - : SubscribeAttribute("min-const-pressure") + SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + : SubscribeAttribute("abs-min-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() + ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105381,10 +104693,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstPressureWithParams:params + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105398,34 +104710,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub }; /* - * Attribute MaxConstPressure + * Attribute AbsMaxCoolSetpointLimit */ -class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { +class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstPressure() - : ReadAttribute("max-const-pressure") + ReadThermostatAbsMaxCoolSetpointLimit() + : ReadAttribute("abs-max-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlMaxConstPressure() + ~ReadThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105434,25 +104746,25 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstPressure() - : SubscribeAttribute("max-const-pressure") + SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + : SubscribeAttribute("abs-max-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105463,10 +104775,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstPressureWithParams:params + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105480,34 +104792,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub }; /* - * Attribute MinCompPressure + * Attribute PICoolingDemand */ -class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { +class ReadThermostatPICoolingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinCompPressure() - : ReadAttribute("min-comp-pressure") + ReadThermostatPICoolingDemand() + : ReadAttribute("picooling-demand") { } - ~ReadPumpConfigurationAndControlMinCompPressure() + ~ReadThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + LogNSError("Thermostat PICoolingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105516,25 +104828,25 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { +class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinCompPressure() - : SubscribeAttribute("min-comp-pressure") + SubscribeAttributeThermostatPICoolingDemand() + : SubscribeAttribute("picooling-demand") { } - ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() + ~SubscribeAttributeThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105545,10 +104857,10 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCompPressureWithParams:params + [cluster subscribeAttributePICoolingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105562,34 +104874,34 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs }; /* - * Attribute MaxCompPressure + * Attribute PIHeatingDemand */ -class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { +class ReadThermostatPIHeatingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxCompPressure() - : ReadAttribute("max-comp-pressure") + ReadThermostatPIHeatingDemand() + : ReadAttribute("piheating-demand") { } - ~ReadPumpConfigurationAndControlMaxCompPressure() + ~ReadThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + LogNSError("Thermostat PIHeatingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105598,25 +104910,25 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { +class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxCompPressure() - : SubscribeAttribute("max-comp-pressure") + SubscribeAttributeThermostatPIHeatingDemand() + : SubscribeAttribute("piheating-demand") { } - ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + ~SubscribeAttributeThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105627,10 +104939,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCompPressureWithParams:params + [cluster subscribeAttributePIHeatingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105644,34 +104956,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs }; /* - * Attribute MinConstSpeed + * Attribute HVACSystemTypeConfiguration */ -class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstSpeed() - : ReadAttribute("min-const-speed") + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") { } - ~ReadPumpConfigurationAndControlMinConstSpeed() + ~ReadThermostatHVACSystemTypeConfiguration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105680,107 +104992,66 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstSpeed() - : SubscribeAttribute("min-const-speed") + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") { + AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + ~WriteThermostatHVACSystemTypeConfiguration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstSpeedWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstSpeed - */ -class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstSpeed() - : ReadAttribute("max-const-speed") - { - } - - ~ReadPumpConfigurationAndControlMaxConstSpeed() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() - : SubscribeAttribute("max-const-speed") + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105791,10 +105062,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstSpeedWithParams:params + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105808,34 +105079,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr }; /* - * Attribute MinConstFlow + * Attribute LocalTemperatureCalibration */ -class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { +class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstFlow() - : ReadAttribute("min-const-flow") + ReadThermostatLocalTemperatureCalibration() + : ReadAttribute("local-temperature-calibration") { } - ~ReadPumpConfigurationAndControlMinConstFlow() + ~ReadThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -105844,107 +105115,66 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { +class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstFlow() - : SubscribeAttribute("min-const-flow") + WriteThermostatLocalTemperatureCalibration() + : WriteAttribute("local-temperature-calibration") { + AddArgument("attr-name", "local-temperature-calibration"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() + ~WriteThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstFlowWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstFlow - */ -class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstFlow() - : ReadAttribute("max-const-flow") - { - } - - ~ReadPumpConfigurationAndControlMaxConstFlow() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstFlow() - : SubscribeAttribute("max-const-flow") + SubscribeAttributeThermostatLocalTemperatureCalibration() + : SubscribeAttribute("local-temperature-calibration") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + ~SubscribeAttributeThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -105955,10 +105185,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstFlowWithParams:params + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -105972,34 +105202,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri }; /* - * Attribute MinConstTemp + * Attribute OccupiedCoolingSetpoint */ -class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { +class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstTemp() - : ReadAttribute("min-const-temp") + ReadThermostatOccupiedCoolingSetpoint() + : ReadAttribute("occupied-cooling-setpoint") { } - ~ReadPumpConfigurationAndControlMinConstTemp() + ~ReadThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106008,107 +105238,66 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { +class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstTemp() - : SubscribeAttribute("min-const-temp") + WriteThermostatOccupiedCoolingSetpoint() + : WriteAttribute("occupied-cooling-setpoint") { + AddArgument("attr-name", "occupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() + ~WriteThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinConstTempWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxConstTemp - */ -class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { -public: - ReadPumpConfigurationAndControlMaxConstTemp() - : ReadAttribute("max-const-temp") - { - } - - ~ReadPumpConfigurationAndControlMaxConstTemp() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstTemp() - : SubscribeAttribute("max-const-temp") + SubscribeAttributeThermostatOccupiedCoolingSetpoint() + : SubscribeAttribute("occupied-cooling-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106119,10 +105308,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstTempWithParams:params + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106136,34 +105325,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri }; /* - * Attribute PumpStatus + * Attribute OccupiedHeatingSetpoint */ -class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { +class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlPumpStatus() - : ReadAttribute("pump-status") + ReadThermostatOccupiedHeatingSetpoint() + : ReadAttribute("occupied-heating-setpoint") { } - ~ReadPumpConfigurationAndControlPumpStatus() + ~ReadThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106172,107 +105361,66 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { +class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlPumpStatus() - : SubscribeAttribute("pump-status") + WriteThermostatOccupiedHeatingSetpoint() + : WriteAttribute("occupied-heating-setpoint") { + AddArgument("attr-name", "occupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlPumpStatus() + ~WriteThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePumpStatusWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EffectiveOperationMode - */ -class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { -public: - ReadPumpConfigurationAndControlEffectiveOperationMode() - : ReadAttribute("effective-operation-mode") - { - } - - ~ReadPumpConfigurationAndControlEffectiveOperationMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() - : SubscribeAttribute("effective-operation-mode") + SubscribeAttributeThermostatOccupiedHeatingSetpoint() + : SubscribeAttribute("occupied-heating-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106283,10 +105431,10 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106300,34 +105448,34 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ }; /* - * Attribute EffectiveControlMode + * Attribute UnoccupiedCoolingSetpoint */ -class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { +class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveControlMode() - : ReadAttribute("effective-control-mode") + ReadThermostatUnoccupiedCoolingSetpoint() + : ReadAttribute("unoccupied-cooling-setpoint") { } - ~ReadPumpConfigurationAndControlEffectiveControlMode() + ~ReadThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106336,107 +105484,66 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { +class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() - : SubscribeAttribute("effective-control-mode") + WriteThermostatUnoccupiedCoolingSetpoint() + : WriteAttribute("unoccupied-cooling-setpoint") { + AddArgument("attr-name", "unoccupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + ~WriteThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEffectiveControlModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Capacity - */ -class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { -public: - ReadPumpConfigurationAndControlCapacity() - : ReadAttribute("capacity") - { - } - - ~ReadPumpConfigurationAndControlCapacity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl Capacity read Error", error); + [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlCapacity() - : SubscribeAttribute("capacity") + SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + : SubscribeAttribute("unoccupied-cooling-setpoint") { } - ~SubscribeAttributePumpConfigurationAndControlCapacity() + ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106447,10 +105554,10 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapacityWithParams:params + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106464,34 +105571,34 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt }; /* - * Attribute Speed + * Attribute UnoccupiedHeatingSetpoint */ -class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { public: - ReadPumpConfigurationAndControlSpeed() - : ReadAttribute("speed") + ReadThermostatUnoccupiedHeatingSetpoint() + : ReadAttribute("unoccupied-heating-setpoint") { } - ~ReadPumpConfigurationAndControlSpeed() + ~ReadThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Speed read Error", error); + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106500,25 +105607,66 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { +class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlSpeed() - : SubscribeAttribute("speed") + WriteThermostatUnoccupiedHeatingSetpoint() + : WriteAttribute("unoccupied-heating-setpoint") { + AddArgument("attr-name", "unoccupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlSpeed() + ~WriteThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + : SubscribeAttribute("unoccupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106529,10 +105677,10 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedWithParams:params + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106546,34 +105694,34 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri }; /* - * Attribute LifetimeRunningHours + * Attribute MinHeatSetpointLimit */ -class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { +class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeRunningHours() - : ReadAttribute("lifetime-running-hours") + ReadThermostatMinHeatSetpointLimit() + : ReadAttribute("min-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlLifetimeRunningHours() + ~ReadThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); + LogNSError("Thermostat MinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106582,39 +105730,36 @@ class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute } }; -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { +class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { public: - WritePumpConfigurationAndControlLifetimeRunningHours() - : WriteAttribute("lifetime-running-hours") + WriteThermostatMinHeatSetpointLimit() + : WriteAttribute("min-heat-setpoint-limit") { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "min-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeRunningHours() + ~WriteThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106623,28 +105768,28 @@ class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribu } private: - chip::app::DataModel::Nullable mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() - : SubscribeAttribute("lifetime-running-hours") + SubscribeAttributeThermostatMinHeatSetpointLimit() + : SubscribeAttribute("min-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + ~SubscribeAttributeThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106655,10 +105800,10 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeRunningHoursWithParams:params + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106672,34 +105817,34 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public }; /* - * Attribute Power + * Attribute MaxHeatSetpointLimit */ -class ReadPumpConfigurationAndControlPower : public ReadAttribute { +class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlPower() - : ReadAttribute("power") + ReadThermostatMaxHeatSetpointLimit() + : ReadAttribute("max-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlPower() + ~ReadThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Power read Error", error); + LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106708,25 +105853,66 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { +class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlPower() - : SubscribeAttribute("power") + WriteThermostatMaxHeatSetpointLimit() + : WriteAttribute("max-heat-setpoint-limit") { + AddArgument("attr-name", "max-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlPower() + ~WriteThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxHeatSetpointLimit() + : SubscribeAttribute("max-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxHeatSetpointLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106737,10 +105923,10 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerWithParams:params + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106754,34 +105940,34 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri }; /* - * Attribute LifetimeEnergyConsumed + * Attribute MinCoolSetpointLimit */ -class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { +class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeEnergyConsumed() - : ReadAttribute("lifetime-energy-consumed") + ReadThermostatMinCoolSetpointLimit() + : ReadAttribute("min-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + ~ReadThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); + LogNSError("Thermostat MinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106790,39 +105976,36 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu } }; -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { +class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed() - : WriteAttribute("lifetime-energy-consumed") + WriteThermostatMinCoolSetpointLimit() + : WriteAttribute("min-cool-setpoint-limit") { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "min-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() + ~WriteThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106831,28 +106014,28 @@ class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttri } private: - chip::app::DataModel::Nullable mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() - : SubscribeAttribute("lifetime-energy-consumed") + SubscribeAttributeThermostatMinCoolSetpointLimit() + : SubscribeAttribute("min-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + ~SubscribeAttributeThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106863,10 +106046,10 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -106880,34 +106063,34 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ }; /* - * Attribute OperationMode + * Attribute MaxCoolSetpointLimit */ -class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { +class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlOperationMode() - : ReadAttribute("operation-mode") + ReadThermostatMaxCoolSetpointLimit() + : ReadAttribute("max-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlOperationMode() + ~ReadThermostatMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl OperationMode read Error", error); + LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106916,36 +106099,36 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { } }; -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { +class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { public: - WritePumpConfigurationAndControlOperationMode() - : WriteAttribute("operation-mode") + WriteThermostatMaxCoolSetpointLimit() + : WriteAttribute("max-cool-setpoint-limit") { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "max-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlOperationMode() + ~WriteThermostatMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - [cluster writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -106954,28 +106137,28 @@ class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { } private: - uint8_t mValue; + int16_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlOperationMode() - : SubscribeAttribute("operation-mode") + SubscribeAttributeThermostatMaxCoolSetpointLimit() + : SubscribeAttribute("max-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlOperationMode() + ~SubscribeAttributeThermostatMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -106986,10 +106169,10 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationModeWithParams:params + [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107003,34 +106186,34 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr }; /* - * Attribute ControlMode + * Attribute MinSetpointDeadBand */ -class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { +class ReadThermostatMinSetpointDeadBand : public ReadAttribute { public: - ReadPumpConfigurationAndControlControlMode() - : ReadAttribute("control-mode") + ReadThermostatMinSetpointDeadBand() + : ReadAttribute("min-setpoint-dead-band") { } - ~ReadPumpConfigurationAndControlControlMode() + ~ReadThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl ControlMode read Error", error); + LogNSError("Thermostat MinSetpointDeadBand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107039,36 +106222,36 @@ class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { } }; -class WritePumpConfigurationAndControlControlMode : public WriteAttribute { +class WriteThermostatMinSetpointDeadBand : public WriteAttribute { public: - WritePumpConfigurationAndControlControlMode() - : WriteAttribute("control-mode") + WriteThermostatMinSetpointDeadBand() + : WriteAttribute("min-setpoint-dead-band") { - AddArgument("attr-name", "control-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "min-setpoint-dead-band"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlControlMode() + ~WriteThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - [cluster writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + LogNSError("Thermostat MinSetpointDeadBand write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107077,28 +106260,28 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { } private: - uint8_t mValue; + int8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlControlMode() - : SubscribeAttribute("control-mode") + SubscribeAttributeThermostatMinSetpointDeadBand() + : SubscribeAttribute("min-setpoint-dead-band") { } - ~SubscribeAttributePumpConfigurationAndControlControlMode() + ~SubscribeAttributeThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107109,10 +106292,10 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlModeWithParams:params + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107126,34 +106309,34 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute RemoteSensing */ -class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { +class ReadThermostatRemoteSensing : public ReadAttribute { public: - ReadPumpConfigurationAndControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatRemoteSensing() + : ReadAttribute("remote-sensing") { } - ~ReadPumpConfigurationAndControlGeneratedCommandList() + ~ReadThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + LogNSError("Thermostat RemoteSensing read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107162,25 +106345,66 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +class WriteThermostatRemoteSensing : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteThermostatRemoteSensing() + : WriteAttribute("remote-sensing") { + AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + ~WriteThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +public: + SubscribeAttributeThermostatRemoteSensing() + : SubscribeAttribute("remote-sensing") + { + } + + ~SubscribeAttributeThermostatRemoteSensing() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107191,10 +106415,10 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeRemoteSensingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107208,34 +106432,34 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute ControlSequenceOfOperation */ -class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { +class ReadThermostatControlSequenceOfOperation : public ReadAttribute { public: - ReadPumpConfigurationAndControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatControlSequenceOfOperation() + : ReadAttribute("control-sequence-of-operation") { } - ~ReadPumpConfigurationAndControlAcceptedCommandList() + ~ReadThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107244,25 +106468,66 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +class WriteThermostatControlSequenceOfOperation : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteThermostatControlSequenceOfOperation() + : WriteAttribute("control-sequence-of-operation") { + AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + ~WriteThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +public: + SubscribeAttributeThermostatControlSequenceOfOperation() + : SubscribeAttribute("control-sequence-of-operation") + { + } + + ~SubscribeAttributeThermostatControlSequenceOfOperation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107273,10 +106538,10 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107289,37 +106554,35 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute SystemMode */ -class ReadPumpConfigurationAndControlEventList : public ReadAttribute { +class ReadThermostatSystemMode : public ReadAttribute { public: - ReadPumpConfigurationAndControlEventList() - : ReadAttribute("event-list") + ReadThermostatSystemMode() + : ReadAttribute("system-mode") { } - ~ReadPumpConfigurationAndControlEventList() + ~ReadThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EventList read Error", error); + LogNSError("Thermostat SystemMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107328,25 +106591,66 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { +class WriteThermostatSystemMode : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlEventList() - : SubscribeAttribute("event-list") + WriteThermostatSystemMode() + : WriteAttribute("system-mode") { + AddArgument("attr-name", "system-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlEventList() + ~WriteThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSystemMode() + : SubscribeAttribute("system-mode") + { + } + + ~SubscribeAttributeThermostatSystemMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107357,10 +106661,10 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSystemModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107373,37 +106677,35 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ThermostatRunningMode */ -class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { +class ReadThermostatThermostatRunningMode : public ReadAttribute { public: - ReadPumpConfigurationAndControlAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatThermostatRunningMode() + : ReadAttribute("thermostat-running-mode") { } - ~ReadPumpConfigurationAndControlAttributeList() + ~ReadThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + LogNSError("Thermostat ThermostatRunningMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107412,25 +106714,25 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatThermostatRunningMode() + : SubscribeAttribute("thermostat-running-mode") { } - ~SubscribeAttributePumpConfigurationAndControlAttributeList() + ~SubscribeAttributeThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107441,10 +106743,10 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeThermostatRunningModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107458,34 +106760,34 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr }; /* - * Attribute FeatureMap + * Attribute StartOfWeek */ -class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { +class ReadThermostatStartOfWeek : public ReadAttribute { public: - ReadPumpConfigurationAndControlFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatStartOfWeek() + : ReadAttribute("start-of-week") { } - ~ReadPumpConfigurationAndControlFeatureMap() + ~ReadThermostatStartOfWeek() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + LogNSError("Thermostat StartOfWeek read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107494,25 +106796,25 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatStartOfWeek() + : SubscribeAttribute("start-of-week") { } - ~SubscribeAttributePumpConfigurationAndControlFeatureMap() + ~SubscribeAttributeThermostatStartOfWeek() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107523,10 +106825,10 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeStartOfWeekWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107540,34 +106842,34 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe }; /* - * Attribute ClusterRevision + * Attribute NumberOfWeeklyTransitions */ -class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { +class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { public: - ReadPumpConfigurationAndControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatNumberOfWeeklyTransitions() + : ReadAttribute("number-of-weekly-transitions") { } - ~ReadPumpConfigurationAndControlClusterRevision() + ~ReadThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -107576,25 +106878,25 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThermostatNumberOfWeeklyTransitions() + : SubscribeAttribute("number-of-weekly-transitions") { } - ~SubscribeAttributePumpConfigurationAndControlClusterRevision() + ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -107605,10 +106907,10 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -107621,559 +106923,181 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -| * SetActiveScheduleRequest | 0x05 | -| * SetActivePresetRequest | 0x06 | -| * AtomicRequest | 0xFE | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * PresetTypes | 0x0048 | -| * ScheduleTypes | 0x0049 | -| * NumberOfPresets | 0x004A | -| * NumberOfSchedules | 0x004B | -| * NumberOfScheduleTransitions | 0x004C | -| * NumberOfScheduleTransitionPerDay | 0x004D | -| * ActivePresetHandle | 0x004E | -| * ActiveScheduleHandle | 0x004F | -| * Presets | 0x0050 | -| * Schedules | 0x0051 | -| * SetpointHoldExpiryTimestamp | 0x0052 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetpointRaiseLower + * Attribute NumberOfDailyTransitions */ -class ThermostatSetpointRaiseLower : public ClusterCommand { +class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { public: - ThermostatSetpointRaiseLower() - : ClusterCommand("setpoint-raise-lower") - { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadThermostatNumberOfDailyTransitions() + : ReadAttribute("number-of-daily-transitions") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; - params.amount = [NSNumber numberWithChar:mRequest.amount]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setpointRaiseLowerWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; -}; - -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand { -public: - ThermostatSetWeeklySchedule() - : ClusterCommand("set-weekly-schedule") - , mComplex_Transitions(&mRequest.transitions) + ~ReadThermostatNumberOfDailyTransitions() { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; - params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; - newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.transitions = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeeklyScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; }; -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand { +class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { public: - ThermostatGetWeeklySchedule() - : ClusterCommand("get-weekly-schedule") - { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeThermostatNumberOfDailyTransitions() + : SubscribeAttribute("number-of-daily-transitions") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; - params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeeklyScheduleWithParams:params completion: - ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; -}; - -/* - * Command ClearWeeklySchedule - */ -class ThermostatClearWeeklySchedule : public ClusterCommand { -public: - ThermostatClearWeeklySchedule() - : ClusterCommand("clear-weekly-schedule") + ~SubscribeAttributeThermostatNumberOfDailyTransitions() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeeklyScheduleWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - return CHIP_NO_ERROR; - } - -private: -}; - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetActiveScheduleRequest - */ -class ThermostatSetActiveScheduleRequest : public ClusterCommand { -public: - ThermostatSetActiveScheduleRequest() - : ClusterCommand("set-active-schedule-request") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ScheduleHandle", &mRequest.scheduleHandle); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetActiveScheduleRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.scheduleHandle = [NSData dataWithBytes:mRequest.scheduleHandle.data() length:mRequest.scheduleHandle.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setActiveScheduleRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command SetActivePresetRequest + * Attribute TemperatureSetpointHold */ -class ThermostatSetActivePresetRequest : public ClusterCommand { +class ReadThermostatTemperatureSetpointHold : public ReadAttribute { public: - ThermostatSetActivePresetRequest() - : ClusterCommand("set-active-preset-request") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("PresetHandle", &mRequest.presetHandle); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadThermostatTemperatureSetpointHold() + : ReadAttribute("temperature-setpoint-hold") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetActivePresetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.presetHandle.IsNull()) { - params.presetHandle = nil; - } else { - params.presetHandle = [NSData dataWithBytes:mRequest.presetHandle.Value().data() length:mRequest.presetHandle.Value().size()]; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setActivePresetRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command AtomicRequest - */ -class ThermostatAtomicRequest : public ClusterCommand { -public: - ThermostatAtomicRequest() - : ClusterCommand("atomic-request") - , mComplex_AttributeRequests(&mRequest.attributeRequests) + ~ReadThermostatTemperatureSetpointHold() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("RequestType", 0, UINT8_MAX, &mRequest.requestType); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("AttributeRequests", &mComplex_AttributeRequests); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::AtomicRequest::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterAtomicRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.requestType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestType)]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.attributeRequests) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat TemperatureSetpointHold read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.attributeRequests = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.timeout.HasValue()) { - params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout.Value()]; - } else { - params.timeout = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster atomicRequestWithParams:params completion: - ^(MTRThermostatClusterAtomicResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::AtomicResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::AtomicResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Thermostat::Commands::AtomicRequest::Type mRequest; - TypedComplexArgument> mComplex_AttributeRequests; }; -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute LocalTemperature - */ -class ReadThermostatLocalTemperature : public ReadAttribute { +class WriteThermostatTemperatureSetpointHold : public WriteAttribute { public: - ReadThermostatLocalTemperature() - : ReadAttribute("local-temperature") + WriteThermostatTemperatureSetpointHold() + : WriteAttribute("temperature-setpoint-hold") { + AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadThermostatLocalTemperature() + ~WriteThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat LocalTemperature read Error", error); + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperature() - : SubscribeAttribute("local-temperature") + SubscribeAttributeThermostatTemperatureSetpointHold() + : SubscribeAttribute("temperature-setpoint-hold") { } - ~SubscribeAttributeThermostatLocalTemperature() + ~SubscribeAttributeThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108188,10 +107112,10 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108205,34 +107129,34 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { }; /* - * Attribute OutdoorTemperature + * Attribute TemperatureSetpointHoldDuration */ -class ReadThermostatOutdoorTemperature : public ReadAttribute { +class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { public: - ReadThermostatOutdoorTemperature() - : ReadAttribute("outdoor-temperature") + ReadThermostatTemperatureSetpointHoldDuration() + : ReadAttribute("temperature-setpoint-hold-duration") { } - ~ReadThermostatOutdoorTemperature() + ~ReadThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OutdoorTemperature read Error", error); + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108241,21 +107165,65 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { +class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { public: - SubscribeAttributeThermostatOutdoorTemperature() - : SubscribeAttribute("outdoor-temperature") + WriteThermostatTemperatureSetpointHoldDuration() + : WriteAttribute("temperature-setpoint-hold-duration") { + AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatOutdoorTemperature() + ~WriteThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } + + [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + : SubscribeAttribute("temperature-setpoint-hold-duration") + { + } + + ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108270,10 +107238,10 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutdoorTemperatureWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108287,34 +107255,34 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute }; /* - * Attribute Occupancy + * Attribute ThermostatProgrammingOperationMode */ -class ReadThermostatOccupancy : public ReadAttribute { +class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { public: - ReadThermostatOccupancy() - : ReadAttribute("occupancy") + ReadThermostatThermostatProgrammingOperationMode() + : ReadAttribute("thermostat-programming-operation-mode") { } - ~ReadThermostatOccupancy() + ~ReadThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat Occupancy read Error", error); + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108323,21 +107291,62 @@ class ReadThermostatOccupancy : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { +class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { public: - SubscribeAttributeThermostatOccupancy() - : SubscribeAttribute("occupancy") + WriteThermostatThermostatProgrammingOperationMode() + : WriteAttribute("thermostat-programming-operation-mode") { - } - - ~SubscribeAttributeThermostatOccupancy() + AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatThermostatProgrammingOperationMode() + : SubscribeAttribute("thermostat-programming-operation-mode") + { + } + + ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108352,10 +107361,10 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancyWithParams:params + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108369,34 +107378,34 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { }; /* - * Attribute AbsMinHeatSetpointLimit + * Attribute ThermostatRunningState */ -class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { +class ReadThermostatThermostatRunningState : public ReadAttribute { public: - ReadThermostatAbsMinHeatSetpointLimit() - : ReadAttribute("abs-min-heat-setpoint-limit") + ReadThermostatThermostatRunningState() + : ReadAttribute("thermostat-running-state") { } - ~ReadThermostatAbsMinHeatSetpointLimit() + ~ReadThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + LogNSError("Thermostat ThermostatRunningState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108405,21 +107414,21 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMinHeatSetpointLimit() - : SubscribeAttribute("abs-min-heat-setpoint-limit") + SubscribeAttributeThermostatThermostatRunningState() + : SubscribeAttribute("thermostat-running-state") { } - ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + ~SubscribeAttributeThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108434,10 +107443,10 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeThermostatRunningStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108451,34 +107460,34 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxHeatSetpointLimit + * Attribute SetpointChangeSource */ -class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatSetpointChangeSource : public ReadAttribute { public: - ReadThermostatAbsMaxHeatSetpointLimit() - : ReadAttribute("abs-max-heat-setpoint-limit") + ReadThermostatSetpointChangeSource() + : ReadAttribute("setpoint-change-source") { } - ~ReadThermostatAbsMaxHeatSetpointLimit() + ~ReadThermostatSetpointChangeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat SetpointChangeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108487,21 +107496,21 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() - : SubscribeAttribute("abs-max-heat-setpoint-limit") + SubscribeAttributeThermostatSetpointChangeSource() + : SubscribeAttribute("setpoint-change-source") { } - ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + ~SubscribeAttributeThermostatSetpointChangeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108516,10 +107525,10 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeSetpointChangeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108533,34 +107542,34 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMinCoolSetpointLimit + * Attribute SetpointChangeAmount */ -class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatSetpointChangeAmount : public ReadAttribute { public: - ReadThermostatAbsMinCoolSetpointLimit() - : ReadAttribute("abs-min-cool-setpoint-limit") + ReadThermostatSetpointChangeAmount() + : ReadAttribute("setpoint-change-amount") { } - ~ReadThermostatAbsMinCoolSetpointLimit() + ~ReadThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + LogNSError("Thermostat SetpointChangeAmount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108569,21 +107578,21 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMinCoolSetpointLimit() - : SubscribeAttribute("abs-min-cool-setpoint-limit") + SubscribeAttributeThermostatSetpointChangeAmount() + : SubscribeAttribute("setpoint-change-amount") { } - ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + ~SubscribeAttributeThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108598,10 +107607,10 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeSetpointChangeAmountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108615,34 +107624,34 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxCoolSetpointLimit + * Attribute SetpointChangeSourceTimestamp */ -class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { public: - ReadThermostatAbsMaxCoolSetpointLimit() - : ReadAttribute("abs-max-cool-setpoint-limit") + ReadThermostatSetpointChangeSourceTimestamp() + : ReadAttribute("setpoint-change-source-timestamp") { } - ~ReadThermostatAbsMaxCoolSetpointLimit() + ~ReadThermostatSetpointChangeSourceTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108651,21 +107660,21 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() - : SubscribeAttribute("abs-max-cool-setpoint-limit") + SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + : SubscribeAttribute("setpoint-change-source-timestamp") { } - ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108680,10 +107689,10 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108697,34 +107706,34 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute PICoolingDemand + * Attribute OccupiedSetback */ -class ReadThermostatPICoolingDemand : public ReadAttribute { +class ReadThermostatOccupiedSetback : public ReadAttribute { public: - ReadThermostatPICoolingDemand() - : ReadAttribute("picooling-demand") + ReadThermostatOccupiedSetback() + : ReadAttribute("occupied-setback") { } - ~ReadThermostatPICoolingDemand() + ~ReadThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PICoolingDemand read Error", error); + LogNSError("Thermostat OccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108733,21 +107742,65 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { +class WriteThermostatOccupiedSetback : public WriteAttribute { public: - SubscribeAttributeThermostatPICoolingDemand() - : SubscribeAttribute("picooling-demand") + WriteThermostatOccupiedSetback() + : WriteAttribute("occupied-setback") { + AddArgument("attr-name", "occupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatPICoolingDemand() + ~WriteThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedSetback write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedSetback() + : SubscribeAttribute("occupied-setback") + { + } + + ~SubscribeAttributeThermostatOccupiedSetback() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108762,10 +107815,10 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePICoolingDemandWithParams:params + [cluster subscribeAttributeOccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108779,34 +107832,34 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { }; /* - * Attribute PIHeatingDemand + * Attribute OccupiedSetbackMin */ -class ReadThermostatPIHeatingDemand : public ReadAttribute { +class ReadThermostatOccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatPIHeatingDemand() - : ReadAttribute("piheating-demand") + ReadThermostatOccupiedSetbackMin() + : ReadAttribute("occupied-setback-min") { } - ~ReadThermostatPIHeatingDemand() + ~ReadThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PIHeatingDemand read Error", error); + LogNSError("Thermostat OccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -108815,21 +107868,21 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { public: - SubscribeAttributeThermostatPIHeatingDemand() - : SubscribeAttribute("piheating-demand") + SubscribeAttributeThermostatOccupiedSetbackMin() + : SubscribeAttribute("occupied-setback-min") { } - ~SubscribeAttributeThermostatPIHeatingDemand() + ~SubscribeAttributeThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108844,10 +107897,10 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIHeatingDemandWithParams:params + [cluster subscribeAttributeOccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108861,98 +107914,57 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { }; /* - * Attribute HVACSystemTypeConfiguration + * Attribute OccupiedSetbackMax */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +class ReadThermostatOccupiedSetbackMax : public ReadAttribute { public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") + ReadThermostatOccupiedSetbackMax() + : ReadAttribute("occupied-setback-max") { } - ~ReadThermostatHVACSystemTypeConfiguration() + ~ReadThermostatOccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { -public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") - { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatHVACSystemTypeConfiguration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + LogNSError("Thermostat OccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") + SubscribeAttributeThermostatOccupiedSetbackMax() + : SubscribeAttribute("occupied-setback-max") { } - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() + ~SubscribeAttributeThermostatOccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -108967,10 +107979,10 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -108984,34 +107996,34 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe }; /* - * Attribute LocalTemperatureCalibration + * Attribute UnoccupiedSetback */ -class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { +class ReadThermostatUnoccupiedSetback : public ReadAttribute { public: - ReadThermostatLocalTemperatureCalibration() - : ReadAttribute("local-temperature-calibration") + ReadThermostatUnoccupiedSetback() + : ReadAttribute("unoccupied-setback") { } - ~ReadThermostatLocalTemperatureCalibration() + ~ReadThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + LogNSError("Thermostat UnoccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109020,24 +108032,24 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { } }; -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { +class WriteThermostatUnoccupiedSetback : public WriteAttribute { public: - WriteThermostatLocalTemperatureCalibration() - : WriteAttribute("local-temperature-calibration") + WriteThermostatUnoccupiedSetback() + : WriteAttribute("unoccupied-setback") { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + AddArgument("attr-name", "unoccupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatLocalTemperatureCalibration() + ~WriteThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109045,11 +108057,14 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + LogNSError("Thermostat UnoccupiedSetback write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109058,24 +108073,24 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { } private: - int8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperatureCalibration() - : SubscribeAttribute("local-temperature-calibration") + SubscribeAttributeThermostatUnoccupiedSetback() + : SubscribeAttribute("unoccupied-setback") { } - ~SubscribeAttributeThermostatLocalTemperatureCalibration() + ~SubscribeAttributeThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109090,10 +108105,10 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109107,34 +108122,34 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe }; /* - * Attribute OccupiedCoolingSetpoint + * Attribute UnoccupiedSetbackMin */ -class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatOccupiedCoolingSetpoint() - : ReadAttribute("occupied-cooling-setpoint") + ReadThermostatUnoccupiedSetbackMin() + : ReadAttribute("unoccupied-setback-min") { } - ~ReadThermostatOccupiedCoolingSetpoint() + ~ReadThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109143,62 +108158,103 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { public: - WriteThermostatOccupiedCoolingSetpoint() - : WriteAttribute("occupied-cooling-setpoint") + SubscribeAttributeThermostatUnoccupiedSetbackMin() + : SubscribeAttribute("unoccupied-setback-min") { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedSetbackMax + */ +class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatUnoccupiedSetbackMax() + : ReadAttribute("unoccupied-setback-max") + { + } + + ~ReadThermostatUnoccupiedSetbackMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedCoolingSetpoint() - : SubscribeAttribute("occupied-cooling-setpoint") + SubscribeAttributeThermostatUnoccupiedSetbackMax() + : SubscribeAttribute("unoccupied-setback-max") { } - ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatUnoccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109213,10 +108269,10 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109230,34 +108286,34 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr }; /* - * Attribute OccupiedHeatingSetpoint + * Attribute EmergencyHeatDelta */ -class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatEmergencyHeatDelta : public ReadAttribute { public: - ReadThermostatOccupiedHeatingSetpoint() - : ReadAttribute("occupied-heating-setpoint") + ReadThermostatEmergencyHeatDelta() + : ReadAttribute("emergency-heat-delta") { } - ~ReadThermostatOccupiedHeatingSetpoint() + ~ReadThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat EmergencyHeatDelta read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109266,24 +108322,24 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { +class WriteThermostatEmergencyHeatDelta : public WriteAttribute { public: - WriteThermostatOccupiedHeatingSetpoint() - : WriteAttribute("occupied-heating-setpoint") + WriteThermostatEmergencyHeatDelta() + : WriteAttribute("emergency-heat-delta") { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedHeatingSetpoint() + ~WriteThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109291,11 +108347,11 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + LogNSError("Thermostat EmergencyHeatDelta write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109304,24 +108360,24 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedHeatingSetpoint() - : SubscribeAttribute("occupied-heating-setpoint") + SubscribeAttributeThermostatEmergencyHeatDelta() + : SubscribeAttribute("emergency-heat-delta") { } - ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109336,10 +108392,10 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109353,34 +108409,34 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr }; /* - * Attribute UnoccupiedCoolingSetpoint + * Attribute ACType */ -class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatACType : public ReadAttribute { public: - ReadThermostatUnoccupiedCoolingSetpoint() - : ReadAttribute("unoccupied-cooling-setpoint") + ReadThermostatACType() + : ReadAttribute("actype") { } - ~ReadThermostatUnoccupiedCoolingSetpoint() + ~ReadThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat ACType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109389,24 +108445,24 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { +class WriteThermostatACType : public WriteAttribute { public: - WriteThermostatUnoccupiedCoolingSetpoint() - : WriteAttribute("unoccupied-cooling-setpoint") + WriteThermostatACType() + : WriteAttribute("actype") { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "actype"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedCoolingSetpoint() + ~WriteThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109414,11 +108470,11 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + LogNSError("Thermostat ACType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109427,24 +108483,24 @@ class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatACType : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() - : SubscribeAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeThermostatACType() + : SubscribeAttribute("actype") { } - ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109459,10 +108515,10 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeACTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109476,34 +108532,34 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt }; /* - * Attribute UnoccupiedHeatingSetpoint + * Attribute ACCapacity */ -class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatACCapacity : public ReadAttribute { public: - ReadThermostatUnoccupiedHeatingSetpoint() - : ReadAttribute("unoccupied-heating-setpoint") + ReadThermostatACCapacity() + : ReadAttribute("accapacity") { } - ~ReadThermostatUnoccupiedHeatingSetpoint() + ~ReadThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat ACCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109512,24 +108568,24 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { +class WriteThermostatACCapacity : public WriteAttribute { public: - WriteThermostatUnoccupiedHeatingSetpoint() - : WriteAttribute("unoccupied-heating-setpoint") + WriteThermostatACCapacity() + : WriteAttribute("accapacity") { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "accapacity"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedHeatingSetpoint() + ~WriteThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109537,11 +108593,11 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + LogNSError("Thermostat ACCapacity write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109550,24 +108606,24 @@ class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint16_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() - : SubscribeAttribute("unoccupied-heating-setpoint") + SubscribeAttributeThermostatACCapacity() + : SubscribeAttribute("accapacity") { } - ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109582,10 +108638,10 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeACCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109599,34 +108655,34 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt }; /* - * Attribute MinHeatSetpointLimit + * Attribute ACRefrigerantType */ -class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { +class ReadThermostatACRefrigerantType : public ReadAttribute { public: - ReadThermostatMinHeatSetpointLimit() - : ReadAttribute("min-heat-setpoint-limit") + ReadThermostatACRefrigerantType() + : ReadAttribute("acrefrigerant-type") { } - ~ReadThermostatMinHeatSetpointLimit() + ~ReadThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + LogNSError("Thermostat ACRefrigerantType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109635,24 +108691,24 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { +class WriteThermostatACRefrigerantType : public WriteAttribute { public: - WriteThermostatMinHeatSetpointLimit() - : WriteAttribute("min-heat-setpoint-limit") + WriteThermostatACRefrigerantType() + : WriteAttribute("acrefrigerant-type") { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "acrefrigerant-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMinHeatSetpointLimit() + ~WriteThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109660,11 +108716,11 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + LogNSError("Thermostat ACRefrigerantType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109673,24 +108729,24 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinHeatSetpointLimit() - : SubscribeAttribute("min-heat-setpoint-limit") + SubscribeAttributeThermostatACRefrigerantType() + : SubscribeAttribute("acrefrigerant-type") { } - ~SubscribeAttributeThermostatMinHeatSetpointLimit() + ~SubscribeAttributeThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109705,10 +108761,10 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeACRefrigerantTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109722,34 +108778,34 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxHeatSetpointLimit + * Attribute ACCompressorType */ -class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatACCompressorType : public ReadAttribute { public: - ReadThermostatMaxHeatSetpointLimit() - : ReadAttribute("max-heat-setpoint-limit") + ReadThermostatACCompressorType() + : ReadAttribute("accompressor-type") { } - ~ReadThermostatMaxHeatSetpointLimit() + ~ReadThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat ACCompressorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109758,24 +108814,24 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { +class WriteThermostatACCompressorType : public WriteAttribute { public: - WriteThermostatMaxHeatSetpointLimit() - : WriteAttribute("max-heat-setpoint-limit") + WriteThermostatACCompressorType() + : WriteAttribute("accompressor-type") { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "accompressor-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMaxHeatSetpointLimit() + ~WriteThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109783,11 +108839,11 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + LogNSError("Thermostat ACCompressorType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109796,24 +108852,24 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxHeatSetpointLimit() - : SubscribeAttribute("max-heat-setpoint-limit") + SubscribeAttributeThermostatACCompressorType() + : SubscribeAttribute("accompressor-type") { } - ~SubscribeAttributeThermostatMaxHeatSetpointLimit() + ~SubscribeAttributeThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109828,10 +108884,10 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeACCompressorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109845,34 +108901,34 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinCoolSetpointLimit + * Attribute ACErrorCode */ -class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatACErrorCode : public ReadAttribute { public: - ReadThermostatMinCoolSetpointLimit() - : ReadAttribute("min-cool-setpoint-limit") + ReadThermostatACErrorCode() + : ReadAttribute("acerror-code") { } - ~ReadThermostatMinCoolSetpointLimit() + ~ReadThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + LogNSError("Thermostat ACErrorCode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109881,24 +108937,24 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { +class WriteThermostatACErrorCode : public WriteAttribute { public: - WriteThermostatMinCoolSetpointLimit() - : WriteAttribute("min-cool-setpoint-limit") + WriteThermostatACErrorCode() + : WriteAttribute("acerror-code") { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "acerror-code"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMinCoolSetpointLimit() + ~WriteThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109906,11 +108962,11 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + LogNSError("Thermostat ACErrorCode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -109919,24 +108975,24 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint32_t mValue; }; -class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinCoolSetpointLimit() - : SubscribeAttribute("min-cool-setpoint-limit") + SubscribeAttributeThermostatACErrorCode() + : SubscribeAttribute("acerror-code") { } - ~SubscribeAttributeThermostatMinCoolSetpointLimit() + ~SubscribeAttributeThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -109951,10 +109007,10 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeACErrorCodeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -109968,34 +109024,34 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxCoolSetpointLimit + * Attribute ACLouverPosition */ -class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatACLouverPosition : public ReadAttribute { public: - ReadThermostatMaxCoolSetpointLimit() - : ReadAttribute("max-cool-setpoint-limit") + ReadThermostatACLouverPosition() + : ReadAttribute("aclouver-position") { } - ~ReadThermostatMaxCoolSetpointLimit() + ~ReadThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat ACLouverPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110004,24 +109060,24 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { +class WriteThermostatACLouverPosition : public WriteAttribute { public: - WriteThermostatMaxCoolSetpointLimit() - : WriteAttribute("max-cool-setpoint-limit") + WriteThermostatACLouverPosition() + : WriteAttribute("aclouver-position") { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMaxCoolSetpointLimit() + ~WriteThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110029,11 +109085,11 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + LogNSError("Thermostat ACLouverPosition write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110042,24 +109098,24 @@ class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxCoolSetpointLimit() - : SubscribeAttribute("max-cool-setpoint-limit") + SubscribeAttributeThermostatACLouverPosition() + : SubscribeAttribute("aclouver-position") { } - ~SubscribeAttributeThermostatMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110074,10 +109130,10 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeACLouverPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110091,98 +109147,57 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinSetpointDeadBand + * Attribute ACCoilTemperature */ -class ReadThermostatMinSetpointDeadBand : public ReadAttribute { +class ReadThermostatACCoilTemperature : public ReadAttribute { public: - ReadThermostatMinSetpointDeadBand() - : ReadAttribute("min-setpoint-dead-band") + ReadThermostatACCoilTemperature() + : ReadAttribute("accoil-temperature") { } - ~ReadThermostatMinSetpointDeadBand() + ~ReadThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinSetpointDeadBand read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatMinSetpointDeadBand : public WriteAttribute { -public: - WriteThermostatMinSetpointDeadBand() - : WriteAttribute("min-setpoint-dead-band") - { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinSetpointDeadBand() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - - [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); + LogNSError("Thermostat ACCoilTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int8_t mValue; }; -class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinSetpointDeadBand() - : SubscribeAttribute("min-setpoint-dead-band") + SubscribeAttributeThermostatACCoilTemperature() + : SubscribeAttribute("accoil-temperature") { } - ~SubscribeAttributeThermostatMinSetpointDeadBand() + ~SubscribeAttributeThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110197,10 +109212,10 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + [cluster subscribeAttributeACCoilTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110214,34 +109229,34 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut }; /* - * Attribute RemoteSensing + * Attribute ACCapacityformat */ -class ReadThermostatRemoteSensing : public ReadAttribute { +class ReadThermostatACCapacityformat : public ReadAttribute { public: - ReadThermostatRemoteSensing() - : ReadAttribute("remote-sensing") + ReadThermostatACCapacityformat() + : ReadAttribute("accapacityformat") { } - ~ReadThermostatRemoteSensing() + ~ReadThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat RemoteSensing read Error", error); + LogNSError("Thermostat ACCapacityformat read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110250,24 +109265,24 @@ class ReadThermostatRemoteSensing : public ReadAttribute { } }; -class WriteThermostatRemoteSensing : public WriteAttribute { +class WriteThermostatACCapacityformat : public WriteAttribute { public: - WriteThermostatRemoteSensing() - : WriteAttribute("remote-sensing") + WriteThermostatACCapacityformat() + : WriteAttribute("accapacityformat") { - AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-name", "accapacityformat"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatRemoteSensing() + ~WriteThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110277,9 +109292,9 @@ class WriteThermostatRemoteSensing : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); + LogNSError("Thermostat ACCapacityformat write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110291,21 +109306,21 @@ class WriteThermostatRemoteSensing : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { public: - SubscribeAttributeThermostatRemoteSensing() - : SubscribeAttribute("remote-sensing") + SubscribeAttributeThermostatACCapacityformat() + : SubscribeAttribute("accapacityformat") { } - ~SubscribeAttributeThermostatRemoteSensing() + ~SubscribeAttributeThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110320,10 +109335,10 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemoteSensingWithParams:params + [cluster subscribeAttributeACCapacityformatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110336,99 +109351,60 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ControlSequenceOfOperation + * Attribute PresetTypes */ -class ReadThermostatControlSequenceOfOperation : public ReadAttribute { +class ReadThermostatPresetTypes : public ReadAttribute { public: - ReadThermostatControlSequenceOfOperation() - : ReadAttribute("control-sequence-of-operation") + ReadThermostatPresetTypes() + : ReadAttribute("preset-types") { } - ~ReadThermostatControlSequenceOfOperation() + ~ReadThermostatPresetTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + [cluster readAttributePresetTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PresetTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatControlSequenceOfOperation : public WriteAttribute { -public: - WriteThermostatControlSequenceOfOperation() - : WriteAttribute("control-sequence-of-operation") - { - AddArgument("attr-name", "control-sequence-of-operation"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatControlSequenceOfOperation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + LogNSError("Thermostat PresetTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +class SubscribeAttributeThermostatPresetTypes : public SubscribeAttribute { public: - SubscribeAttributeThermostatControlSequenceOfOperation() - : SubscribeAttribute("control-sequence-of-operation") + SubscribeAttributeThermostatPresetTypes() + : SubscribeAttribute("preset-types") { } - ~SubscribeAttributeThermostatControlSequenceOfOperation() + ~SubscribeAttributeThermostatPresetTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110443,10 +109419,10 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + [cluster subscribeAttributePresetTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PresetTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110459,99 +109435,61 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SystemMode + * Attribute ScheduleTypes */ -class ReadThermostatSystemMode : public ReadAttribute { +class ReadThermostatScheduleTypes : public ReadAttribute { public: - ReadThermostatSystemMode() - : ReadAttribute("system-mode") + ReadThermostatScheduleTypes() + : ReadAttribute("schedule-types") { } - ~ReadThermostatSystemMode() + ~ReadThermostatScheduleTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + [cluster readAttributeScheduleTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SystemMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatSystemMode : public WriteAttribute { -public: - WriteThermostatSystemMode() - : WriteAttribute("system-mode") - { - AddArgument("attr-name", "system-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatSystemMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); + LogNSError("Thermostat ScheduleTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +class SubscribeAttributeThermostatScheduleTypes : public SubscribeAttribute { public: - SubscribeAttributeThermostatSystemMode() - : SubscribeAttribute("system-mode") + SubscribeAttributeThermostatScheduleTypes() + : SubscribeAttribute("schedule-types") { } - ~SubscribeAttributeThermostatSystemMode() + ~SubscribeAttributeThermostatScheduleTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110566,10 +109504,10 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSystemModeWithParams:params + [cluster subscribeAttributeScheduleTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110582,35 +109520,38 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ThermostatRunningMode + * Attribute NumberOfPresets */ -class ReadThermostatThermostatRunningMode : public ReadAttribute { +class ReadThermostatNumberOfPresets : public ReadAttribute { public: - ReadThermostatThermostatRunningMode() - : ReadAttribute("thermostat-running-mode") + ReadThermostatNumberOfPresets() + : ReadAttribute("number-of-presets") { } - ~ReadThermostatThermostatRunningMode() + ~ReadThermostatNumberOfPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + [cluster readAttributeNumberOfPresetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningMode read Error", error); + LogNSError("Thermostat NumberOfPresets read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110619,21 +109560,21 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfPresets : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningMode() - : SubscribeAttribute("thermostat-running-mode") + SubscribeAttributeThermostatNumberOfPresets() + : SubscribeAttribute("number-of-presets") { } - ~SubscribeAttributeThermostatThermostatRunningMode() + ~SubscribeAttributeThermostatNumberOfPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110648,10 +109589,10 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningModeWithParams:params + [cluster subscribeAttributeNumberOfPresetsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110664,35 +109605,38 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute StartOfWeek + * Attribute NumberOfSchedules */ -class ReadThermostatStartOfWeek : public ReadAttribute { +class ReadThermostatNumberOfSchedules : public ReadAttribute { public: - ReadThermostatStartOfWeek() - : ReadAttribute("start-of-week") + ReadThermostatNumberOfSchedules() + : ReadAttribute("number-of-schedules") { } - ~ReadThermostatStartOfWeek() + ~ReadThermostatNumberOfSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + [cluster readAttributeNumberOfSchedulesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat StartOfWeek read Error", error); + LogNSError("Thermostat NumberOfSchedules read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110701,21 +109645,21 @@ class ReadThermostatStartOfWeek : public ReadAttribute { } }; -class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfSchedules : public SubscribeAttribute { public: - SubscribeAttributeThermostatStartOfWeek() - : SubscribeAttribute("start-of-week") + SubscribeAttributeThermostatNumberOfSchedules() + : SubscribeAttribute("number-of-schedules") { } - ~SubscribeAttributeThermostatStartOfWeek() + ~SubscribeAttributeThermostatNumberOfSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110730,10 +109674,10 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartOfWeekWithParams:params + [cluster subscribeAttributeNumberOfSchedulesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110746,35 +109690,38 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute NumberOfWeeklyTransitions + * Attribute NumberOfScheduleTransitions */ -class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { +class ReadThermostatNumberOfScheduleTransitions : public ReadAttribute { public: - ReadThermostatNumberOfWeeklyTransitions() - : ReadAttribute("number-of-weekly-transitions") + ReadThermostatNumberOfScheduleTransitions() + : ReadAttribute("number-of-schedule-transitions") { } - ~ReadThermostatNumberOfWeeklyTransitions() + ~ReadThermostatNumberOfScheduleTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + [cluster readAttributeNumberOfScheduleTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + LogNSError("Thermostat NumberOfScheduleTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110783,21 +109730,21 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfScheduleTransitions : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfWeeklyTransitions() - : SubscribeAttribute("number-of-weekly-transitions") + SubscribeAttributeThermostatNumberOfScheduleTransitions() + : SubscribeAttribute("number-of-schedule-transitions") { } - ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() + ~SubscribeAttributeThermostatNumberOfScheduleTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110812,10 +109759,10 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + [cluster subscribeAttributeNumberOfScheduleTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110828,35 +109775,38 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute NumberOfDailyTransitions + * Attribute NumberOfScheduleTransitionPerDay */ -class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { +class ReadThermostatNumberOfScheduleTransitionPerDay : public ReadAttribute { public: - ReadThermostatNumberOfDailyTransitions() - : ReadAttribute("number-of-daily-transitions") + ReadThermostatNumberOfScheduleTransitionPerDay() + : ReadAttribute("number-of-schedule-transition-per-day") { } - ~ReadThermostatNumberOfDailyTransitions() + ~ReadThermostatNumberOfScheduleTransitionPerDay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + [cluster readAttributeNumberOfScheduleTransitionPerDayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + LogNSError("Thermostat NumberOfScheduleTransitionPerDay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110865,21 +109815,21 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfDailyTransitions() - : SubscribeAttribute("number-of-daily-transitions") + SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() + : SubscribeAttribute("number-of-schedule-transition-per-day") { } - ~SubscribeAttributeThermostatNumberOfDailyTransitions() + ~SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -110894,10 +109844,10 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + [cluster subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -110910,35 +109860,38 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TemperatureSetpointHold + * Attribute ActivePresetHandle */ -class ReadThermostatTemperatureSetpointHold : public ReadAttribute { +class ReadThermostatActivePresetHandle : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHold() - : ReadAttribute("temperature-setpoint-hold") + ReadThermostatActivePresetHandle() + : ReadAttribute("active-preset-handle") { } - ~ReadThermostatTemperatureSetpointHold() + ~ReadThermostatActivePresetHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + [cluster readAttributeActivePresetHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); + LogNSError("Thermostat ActivePresetHandle read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -110947,62 +109900,106 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHold : public WriteAttribute { +class SubscribeAttributeThermostatActivePresetHandle : public SubscribeAttribute { public: - WriteThermostatTemperatureSetpointHold() - : WriteAttribute("temperature-setpoint-hold") + SubscribeAttributeThermostatActivePresetHandle() + : SubscribeAttribute("active-preset-handle") { - AddArgument("attr-name", "temperature-setpoint-hold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatTemperatureSetpointHold() + ~SubscribeAttributeThermostatActivePresetHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeActivePresetHandleWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute ActiveScheduleHandle + */ +class ReadThermostatActiveScheduleHandle : public ReadAttribute { +public: + ReadThermostatActiveScheduleHandle() + : ReadAttribute("active-schedule-handle") + { + } + + ~ReadThermostatActiveScheduleHandle() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveScheduleHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat ActiveScheduleHandle read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +class SubscribeAttributeThermostatActiveScheduleHandle : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHold() - : SubscribeAttribute("temperature-setpoint-hold") + SubscribeAttributeThermostatActiveScheduleHandle() + : SubscribeAttribute("active-schedule-handle") { } - ~SubscribeAttributeThermostatTemperatureSetpointHold() + ~SubscribeAttributeThermostatActiveScheduleHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111017,10 +110014,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + [cluster subscribeAttributeActiveScheduleHandleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111033,35 +110030,38 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TemperatureSetpointHoldDuration + * Attribute Presets */ -class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { +class ReadThermostatPresets : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHoldDuration() - : ReadAttribute("temperature-setpoint-hold-duration") + ReadThermostatPresets() + : ReadAttribute("presets") { } - ~ReadThermostatTemperatureSetpointHoldDuration() + ~ReadThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + [cluster readAttributePresetsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Presets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + LogNSError("Thermostat Presets read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111070,24 +110070,25 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { +class WriteThermostatPresets : public WriteAttribute { public: - WriteThermostatTemperatureSetpointHoldDuration() - : WriteAttribute("temperature-setpoint-hold-duration") + WriteThermostatPresets() + : WriteAttribute("presets") + , mComplex(&mValue) { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "presets"); + AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteThermostatTemperatureSetpointHoldDuration() + ~WriteThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111095,14 +110096,50 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRThermostatClusterPresetStruct * newElement_0; + newElement_0 = [MTRThermostatClusterPresetStruct new]; + if (entry_0.presetHandle.IsNull()) { + newElement_0.presetHandle = nil; + } else { + newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; + } + newElement_0.presetScenario = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.presetScenario)]; + if (entry_0.name.HasValue()) { + if (entry_0.name.Value().IsNull()) { + newElement_0.name = nil; + } else { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().Value().data() length:entry_0.name.Value().Value().size() encoding:NSUTF8StringEncoding]; + } + } else { + newElement_0.name = nil; + } + if (entry_0.coolingSetpoint.HasValue()) { + newElement_0.coolingSetpoint = [NSNumber numberWithShort:entry_0.coolingSetpoint.Value()]; + } else { + newElement_0.coolingSetpoint = nil; + } + if (entry_0.heatingSetpoint.HasValue()) { + newElement_0.heatingSetpoint = [NSNumber numberWithShort:entry_0.heatingSetpoint.Value()]; + } else { + newElement_0.heatingSetpoint = nil; + } + if (entry_0.builtIn.IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; + } + [array_0 addObject:newElement_0]; + } + value = array_0; } - [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributePresetsWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + LogNSError("Thermostat Presets write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111111,24 +110148,25 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +class SubscribeAttributeThermostatPresets : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHoldDuration() - : SubscribeAttribute("temperature-setpoint-hold-duration") + SubscribeAttributeThermostatPresets() + : SubscribeAttribute("presets") { } - ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + ~SubscribeAttributeThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111143,10 +110181,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + [cluster subscribeAttributePresetsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Presets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111159,35 +110197,38 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ThermostatProgrammingOperationMode + * Attribute Schedules */ -class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { +class ReadThermostatSchedules : public ReadAttribute { public: - ReadThermostatThermostatProgrammingOperationMode() - : ReadAttribute("thermostat-programming-operation-mode") + ReadThermostatSchedules() + : ReadAttribute("schedules") { } - ~ReadThermostatThermostatProgrammingOperationMode() + ~ReadThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + [cluster readAttributeSchedulesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Schedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + LogNSError("Thermostat Schedules read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111196,24 +110237,25 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { } }; -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { +class WriteThermostatSchedules : public WriteAttribute { public: - WriteThermostatThermostatProgrammingOperationMode() - : WriteAttribute("thermostat-programming-operation-mode") + WriteThermostatSchedules() + : WriteAttribute("schedules") + , mComplex(&mValue) { - AddArgument("attr-name", "thermostat-programming-operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "schedules"); + AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteThermostatThermostatProgrammingOperationMode() + ~WriteThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111221,11 +110263,72 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRThermostatClusterScheduleStruct * newElement_0; + newElement_0 = [MTRThermostatClusterScheduleStruct new]; + if (entry_0.scheduleHandle.IsNull()) { + newElement_0.scheduleHandle = nil; + } else { + newElement_0.scheduleHandle = [NSData dataWithBytes:entry_0.scheduleHandle.Value().data() length:entry_0.scheduleHandle.Value().size()]; + } + newElement_0.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.systemMode)]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.presetHandle.HasValue()) { + newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; + } else { + newElement_0.presetHandle = nil; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.transitions) { + MTRThermostatClusterScheduleTransitionStruct * newElement_2; + newElement_2 = [MTRThermostatClusterScheduleTransitionStruct new]; + newElement_2.dayOfWeek = [NSNumber numberWithUnsignedChar:entry_2.dayOfWeek.Raw()]; + newElement_2.transitionTime = [NSNumber numberWithUnsignedShort:entry_2.transitionTime]; + if (entry_2.presetHandle.HasValue()) { + newElement_2.presetHandle = [NSData dataWithBytes:entry_2.presetHandle.Value().data() length:entry_2.presetHandle.Value().size()]; + } else { + newElement_2.presetHandle = nil; + } + if (entry_2.systemMode.HasValue()) { + newElement_2.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.systemMode.Value())]; + } else { + newElement_2.systemMode = nil; + } + if (entry_2.coolingSetpoint.HasValue()) { + newElement_2.coolingSetpoint = [NSNumber numberWithShort:entry_2.coolingSetpoint.Value()]; + } else { + newElement_2.coolingSetpoint = nil; + } + if (entry_2.heatingSetpoint.HasValue()) { + newElement_2.heatingSetpoint = [NSNumber numberWithShort:entry_2.heatingSetpoint.Value()]; + } else { + newElement_2.heatingSetpoint = nil; + } + [array_2 addObject:newElement_2]; + } + newElement_0.transitions = array_2; + } + if (entry_0.builtIn.IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; + } + [array_0 addObject:newElement_0]; + } + value = array_0; + } - [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSchedulesWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); + LogNSError("Thermostat Schedules write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111234,24 +110337,25 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute } private: - uint8_t mValue; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatSchedules : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatProgrammingOperationMode() - : SubscribeAttribute("thermostat-programming-operation-mode") + SubscribeAttributeThermostatSchedules() + : SubscribeAttribute("schedules") { } - ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() + ~SubscribeAttributeThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111266,10 +110370,10 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + [cluster subscribeAttributeSchedulesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Schedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111282,35 +110386,38 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ThermostatRunningState + * Attribute SetpointHoldExpiryTimestamp */ -class ReadThermostatThermostatRunningState : public ReadAttribute { +class ReadThermostatSetpointHoldExpiryTimestamp : public ReadAttribute { public: - ReadThermostatThermostatRunningState() - : ReadAttribute("thermostat-running-state") + ReadThermostatSetpointHoldExpiryTimestamp() + : ReadAttribute("setpoint-hold-expiry-timestamp") { } - ~ReadThermostatThermostatRunningState() + ~ReadThermostatSetpointHoldExpiryTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + [cluster readAttributeSetpointHoldExpiryTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningState read Error", error); + LogNSError("Thermostat SetpointHoldExpiryTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111319,21 +110426,21 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningState() - : SubscribeAttribute("thermostat-running-state") + SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() + : SubscribeAttribute("setpoint-hold-expiry-timestamp") { } - ~SubscribeAttributeThermostatThermostatRunningState() + ~SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111348,10 +110455,10 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningStateWithParams:params + [cluster subscribeAttributeSetpointHoldExpiryTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111364,35 +110471,37 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SetpointChangeSource + * Attribute GeneratedCommandList */ -class ReadThermostatSetpointChangeSource : public ReadAttribute { +class ReadThermostatGeneratedCommandList : public ReadAttribute { public: - ReadThermostatSetpointChangeSource() - : ReadAttribute("setpoint-change-source") + ReadThermostatGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThermostatSetpointChangeSource() + ~ReadThermostatGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSource read Error", error); + LogNSError("Thermostat GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111401,21 +110510,21 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { +class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSource() - : SubscribeAttribute("setpoint-change-source") + SubscribeAttributeThermostatGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatSetpointChangeSource() + ~SubscribeAttributeThermostatGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111430,10 +110539,10 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111447,34 +110556,34 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu }; /* - * Attribute SetpointChangeAmount + * Attribute AcceptedCommandList */ -class ReadThermostatSetpointChangeAmount : public ReadAttribute { +class ReadThermostatAcceptedCommandList : public ReadAttribute { public: - ReadThermostatSetpointChangeAmount() - : ReadAttribute("setpoint-change-amount") + ReadThermostatAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThermostatSetpointChangeAmount() + ~ReadThermostatAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeAmount read Error", error); + LogNSError("Thermostat AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111483,21 +110592,21 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { +class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeAmount() - : SubscribeAttribute("setpoint-change-amount") + SubscribeAttributeThermostatAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatSetpointChangeAmount() + ~SubscribeAttributeThermostatAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111512,10 +110621,10 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111528,35 +110637,37 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SetpointChangeSourceTimestamp + * Attribute EventList */ -class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +class ReadThermostatEventList : public ReadAttribute { public: - ReadThermostatSetpointChangeSourceTimestamp() - : ReadAttribute("setpoint-change-source-timestamp") + ReadThermostatEventList() + : ReadAttribute("event-list") { } - ~ReadThermostatSetpointChangeSourceTimestamp() + ~ReadThermostatEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + LogNSError("Thermostat EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111565,21 +110676,21 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { +class SubscribeAttributeThermostatEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSourceTimestamp() - : SubscribeAttribute("setpoint-change-source-timestamp") + SubscribeAttributeThermostatEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + ~SubscribeAttributeThermostatEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111594,10 +110705,10 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111610,102 +110721,60 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute OccupiedSetback + * Attribute AttributeList */ -class ReadThermostatOccupiedSetback : public ReadAttribute { +class ReadThermostatAttributeList : public ReadAttribute { public: - ReadThermostatOccupiedSetback() - : ReadAttribute("occupied-setback") + ReadThermostatAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThermostatOccupiedSetback() + ~ReadThermostatAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetback read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatOccupiedSetback : public WriteAttribute { -public: - WriteThermostatOccupiedSetback() - : WriteAttribute("occupied-setback") - { - AddArgument("attr-name", "occupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedSetback() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); + LogNSError("Thermostat AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetback() - : SubscribeAttribute("occupied-setback") + SubscribeAttributeThermostatAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatOccupiedSetback() + ~SubscribeAttributeThermostatAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111720,10 +110789,10 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111737,34 +110806,34 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { }; /* - * Attribute OccupiedSetbackMin + * Attribute FeatureMap */ -class ReadThermostatOccupiedSetbackMin : public ReadAttribute { +class ReadThermostatFeatureMap : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMin() - : ReadAttribute("occupied-setback-min") + ReadThermostatFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThermostatOccupiedSetbackMin() + ~ReadThermostatFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetbackMin read Error", error); + LogNSError("Thermostat FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111773,21 +110842,21 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMin() - : SubscribeAttribute("occupied-setback-min") + SubscribeAttributeThermostatFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatOccupiedSetbackMin() + ~SubscribeAttributeThermostatFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111802,10 +110871,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + NSLog(@"Thermostat.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111819,34 +110888,34 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute }; /* - * Attribute OccupiedSetbackMax + * Attribute ClusterRevision */ -class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +class ReadThermostatClusterRevision : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMax() - : ReadAttribute("occupied-setback-max") + ReadThermostatClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThermostatOccupiedSetbackMax() + ~ReadThermostatClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetbackMax read Error", error); + LogNSError("Thermostat ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -111855,21 +110924,21 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMax() - : SubscribeAttribute("occupied-setback-max") + SubscribeAttributeThermostatClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatOccupiedSetbackMax() + ~SubscribeAttributeThermostatClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -111884,10 +110953,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -111900,188 +110969,191 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| Cluster FanControl | 0x0202 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Step | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * AirflowDirection | 0x000B | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute UnoccupiedSetback + * Command Step */ -class ReadThermostatUnoccupiedSetback : public ReadAttribute { +class FanControlStep : public ClusterCommand { public: - ReadThermostatUnoccupiedSetback() - : ReadAttribute("unoccupied-setback") - { - } - - ~ReadThermostatUnoccupiedSetback() + FanControlStep() + : ClusterCommand("step") { + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Wrap", 0, 1, &mRequest.wrap); + AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat UnoccupiedSetback read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + if (mRequest.wrap.HasValue()) { + params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; + } else { + params.wrap = nil; + } + if (mRequest.lowestOff.HasValue()) { + params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; + } else { + params.lowestOff = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::FanControl::Commands::Step::Type mRequest; }; -class WriteThermostatUnoccupiedSetback : public WriteAttribute { -public: - WriteThermostatUnoccupiedSetback() - : WriteAttribute("unoccupied-setback") +/* + * Attribute FanMode + */ +class ReadFanControlFanMode : public ReadAttribute { +public: + ReadFanControlFanMode() + : ReadAttribute("fan-mode") { - AddArgument("attr-name", "unoccupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedSetback() + ~ReadFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("FanControl FanMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +class WriteFanControlFanMode : public WriteAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetback() - : SubscribeAttribute("unoccupied-setback") + WriteFanControlFanMode() + : WriteAttribute("fan-mode") { + AddArgument("attr-name", "fan-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatUnoccupiedSetback() + ~WriteFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UnoccupiedSetbackMin - */ -class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { -public: - ReadThermostatUnoccupiedSetbackMin() - : ReadAttribute("unoccupied-setback-min") - { - } - - ~ReadThermostatUnoccupiedSetbackMin() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + [cluster writeAttributeFanModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMin() - : SubscribeAttribute("unoccupied-setback-min") + SubscribeAttributeFanControlFanMode() + : SubscribeAttribute("fan-mode") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMin() + ~SubscribeAttributeFanControlFanMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112092,10 +111164,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + [cluster subscribeAttributeFanModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + NSLog(@"FanControl.FanMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112109,34 +111181,34 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu }; /* - * Attribute UnoccupiedSetbackMax + * Attribute FanModeSequence */ -class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +class ReadFanControlFanModeSequence : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMax() - : ReadAttribute("unoccupied-setback-max") + ReadFanControlFanModeSequence() + : ReadAttribute("fan-mode-sequence") { } - ~ReadThermostatUnoccupiedSetbackMax() + ~ReadFanControlFanModeSequence() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + LogNSError("FanControl FanModeSequence read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112145,25 +111217,25 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMax() - : SubscribeAttribute("unoccupied-setback-max") + SubscribeAttributeFanControlFanModeSequence() + : SubscribeAttribute("fan-mode-sequence") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMax() + ~SubscribeAttributeFanControlFanModeSequence() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112174,10 +111246,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeFanModeSequenceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + NSLog(@"FanControl.FanModeSequence response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112191,34 +111263,34 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu }; /* - * Attribute EmergencyHeatDelta + * Attribute PercentSetting */ -class ReadThermostatEmergencyHeatDelta : public ReadAttribute { +class ReadFanControlPercentSetting : public ReadAttribute { public: - ReadThermostatEmergencyHeatDelta() - : ReadAttribute("emergency-heat-delta") + ReadFanControlPercentSetting() + : ReadAttribute("percent-setting") { } - ~ReadThermostatEmergencyHeatDelta() + ~ReadFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat EmergencyHeatDelta read Error", error); + LogNSError("FanControl PercentSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112227,36 +111299,39 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { } }; -class WriteThermostatEmergencyHeatDelta : public WriteAttribute { +class WriteFanControlPercentSetting : public WriteAttribute { public: - WriteThermostatEmergencyHeatDelta() - : WriteAttribute("emergency-heat-delta") + WriteFanControlPercentSetting() + : WriteAttribute("percent-setting") { - AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-name", "percent-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatEmergencyHeatDelta() + ~WriteFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); + LogNSError("FanControl PercentSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112265,28 +111340,28 @@ class WriteThermostatEmergencyHeatDelta : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatEmergencyHeatDelta() - : SubscribeAttribute("emergency-heat-delta") + SubscribeAttributeFanControlPercentSetting() + : SubscribeAttribute("percent-setting") { } - ~SubscribeAttributeThermostatEmergencyHeatDelta() + ~SubscribeAttributeFanControlPercentSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112297,10 +111372,10 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params + [cluster subscribeAttributePercentSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + NSLog(@"FanControl.PercentSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112314,102 +111389,61 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute }; /* - * Attribute ACType + * Attribute PercentCurrent */ -class ReadThermostatACType : public ReadAttribute { +class ReadFanControlPercentCurrent : public ReadAttribute { public: - ReadThermostatACType() - : ReadAttribute("actype") + ReadFanControlPercentCurrent() + : ReadAttribute("percent-current") { } - ~ReadThermostatACType() + ~ReadFanControlPercentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACType : public WriteAttribute { -public: - WriteThermostatACType() - : WriteAttribute("actype") - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); + LogNSError("FanControl PercentCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACType : public SubscribeAttribute { +class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { public: - SubscribeAttributeThermostatACType() - : SubscribeAttribute("actype") + SubscribeAttributeFanControlPercentCurrent() + : SubscribeAttribute("percent-current") { } - ~SubscribeAttributeThermostatACType() + ~SubscribeAttributeFanControlPercentCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112420,10 +111454,10 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACTypeWithParams:params + [cluster subscribeAttributePercentCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + NSLog(@"FanControl.PercentCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112437,102 +111471,61 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { }; /* - * Attribute ACCapacity + * Attribute SpeedMax */ -class ReadThermostatACCapacity : public ReadAttribute { +class ReadFanControlSpeedMax : public ReadAttribute { public: - ReadThermostatACCapacity() - : ReadAttribute("accapacity") + ReadFanControlSpeedMax() + : ReadAttribute("speed-max") { } - ~ReadThermostatACCapacity() + ~ReadFanControlSpeedMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacity : public WriteAttribute { -public: - WriteThermostatACCapacity() - : WriteAttribute("accapacity") - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); + LogNSError("FanControl SpeedMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacity() - : SubscribeAttribute("accapacity") + SubscribeAttributeFanControlSpeedMax() + : SubscribeAttribute("speed-max") { } - ~SubscribeAttributeThermostatACCapacity() + ~SubscribeAttributeFanControlSpeedMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112543,10 +111536,10 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityWithParams:params + [cluster subscribeAttributeSpeedMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + NSLog(@"FanControl.SpeedMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112560,34 +111553,34 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { }; /* - * Attribute ACRefrigerantType + * Attribute SpeedSetting */ -class ReadThermostatACRefrigerantType : public ReadAttribute { +class ReadFanControlSpeedSetting : public ReadAttribute { public: - ReadThermostatACRefrigerantType() - : ReadAttribute("acrefrigerant-type") + ReadFanControlSpeedSetting() + : ReadAttribute("speed-setting") { } - ~ReadThermostatACRefrigerantType() + ~ReadFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACRefrigerantType read Error", error); + LogNSError("FanControl SpeedSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112596,36 +111589,39 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { } }; -class WriteThermostatACRefrigerantType : public WriteAttribute { +class WriteFanControlSpeedSetting : public WriteAttribute { public: - WriteThermostatACRefrigerantType() - : WriteAttribute("acrefrigerant-type") + WriteFanControlSpeedSetting() + : WriteAttribute("speed-setting") { - AddArgument("attr-name", "acrefrigerant-type"); + AddArgument("attr-name", "speed-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACRefrigerantType() + ~WriteFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); + LogNSError("FanControl SpeedSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112634,28 +111630,28 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACRefrigerantType() - : SubscribeAttribute("acrefrigerant-type") + SubscribeAttributeFanControlSpeedSetting() + : SubscribeAttribute("speed-setting") { } - ~SubscribeAttributeThermostatACRefrigerantType() + ~SubscribeAttributeFanControlSpeedSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112666,10 +111662,10 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params + [cluster subscribeAttributeSpeedSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + NSLog(@"FanControl.SpeedSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112683,102 +111679,61 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute }; /* - * Attribute ACCompressorType + * Attribute SpeedCurrent */ -class ReadThermostatACCompressorType : public ReadAttribute { +class ReadFanControlSpeedCurrent : public ReadAttribute { public: - ReadThermostatACCompressorType() - : ReadAttribute("accompressor-type") + ReadFanControlSpeedCurrent() + : ReadAttribute("speed-current") { } - ~ReadThermostatACCompressorType() + ~ReadFanControlSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCompressorType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCompressorType : public WriteAttribute { -public: - WriteThermostatACCompressorType() - : WriteAttribute("accompressor-type") - { - AddArgument("attr-name", "accompressor-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCompressorType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); + LogNSError("FanControl SpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCompressorType() - : SubscribeAttribute("accompressor-type") + SubscribeAttributeFanControlSpeedCurrent() + : SubscribeAttribute("speed-current") { } - ~SubscribeAttributeThermostatACCompressorType() + ~SubscribeAttributeFanControlSpeedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112789,10 +111744,10 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCompressorTypeWithParams:params + [cluster subscribeAttributeSpeedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112806,102 +111761,61 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { }; /* - * Attribute ACErrorCode + * Attribute RockSupport */ -class ReadThermostatACErrorCode : public ReadAttribute { +class ReadFanControlRockSupport : public ReadAttribute { public: - ReadThermostatACErrorCode() - : ReadAttribute("acerror-code") + ReadFanControlRockSupport() + : ReadAttribute("rock-support") { } - ~ReadThermostatACErrorCode() + ~ReadFanControlRockSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACErrorCode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACErrorCode : public WriteAttribute { -public: - WriteThermostatACErrorCode() - : WriteAttribute("acerror-code") - { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACErrorCode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); + LogNSError("FanControl RockSupport read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { public: - SubscribeAttributeThermostatACErrorCode() - : SubscribeAttribute("acerror-code") + SubscribeAttributeFanControlRockSupport() + : SubscribeAttribute("rock-support") { } - ~SubscribeAttributeThermostatACErrorCode() + ~SubscribeAttributeFanControlRockSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -112912,10 +111826,10 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACErrorCodeWithParams:params + [cluster subscribeAttributeRockSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + NSLog(@"FanControl.RockSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -112929,34 +111843,34 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { }; /* - * Attribute ACLouverPosition + * Attribute RockSetting */ -class ReadThermostatACLouverPosition : public ReadAttribute { +class ReadFanControlRockSetting : public ReadAttribute { public: - ReadThermostatACLouverPosition() - : ReadAttribute("aclouver-position") + ReadFanControlRockSetting() + : ReadAttribute("rock-setting") { } - ~ReadThermostatACLouverPosition() + ~ReadFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACLouverPosition read Error", error); + LogNSError("FanControl RockSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -112965,36 +111879,36 @@ class ReadThermostatACLouverPosition : public ReadAttribute { } }; -class WriteThermostatACLouverPosition : public WriteAttribute { +class WriteFanControlRockSetting : public WriteAttribute { public: - WriteThermostatACLouverPosition() - : WriteAttribute("aclouver-position") + WriteFanControlRockSetting() + : WriteAttribute("rock-setting") { - AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-name", "rock-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACLouverPosition() + ~WriteFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeRockSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); + LogNSError("FanControl RockSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113006,25 +111920,25 @@ class WriteThermostatACLouverPosition : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACLouverPosition() - : SubscribeAttribute("aclouver-position") + SubscribeAttributeFanControlRockSetting() + : SubscribeAttribute("rock-setting") { } - ~SubscribeAttributeThermostatACLouverPosition() + ~SubscribeAttributeFanControlRockSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113035,10 +111949,10 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACLouverPositionWithParams:params + [cluster subscribeAttributeRockSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + NSLog(@"FanControl.RockSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113052,34 +111966,34 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { }; /* - * Attribute ACCoilTemperature + * Attribute WindSupport */ -class ReadThermostatACCoilTemperature : public ReadAttribute { +class ReadFanControlWindSupport : public ReadAttribute { public: - ReadThermostatACCoilTemperature() - : ReadAttribute("accoil-temperature") + ReadFanControlWindSupport() + : ReadAttribute("wind-support") { } - ~ReadThermostatACCoilTemperature() + ~ReadFanControlWindSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCoilTemperature read Error", error); + LogNSError("FanControl WindSupport read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113088,25 +112002,25 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { +class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCoilTemperature() - : SubscribeAttribute("accoil-temperature") + SubscribeAttributeFanControlWindSupport() + : SubscribeAttribute("wind-support") { } - ~SubscribeAttributeThermostatACCoilTemperature() + ~SubscribeAttributeFanControlWindSupport() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113117,10 +112031,10 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCoilTemperatureWithParams:params + [cluster subscribeAttributeWindSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + NSLog(@"FanControl.WindSupport response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113134,34 +112048,34 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute }; /* - * Attribute ACCapacityformat + * Attribute WindSetting */ -class ReadThermostatACCapacityformat : public ReadAttribute { +class ReadFanControlWindSetting : public ReadAttribute { public: - ReadThermostatACCapacityformat() - : ReadAttribute("accapacityformat") + ReadFanControlWindSetting() + : ReadAttribute("wind-setting") { } - ~ReadThermostatACCapacityformat() + ~ReadFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacityformat read Error", error); + LogNSError("FanControl WindSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113170,36 +112084,36 @@ class ReadThermostatACCapacityformat : public ReadAttribute { } }; -class WriteThermostatACCapacityformat : public WriteAttribute { +class WriteFanControlWindSetting : public WriteAttribute { public: - WriteThermostatACCapacityformat() - : WriteAttribute("accapacityformat") + WriteFanControlWindSetting() + : WriteAttribute("wind-setting") { - AddArgument("attr-name", "accapacityformat"); + AddArgument("attr-name", "wind-setting"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatACCapacityformat() + ~WriteFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeWindSettingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); + LogNSError("FanControl WindSetting write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113211,25 +112125,25 @@ class WriteThermostatACCapacityformat : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacityformat() - : SubscribeAttribute("accapacityformat") + SubscribeAttributeFanControlWindSetting() + : SubscribeAttribute("wind-setting") { } - ~SubscribeAttributeThermostatACCapacityformat() + ~SubscribeAttributeFanControlWindSetting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113240,10 +112154,10 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityformatWithParams:params + [cluster subscribeAttributeWindSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + NSLog(@"FanControl.WindSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113256,37 +112170,35 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PresetTypes + * Attribute AirflowDirection */ -class ReadThermostatPresetTypes : public ReadAttribute { +class ReadFanControlAirflowDirection : public ReadAttribute { public: - ReadThermostatPresetTypes() - : ReadAttribute("preset-types") + ReadFanControlAirflowDirection() + : ReadAttribute("airflow-direction") { } - ~ReadThermostatPresetTypes() + ~ReadFanControlAirflowDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePresetTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PresetTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AirflowDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PresetTypes read Error", error); + LogNSError("FanControl AirflowDirection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113295,25 +112207,66 @@ class ReadThermostatPresetTypes : public ReadAttribute { } }; -class SubscribeAttributeThermostatPresetTypes : public SubscribeAttribute { +class WriteFanControlAirflowDirection : public WriteAttribute { public: - SubscribeAttributeThermostatPresetTypes() - : SubscribeAttribute("preset-types") + WriteFanControlAirflowDirection() + : WriteAttribute("airflow-direction") + { + AddArgument("attr-name", "airflow-direction"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlAirflowDirection() { } - ~SubscribeAttributeThermostatPresetTypes() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeAirflowDirectionWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl AirflowDirection write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { +public: + SubscribeAttributeFanControlAirflowDirection() + : SubscribeAttribute("airflow-direction") + { + } + + ~SubscribeAttributeFanControlAirflowDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113324,10 +112277,10 @@ class SubscribeAttributeThermostatPresetTypes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePresetTypesWithParams:params + [cluster subscribeAttributeAirflowDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PresetTypes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AirflowDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113340,38 +112293,35 @@ class SubscribeAttributeThermostatPresetTypes : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ScheduleTypes + * Attribute GeneratedCommandList */ -class ReadThermostatScheduleTypes : public ReadAttribute { +class ReadFanControlGeneratedCommandList : public ReadAttribute { public: - ReadThermostatScheduleTypes() - : ReadAttribute("schedule-types") + ReadFanControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThermostatScheduleTypes() + ~ReadFanControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduleTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ScheduleTypes read Error", error); + LogNSError("FanControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113380,25 +112330,25 @@ class ReadThermostatScheduleTypes : public ReadAttribute { } }; -class SubscribeAttributeThermostatScheduleTypes : public SubscribeAttribute { +class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatScheduleTypes() - : SubscribeAttribute("schedule-types") + SubscribeAttributeFanControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatScheduleTypes() + ~SubscribeAttributeFanControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113409,10 +112359,10 @@ class SubscribeAttributeThermostatScheduleTypes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScheduleTypesWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113425,38 +112375,35 @@ class SubscribeAttributeThermostatScheduleTypes : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NumberOfPresets + * Attribute AcceptedCommandList */ -class ReadThermostatNumberOfPresets : public ReadAttribute { +class ReadFanControlAcceptedCommandList : public ReadAttribute { public: - ReadThermostatNumberOfPresets() - : ReadAttribute("number-of-presets") + ReadFanControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThermostatNumberOfPresets() + ~ReadFanControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPresetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfPresets read Error", error); + LogNSError("FanControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113465,25 +112412,25 @@ class ReadThermostatNumberOfPresets : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfPresets : public SubscribeAttribute { +class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfPresets() - : SubscribeAttribute("number-of-presets") + SubscribeAttributeFanControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatNumberOfPresets() + ~SubscribeAttributeFanControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113494,10 +112441,10 @@ class SubscribeAttributeThermostatNumberOfPresets : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPresetsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113510,38 +112457,37 @@ class SubscribeAttributeThermostatNumberOfPresets : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfSchedules + * Attribute EventList */ -class ReadThermostatNumberOfSchedules : public ReadAttribute { +class ReadFanControlEventList : public ReadAttribute { public: - ReadThermostatNumberOfSchedules() - : ReadAttribute("number-of-schedules") + ReadFanControlEventList() + : ReadAttribute("event-list") { } - ~ReadThermostatNumberOfSchedules() + ~ReadFanControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfSchedulesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfSchedules read Error", error); + LogNSError("FanControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113550,25 +112496,25 @@ class ReadThermostatNumberOfSchedules : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfSchedules : public SubscribeAttribute { +class SubscribeAttributeFanControlEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfSchedules() - : SubscribeAttribute("number-of-schedules") + SubscribeAttributeFanControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatNumberOfSchedules() + ~SubscribeAttributeFanControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113579,10 +112525,10 @@ class SubscribeAttributeThermostatNumberOfSchedules : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfSchedulesWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113596,122 +112542,36 @@ class SubscribeAttributeThermostatNumberOfSchedules : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfScheduleTransitions + * Attribute AttributeList */ -class ReadThermostatNumberOfScheduleTransitions : public ReadAttribute { +class ReadFanControlAttributeList : public ReadAttribute { public: - ReadThermostatNumberOfScheduleTransitions() - : ReadAttribute("number-of-schedule-transitions") - { - } - - ~ReadThermostatNumberOfScheduleTransitions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfScheduleTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat NumberOfScheduleTransitions read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatNumberOfScheduleTransitions : public SubscribeAttribute { -public: - SubscribeAttributeThermostatNumberOfScheduleTransitions() - : SubscribeAttribute("number-of-schedule-transitions") - { - } - - ~SubscribeAttributeThermostatNumberOfScheduleTransitions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfScheduleTransitionsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute NumberOfScheduleTransitionPerDay - */ -class ReadThermostatNumberOfScheduleTransitionPerDay : public ReadAttribute { -public: - ReadThermostatNumberOfScheduleTransitionPerDay() - : ReadAttribute("number-of-schedule-transition-per-day") + ReadFanControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThermostatNumberOfScheduleTransitionPerDay() + ~ReadFanControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfScheduleTransitionPerDayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfScheduleTransitionPerDay read Error", error); + LogNSError("FanControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113720,25 +112580,25 @@ class ReadThermostatNumberOfScheduleTransitionPerDay : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay : public SubscribeAttribute { +class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() - : SubscribeAttribute("number-of-schedule-transition-per-day") + SubscribeAttributeFanControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() + ~SubscribeAttributeFanControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113749,10 +112609,10 @@ class SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113765,38 +112625,35 @@ class SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ActivePresetHandle + * Attribute FeatureMap */ -class ReadThermostatActivePresetHandle : public ReadAttribute { +class ReadFanControlFeatureMap : public ReadAttribute { public: - ReadThermostatActivePresetHandle() - : ReadAttribute("active-preset-handle") + ReadFanControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThermostatActivePresetHandle() + ~ReadFanControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePresetHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ActivePresetHandle read Error", error); + LogNSError("FanControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113805,25 +112662,25 @@ class ReadThermostatActivePresetHandle : public ReadAttribute { } }; -class SubscribeAttributeThermostatActivePresetHandle : public SubscribeAttribute { +class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatActivePresetHandle() - : SubscribeAttribute("active-preset-handle") + SubscribeAttributeFanControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatActivePresetHandle() + ~SubscribeAttributeFanControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113834,10 +112691,10 @@ class SubscribeAttributeThermostatActivePresetHandle : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePresetHandleWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113850,38 +112707,35 @@ class SubscribeAttributeThermostatActivePresetHandle : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ActiveScheduleHandle + * Attribute ClusterRevision */ -class ReadThermostatActiveScheduleHandle : public ReadAttribute { +class ReadFanControlClusterRevision : public ReadAttribute { public: - ReadThermostatActiveScheduleHandle() - : ReadAttribute("active-schedule-handle") + ReadFanControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThermostatActiveScheduleHandle() + ~ReadFanControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveScheduleHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ActiveScheduleHandle read Error", error); + LogNSError("FanControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113890,25 +112744,25 @@ class ReadThermostatActiveScheduleHandle : public ReadAttribute { } }; -class SubscribeAttributeThermostatActiveScheduleHandle : public SubscribeAttribute { +class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatActiveScheduleHandle() - : SubscribeAttribute("active-schedule-handle") + SubscribeAttributeFanControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatActiveScheduleHandle() + ~SubscribeAttributeFanControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -113919,10 +112773,10 @@ class SubscribeAttributeThermostatActiveScheduleHandle : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveScheduleHandleWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -113935,38 +112789,54 @@ class SubscribeAttributeThermostatActiveScheduleHandle : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute Presets + * Attribute TemperatureDisplayMode */ -class ReadThermostatPresets : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { public: - ReadThermostatPresets() - : ReadAttribute("presets") + ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : ReadAttribute("temperature-display-mode") { } - ~ReadThermostatPresets() + ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePresetsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Presets response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat Presets read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -113975,76 +112845,36 @@ class ReadThermostatPresets : public ReadAttribute { } }; -class WriteThermostatPresets : public WriteAttribute { +class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { public: - WriteThermostatPresets() - : WriteAttribute("presets") - , mComplex(&mValue) + WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : WriteAttribute("temperature-display-mode") { - AddArgument("attr-name", "presets"); - AddArgument("attr-value", &mComplex); + AddArgument("attr-name", "temperature-display-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatPresets() + ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRThermostatClusterPresetStruct * newElement_0; - newElement_0 = [MTRThermostatClusterPresetStruct new]; - if (entry_0.presetHandle.IsNull()) { - newElement_0.presetHandle = nil; - } else { - newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; - } - newElement_0.presetScenario = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.presetScenario)]; - if (entry_0.name.HasValue()) { - if (entry_0.name.Value().IsNull()) { - newElement_0.name = nil; - } else { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().Value().data() length:entry_0.name.Value().Value().size() encoding:NSUTF8StringEncoding]; - } - } else { - newElement_0.name = nil; - } - if (entry_0.coolingSetpoint.HasValue()) { - newElement_0.coolingSetpoint = [NSNumber numberWithShort:entry_0.coolingSetpoint.Value()]; - } else { - newElement_0.coolingSetpoint = nil; - } - if (entry_0.heatingSetpoint.HasValue()) { - newElement_0.heatingSetpoint = [NSNumber numberWithShort:entry_0.heatingSetpoint.Value()]; - } else { - newElement_0.heatingSetpoint = nil; - } - if (entry_0.builtIn.IsNull()) { - newElement_0.builtIn = nil; - } else { - newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; - } - [array_0 addObject:newElement_0]; - } - value = array_0; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributePresetsWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat Presets write Error", error); + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114053,29 +112883,28 @@ class WriteThermostatPresets : public WriteAttribute { } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + uint8_t mValue; }; -class SubscribeAttributeThermostatPresets : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatPresets() - : SubscribeAttribute("presets") + SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : SubscribeAttribute("temperature-display-mode") { } - ~SubscribeAttributeThermostatPresets() + ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114086,10 +112915,10 @@ class SubscribeAttributeThermostatPresets : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePresetsWithParams:params + [cluster subscribeAttributeTemperatureDisplayModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Presets response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114102,38 +112931,35 @@ class SubscribeAttributeThermostatPresets : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Schedules + * Attribute KeypadLockout */ -class ReadThermostatSchedules : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { public: - ReadThermostatSchedules() - : ReadAttribute("schedules") + ReadThermostatUserInterfaceConfigurationKeypadLockout() + : ReadAttribute("keypad-lockout") { } - ~ReadThermostatSchedules() + ~ReadThermostatUserInterfaceConfigurationKeypadLockout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSchedulesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Schedules response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat Schedules read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114142,98 +112968,36 @@ class ReadThermostatSchedules : public ReadAttribute { } }; -class WriteThermostatSchedules : public WriteAttribute { +class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { public: - WriteThermostatSchedules() - : WriteAttribute("schedules") - , mComplex(&mValue) + WriteThermostatUserInterfaceConfigurationKeypadLockout() + : WriteAttribute("keypad-lockout") { - AddArgument("attr-name", "schedules"); - AddArgument("attr-value", &mComplex); + AddArgument("attr-name", "keypad-lockout"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatSchedules() + ~WriteThermostatUserInterfaceConfigurationKeypadLockout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRThermostatClusterScheduleStruct * newElement_0; - newElement_0 = [MTRThermostatClusterScheduleStruct new]; - if (entry_0.scheduleHandle.IsNull()) { - newElement_0.scheduleHandle = nil; - } else { - newElement_0.scheduleHandle = [NSData dataWithBytes:entry_0.scheduleHandle.Value().data() length:entry_0.scheduleHandle.Value().size()]; - } - newElement_0.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.systemMode)]; - if (entry_0.name.HasValue()) { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_0.name = nil; - } - if (entry_0.presetHandle.HasValue()) { - newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; - } else { - newElement_0.presetHandle = nil; - } - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - for (auto & entry_2 : entry_0.transitions) { - MTRThermostatClusterScheduleTransitionStruct * newElement_2; - newElement_2 = [MTRThermostatClusterScheduleTransitionStruct new]; - newElement_2.dayOfWeek = [NSNumber numberWithUnsignedChar:entry_2.dayOfWeek.Raw()]; - newElement_2.transitionTime = [NSNumber numberWithUnsignedShort:entry_2.transitionTime]; - if (entry_2.presetHandle.HasValue()) { - newElement_2.presetHandle = [NSData dataWithBytes:entry_2.presetHandle.Value().data() length:entry_2.presetHandle.Value().size()]; - } else { - newElement_2.presetHandle = nil; - } - if (entry_2.systemMode.HasValue()) { - newElement_2.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.systemMode.Value())]; - } else { - newElement_2.systemMode = nil; - } - if (entry_2.coolingSetpoint.HasValue()) { - newElement_2.coolingSetpoint = [NSNumber numberWithShort:entry_2.coolingSetpoint.Value()]; - } else { - newElement_2.coolingSetpoint = nil; - } - if (entry_2.heatingSetpoint.HasValue()) { - newElement_2.heatingSetpoint = [NSNumber numberWithShort:entry_2.heatingSetpoint.Value()]; - } else { - newElement_2.heatingSetpoint = nil; - } - [array_2 addObject:newElement_2]; - } - newElement_0.transitions = array_2; - } - if (entry_0.builtIn.IsNull()) { - newElement_0.builtIn = nil; - } else { - newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; - } - [array_0 addObject:newElement_0]; - } - value = array_0; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeSchedulesWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeKeypadLockoutWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat Schedules write Error", error); + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114242,29 +113006,28 @@ class WriteThermostatSchedules : public WriteAttribute { } private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; + uint8_t mValue; }; -class SubscribeAttributeThermostatSchedules : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { public: - SubscribeAttributeThermostatSchedules() - : SubscribeAttribute("schedules") + SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + : SubscribeAttribute("keypad-lockout") { } - ~SubscribeAttributeThermostatSchedules() + ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114275,10 +113038,10 @@ class SubscribeAttributeThermostatSchedules : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSchedulesWithParams:params + [cluster subscribeAttributeKeypadLockoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Schedules response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114291,38 +113054,35 @@ class SubscribeAttributeThermostatSchedules : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SetpointHoldExpiryTimestamp + * Attribute ScheduleProgrammingVisibility */ -class ReadThermostatSetpointHoldExpiryTimestamp : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { public: - ReadThermostatSetpointHoldExpiryTimestamp() - : ReadAttribute("setpoint-hold-expiry-timestamp") + ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : ReadAttribute("schedule-programming-visibility") { } - ~ReadThermostatSetpointHoldExpiryTimestamp() + ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointHoldExpiryTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointHoldExpiryTimestamp read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114331,25 +113091,66 @@ class ReadThermostatSetpointHoldExpiryTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public SubscribeAttribute { +class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { public: - SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() - : SubscribeAttribute("setpoint-hold-expiry-timestamp") + WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : WriteAttribute("schedule-programming-visibility") { + AddArgument("attr-name", "schedule-programming-visibility"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() + ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : SubscribeAttribute("schedule-programming-visibility") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114360,10 +113161,10 @@ class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointHoldExpiryTimestampWithParams:params + [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114376,37 +113177,35 @@ class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadThermostatGeneratedCommandList : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadThermostatGeneratedCommandList() + ReadThermostatUserInterfaceConfigurationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadThermostatGeneratedCommandList() + ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat GeneratedCommandList read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114415,25 +113214,25 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatGeneratedCommandList() + SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatGeneratedCommandList() + ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114447,7 +113246,7 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114463,32 +113262,32 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu /* * Attribute AcceptedCommandList */ -class ReadThermostatAcceptedCommandList : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadThermostatAcceptedCommandList() + ReadThermostatUserInterfaceConfigurationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadThermostatAcceptedCommandList() + ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AcceptedCommandList read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114497,25 +113296,25 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatAcceptedCommandList() + SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatAcceptedCommandList() + ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114529,7 +113328,7 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114547,32 +113346,32 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut /* * Attribute EventList */ -class ReadThermostatEventList : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { public: - ReadThermostatEventList() + ReadThermostatUserInterfaceConfigurationEventList() : ReadAttribute("event-list") { } - ~ReadThermostatEventList() + ~ReadThermostatUserInterfaceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat EventList read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114581,25 +113380,25 @@ class ReadThermostatEventList : public ReadAttribute { } }; -class SubscribeAttributeThermostatEventList : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatEventList() + SubscribeAttributeThermostatUserInterfaceConfigurationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatEventList() + ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114613,7 +113412,7 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EventList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114631,32 +113430,32 @@ class SubscribeAttributeThermostatEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadThermostatAttributeList : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { public: - ReadThermostatAttributeList() + ReadThermostatUserInterfaceConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadThermostatAttributeList() + ~ReadThermostatUserInterfaceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AttributeList read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114665,25 +113464,25 @@ class ReadThermostatAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatAttributeList() + SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatAttributeList() + ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114697,7 +113496,7 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114713,32 +113512,32 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadThermostatFeatureMap : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { public: - ReadThermostatFeatureMap() + ReadThermostatUserInterfaceConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadThermostatFeatureMap() + ~ReadThermostatUserInterfaceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat FeatureMap read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114747,25 +113546,25 @@ class ReadThermostatFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatFeatureMap() + SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatFeatureMap() + ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114779,7 +113578,7 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114795,32 +113594,32 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadThermostatClusterRevision : public ReadAttribute { +class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { public: - ReadThermostatClusterRevision() + ReadThermostatUserInterfaceConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadThermostatClusterRevision() + ~ReadThermostatUserInterfaceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ClusterRevision read Error", error); + LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -114829,25 +113628,25 @@ class ReadThermostatClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatClusterRevision() + SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatClusterRevision() + ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -114861,7 +113660,7 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -114875,24 +113674,82 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | +| Cluster ColorControl | 0x0300 | |------------------------------------------------------------------------------| | Commands: | | -| * Step | 0x00 | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | |------------------------------------------------------------------------------| | Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * AirflowDirection | 0x000B | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -114904,17883 +113761,1071 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command Step + * Command MoveToHue */ -class FanControlStep : public ClusterCommand { +class ColorControlMoveToHue : public ClusterCommand { public: - FanControlStep() - : ClusterCommand("step") + ColorControlMoveToHue() + : ClusterCommand("move-to-hue") { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Wrap", 0, 1, &mRequest.wrap); - AddArgument("LowestOff", 0, 1, &mRequest.lowestOff); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::FanControl::Commands::Step::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRFanControlClusterStepParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - if (mRequest.wrap.HasValue()) { - params.wrap = [NSNumber numberWithBool:mRequest.wrap.Value()]; - } else { - params.wrap = nil; - } - if (mRequest.lowestOff.HasValue()) { - params.lowestOff = [NSNumber numberWithBool:mRequest.lowestOff.Value()]; - } else { - params.lowestOff = nil; - } + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stepWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster moveToHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::FanControl::Commands::Step::Type mRequest; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; /* - * Attribute FanMode + * Command MoveHue */ -class ReadFanControlFanMode : public ReadAttribute { +class ColorControlMoveHue : public ClusterCommand { public: - ReadFanControlFanMode() - : ReadAttribute("fan-mode") - { - } - - ~ReadFanControlFanMode() + ColorControlMoveHue() + : ClusterCommand("move-hue") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl FanMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; -class WriteFanControlFanMode : public WriteAttribute { +/* + * Command StepHue + */ +class ColorControlStepHue : public ClusterCommand { public: - WriteFanControlFanMode() - : WriteAttribute("fan-mode") - { - AddArgument("attr-name", "fan-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlFanMode() + ColorControlStepHue() + : ClusterCommand("step-hue") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - [cluster writeAttributeFanModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } private: - uint8_t mValue; + chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; -class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { +/* + * Command MoveToSaturation + */ +class ColorControlMoveToSaturation : public ClusterCommand { public: - SubscribeAttributeFanControlFanMode() - : SubscribeAttribute("fan-mode") - { - } - - ~SubscribeAttributeFanControlFanMode() + ColorControlMoveToSaturation() + : ClusterCommand("move-to-saturation") { + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToSaturationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFanModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; /* - * Attribute FanModeSequence + * Command MoveSaturation */ -class ReadFanControlFanModeSequence : public ReadAttribute { +class ColorControlMoveSaturation : public ClusterCommand { public: - ReadFanControlFanModeSequence() - : ReadAttribute("fan-mode-sequence") - { - } - - ~ReadFanControlFanModeSequence() + ColorControlMoveSaturation() + : ClusterCommand("move-saturation") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl FanModeSequence read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveSaturationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; -class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { +/* + * Command StepSaturation + */ +class ColorControlStepSaturation : public ClusterCommand { public: - SubscribeAttributeFanControlFanModeSequence() - : SubscribeAttribute("fan-mode-sequence") - { - } - - ~SubscribeAttributeFanControlFanModeSequence() + ColorControlStepSaturation() + : ClusterCommand("step-saturation") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FanModeSequence::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepSaturationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFanModeSequenceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Attribute PercentSetting + * Command MoveToHueAndSaturation */ -class ReadFanControlPercentSetting : public ReadAttribute { +class ColorControlMoveToHueAndSaturation : public ClusterCommand { public: - ReadFanControlPercentSetting() - : ReadAttribute("percent-setting") - { - } - - ~ReadFanControlPercentSetting() + ColorControlMoveToHueAndSaturation() + : ClusterCommand("move-to-hue-and-saturation") { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl PercentSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueAndSaturationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; -class WriteFanControlPercentSetting : public WriteAttribute { +/* + * Command MoveToColor + */ +class ColorControlMoveToColor : public ClusterCommand { public: - WriteFanControlPercentSetting() - : WriteAttribute("percent-setting") - { - AddArgument("attr-name", "percent-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlPercentSetting() + ColorControlMoveToColor() + : ClusterCommand("move-to-color") { + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; + params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributePercentSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; -class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { +/* + * Command MoveColor + */ +class ColorControlMoveColor : public ClusterCommand { public: - SubscribeAttributeFanControlPercentSetting() - : SubscribeAttribute("percent-setting") - { - } - - ~SubscribeAttributeFanControlPercentSetting() + ColorControlMoveColor() + : ClusterCommand("move-color") { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rateX = [NSNumber numberWithShort:mRequest.rateX]; + params.rateY = [NSNumber numberWithShort:mRequest.rateY]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributePercentSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; /* - * Attribute PercentCurrent + * Command StepColor */ -class ReadFanControlPercentCurrent : public ReadAttribute { +class ColorControlStepColor : public ClusterCommand { public: - ReadFanControlPercentCurrent() - : ReadAttribute("percent-current") - { - } - - ~ReadFanControlPercentCurrent() + ColorControlStepColor() + : ClusterCommand("step-color") { + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl PercentCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepX = [NSNumber numberWithShort:mRequest.stepX]; + params.stepY = [NSNumber numberWithShort:mRequest.stepY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; -class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { +/* + * Command MoveToColorTemperature + */ +class ColorControlMoveToColorTemperature : public ClusterCommand { public: - SubscribeAttributeFanControlPercentCurrent() - : SubscribeAttribute("percent-current") - { - } - - ~SubscribeAttributeFanControlPercentCurrent() + ColorControlMoveToColorTemperature() + : ClusterCommand("move-to-color-temperature") { + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::PercentCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorTemperatureWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributePercentCurrentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; /* - * Attribute SpeedMax + * Command EnhancedMoveToHue */ -class ReadFanControlSpeedMax : public ReadAttribute { +class ColorControlEnhancedMoveToHue : public ClusterCommand { public: - ReadFanControlSpeedMax() - : ReadAttribute("speed-max") - { - } - - ~ReadFanControlSpeedMax() + ColorControlEnhancedMoveToHue() + : ClusterCommand("enhanced-move-to-hue") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl SpeedMax read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; }; -class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { +/* + * Command EnhancedMoveHue + */ +class ColorControlEnhancedMoveHue : public ClusterCommand { public: - SubscribeAttributeFanControlSpeedMax() - : SubscribeAttribute("speed-max") - { - } - - ~SubscribeAttributeFanControlSpeedMax() + ColorControlEnhancedMoveHue() + : ClusterCommand("enhanced-move-hue") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSpeedMaxWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; /* - * Attribute SpeedSetting + * Command EnhancedStepHue */ -class ReadFanControlSpeedSetting : public ReadAttribute { +class ColorControlEnhancedStepHue : public ClusterCommand { public: - ReadFanControlSpeedSetting() - : ReadAttribute("speed-setting") - { - } - - ~ReadFanControlSpeedSetting() + ColorControlEnhancedStepHue() + : ClusterCommand("enhanced-step-hue") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl SpeedSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedStepHueWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; -class WriteFanControlSpeedSetting : public WriteAttribute { +/* + * Command EnhancedMoveToHueAndSaturation + */ +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { public: - WriteFanControlSpeedSetting() - : WriteAttribute("speed-setting") - { - AddArgument("attr-name", "speed-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlSpeedSetting() + ColorControlEnhancedMoveToHueAndSaturation() + : ClusterCommand("enhanced-move-to-hue-and-saturation") { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueAndSaturationWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - - [cluster writeAttributeSpeedSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; }; -class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { +/* + * Command ColorLoopSet + */ +class ColorControlColorLoopSet : public ClusterCommand { public: - SubscribeAttributeFanControlSpeedSetting() - : SubscribeAttribute("speed-setting") - { - } - - ~SubscribeAttributeFanControlSpeedSetting() + ColorControlColorLoopSet() + : ClusterCommand("color-loop-set") { + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedSetting::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; + params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; + params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster colorLoopSetWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSpeedSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; /* - * Attribute SpeedCurrent + * Command StopMoveStep */ -class ReadFanControlSpeedCurrent : public ReadAttribute { +class ColorControlStopMoveStep : public ClusterCommand { public: - ReadFanControlSpeedCurrent() - : ReadAttribute("speed-current") - { - } - - ~ReadFanControlSpeedCurrent() + ColorControlStopMoveStep() + : ClusterCommand("stop-move-step") { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl SpeedCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMoveStepWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; -class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { +/* + * Command MoveColorTemperature + */ +class ColorControlMoveColorTemperature : public ClusterCommand { public: - SubscribeAttributeFanControlSpeedCurrent() - : SubscribeAttribute("speed-current") - { - } - - ~SubscribeAttributeFanControlSpeedCurrent() + ColorControlMoveColorTemperature() + : ClusterCommand("move-color-temperature") { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::SpeedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorTemperatureWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSpeedCurrentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; }; /* - * Attribute RockSupport + * Command StepColorTemperature */ -class ReadFanControlRockSupport : public ReadAttribute { -public: - ReadFanControlRockSupport() - : ReadAttribute("rock-support") - { - } - - ~ReadFanControlRockSupport() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl RockSupport read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { -public: - SubscribeAttributeFanControlRockSupport() - : SubscribeAttribute("rock-support") - { - } - - ~SubscribeAttributeFanControlRockSupport() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSupport::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRockSupportWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RockSetting - */ -class ReadFanControlRockSetting : public ReadAttribute { -public: - ReadFanControlRockSetting() - : ReadAttribute("rock-setting") - { - } - - ~ReadFanControlRockSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl RockSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlRockSetting : public WriteAttribute { -public: - WriteFanControlRockSetting() - : WriteAttribute("rock-setting") - { - AddArgument("attr-name", "rock-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlRockSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeRockSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlRockSetting() - : SubscribeAttribute("rock-setting") - { - } - - ~SubscribeAttributeFanControlRockSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::RockSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRockSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WindSupport - */ -class ReadFanControlWindSupport : public ReadAttribute { -public: - ReadFanControlWindSupport() - : ReadAttribute("wind-support") - { - } - - ~ReadFanControlWindSupport() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl WindSupport read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { -public: - SubscribeAttributeFanControlWindSupport() - : SubscribeAttribute("wind-support") - { - } - - ~SubscribeAttributeFanControlWindSupport() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSupport::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWindSupportWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WindSetting - */ -class ReadFanControlWindSetting : public ReadAttribute { -public: - ReadFanControlWindSetting() - : ReadAttribute("wind-setting") - { - } - - ~ReadFanControlWindSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl WindSetting read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlWindSetting : public WriteAttribute { -public: - WriteFanControlWindSetting() - : WriteAttribute("wind-setting") - { - AddArgument("attr-name", "wind-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlWindSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeWindSettingWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { -public: - SubscribeAttributeFanControlWindSetting() - : SubscribeAttribute("wind-setting") - { - } - - ~SubscribeAttributeFanControlWindSetting() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::WindSetting::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWindSettingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AirflowDirection - */ -class ReadFanControlAirflowDirection : public ReadAttribute { -public: - ReadFanControlAirflowDirection() - : ReadAttribute("airflow-direction") - { - } - - ~ReadFanControlAirflowDirection() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAirflowDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl AirflowDirection read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteFanControlAirflowDirection : public WriteAttribute { -public: - WriteFanControlAirflowDirection() - : WriteAttribute("airflow-direction") - { - AddArgument("attr-name", "airflow-direction"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlAirflowDirection() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeAirflowDirectionWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl AirflowDirection write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlAirflowDirection : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAirflowDirection() - : SubscribeAttribute("airflow-direction") - { - } - - ~SubscribeAttributeFanControlAirflowDirection() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AirflowDirection::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAirflowDirectionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AirflowDirection response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadFanControlGeneratedCommandList : public ReadAttribute { -public: - ReadFanControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadFanControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeFanControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadFanControlAcceptedCommandList : public ReadAttribute { -public: - ReadFanControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadFanControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeFanControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadFanControlEventList : public ReadAttribute { -public: - ReadFanControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadFanControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeFanControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadFanControlAttributeList : public ReadAttribute { -public: - ReadFanControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadFanControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeFanControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeFanControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadFanControlFeatureMap : public ReadAttribute { -public: - ReadFanControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadFanControlFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeFanControlFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeFanControlFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadFanControlClusterRevision : public ReadAttribute { -public: - ReadFanControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadFanControlClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FanControl ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeFanControlClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeFanControlClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FanControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FanControl::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute TemperatureDisplayMode - */ -class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : ReadAttribute("temperature-display-mode") - { - } - - ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : WriteAttribute("temperature-display-mode") - { - AddArgument("attr-name", "temperature-display-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureDisplayModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : SubscribeAttribute("temperature-display-mode") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeTemperatureDisplayModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute KeypadLockout - */ -class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationKeypadLockout() - : ReadAttribute("keypad-lockout") - { - } - - ~ReadThermostatUserInterfaceConfigurationKeypadLockout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationKeypadLockout() - : WriteAttribute("keypad-lockout") - { - AddArgument("attr-name", "keypad-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationKeypadLockout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeKeypadLockoutWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() - : SubscribeAttribute("keypad-lockout") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeKeypadLockoutWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ScheduleProgrammingVisibility - */ -class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : ReadAttribute("schedule-programming-visibility") - { - } - - ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : WriteAttribute("schedule-programming-visibility") - { - AddArgument("attr-name", "schedule-programming-visibility"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : SubscribeAttribute("schedule-programming-visibility") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadThermostatUserInterfaceConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadThermostatUserInterfaceConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { -public: - ReadThermostatUserInterfaceConfigurationClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadThermostatUserInterfaceConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command MoveToHue - */ -class ColorControlMoveToHue : public ClusterCommand { -public: - ColorControlMoveToHue() - : ClusterCommand("move-to-hue") - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; -}; - -/* - * Command MoveHue - */ -class ColorControlMoveHue : public ClusterCommand { -public: - ColorControlMoveHue() - : ClusterCommand("move-hue") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; -}; - -/* - * Command StepHue - */ -class ColorControlStepHue : public ClusterCommand { -public: - ColorControlStepHue() - : ClusterCommand("step-hue") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; -}; - -/* - * Command MoveToSaturation - */ -class ColorControlMoveToSaturation : public ClusterCommand { -public: - ColorControlMoveToSaturation() - : ClusterCommand("move-to-saturation") - { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToSaturationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; -}; - -/* - * Command MoveSaturation - */ -class ColorControlMoveSaturation : public ClusterCommand { -public: - ColorControlMoveSaturation() - : ClusterCommand("move-saturation") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveSaturationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; -}; - -/* - * Command StepSaturation - */ -class ColorControlStepSaturation : public ClusterCommand { -public: - ColorControlStepSaturation() - : ClusterCommand("step-saturation") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepSaturationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; -}; - -/* - * Command MoveToHueAndSaturation - */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand { -public: - ColorControlMoveToHueAndSaturation() - : ClusterCommand("move-to-hue-and-saturation") - { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueAndSaturationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command MoveToColor - */ -class ColorControlMoveToColor : public ClusterCommand { -public: - ColorControlMoveToColor() - : ClusterCommand("move-to-color") - { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; - params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; -}; - -/* - * Command MoveColor - */ -class ColorControlMoveColor : public ClusterCommand { -public: - ColorControlMoveColor() - : ClusterCommand("move-color") - { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rateX = [NSNumber numberWithShort:mRequest.rateX]; - params.rateY = [NSNumber numberWithShort:mRequest.rateY]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; -}; - -/* - * Command StepColor - */ -class ColorControlStepColor : public ClusterCommand { -public: - ColorControlStepColor() - : ClusterCommand("step-color") - { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepX = [NSNumber numberWithShort:mRequest.stepX]; - params.stepY = [NSNumber numberWithShort:mRequest.stepY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; -}; - -/* - * Command MoveToColorTemperature - */ -class ColorControlMoveToColorTemperature : public ClusterCommand { -public: - ColorControlMoveToColorTemperature() - : ClusterCommand("move-to-color-temperature") - { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorTemperatureWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; -}; - -/* - * Command EnhancedMoveToHue - */ -class ColorControlEnhancedMoveToHue : public ClusterCommand { -public: - ColorControlEnhancedMoveToHue() - : ClusterCommand("enhanced-move-to-hue") - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; -}; - -/* - * Command EnhancedMoveHue - */ -class ColorControlEnhancedMoveHue : public ClusterCommand { -public: - ColorControlEnhancedMoveHue() - : ClusterCommand("enhanced-move-hue") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; -}; - -/* - * Command EnhancedStepHue - */ -class ColorControlEnhancedStepHue : public ClusterCommand { -public: - ColorControlEnhancedStepHue() - : ClusterCommand("enhanced-step-hue") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedStepHueWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; -}; - -/* - * Command EnhancedMoveToHueAndSaturation - */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { -public: - ColorControlEnhancedMoveToHueAndSaturation() - : ClusterCommand("enhanced-move-to-hue-and-saturation") - { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueAndSaturationWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; -}; - -/* - * Command ColorLoopSet - */ -class ColorControlColorLoopSet : public ClusterCommand { -public: - ColorControlColorLoopSet() - : ClusterCommand("color-loop-set") - { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; - params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; - params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster colorLoopSetWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; -}; - -/* - * Command StopMoveStep - */ -class ColorControlStopMoveStep : public ClusterCommand { -public: - ColorControlStopMoveStep() - : ClusterCommand("stop-move-step") - { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMoveStepWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; -}; - -/* - * Command MoveColorTemperature - */ -class ColorControlMoveColorTemperature : public ClusterCommand { -public: - ColorControlMoveColorTemperature() - : ClusterCommand("move-color-temperature") - { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorTemperatureWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; -}; - -/* - * Command StepColorTemperature - */ -class ColorControlStepColorTemperature : public ClusterCommand { -public: - ColorControlStepColorTemperature() - : ClusterCommand("step-color-temperature") - { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorTemperatureWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; -}; - -/* - * Attribute CurrentHue - */ -class ReadColorControlCurrentHue : public ReadAttribute { -public: - ReadColorControlCurrentHue() - : ReadAttribute("current-hue") - { - } - - ~ReadColorControlCurrentHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CurrentHue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentHue() - : SubscribeAttribute("current-hue") - { - } - - ~SubscribeAttributeColorControlCurrentHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentHueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentSaturation - */ -class ReadColorControlCurrentSaturation : public ReadAttribute { -public: - ReadColorControlCurrentSaturation() - : ReadAttribute("current-saturation") - { - } - - ~ReadColorControlCurrentSaturation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CurrentSaturation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentSaturation() - : SubscribeAttribute("current-saturation") - { - } - - ~SubscribeAttributeColorControlCurrentSaturation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentSaturationWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute RemainingTime - */ -class ReadColorControlRemainingTime : public ReadAttribute { -public: - ReadColorControlRemainingTime() - : ReadAttribute("remaining-time") - { - } - - ~ReadColorControlRemainingTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl RemainingTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { -public: - SubscribeAttributeColorControlRemainingTime() - : SubscribeAttribute("remaining-time") - { - } - - ~SubscribeAttributeColorControlRemainingTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRemainingTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentX - */ -class ReadColorControlCurrentX : public ReadAttribute { -public: - ReadColorControlCurrentX() - : ReadAttribute("current-x") - { - } - - ~ReadColorControlCurrentX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CurrentX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentX() - : SubscribeAttribute("current-x") - { - } - - ~SubscribeAttributeColorControlCurrentX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentXWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CurrentY - */ -class ReadColorControlCurrentY : public ReadAttribute { -public: - ReadColorControlCurrentY() - : ReadAttribute("current-y") - { - } - - ~ReadColorControlCurrentY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CurrentY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCurrentY() - : SubscribeAttribute("current-y") - { - } - - ~SubscribeAttributeColorControlCurrentY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCurrentYWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute DriftCompensation - */ -class ReadColorControlDriftCompensation : public ReadAttribute { -public: - ReadColorControlDriftCompensation() - : ReadAttribute("drift-compensation") - { - } - - ~ReadColorControlDriftCompensation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl DriftCompensation read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { -public: - SubscribeAttributeColorControlDriftCompensation() - : SubscribeAttribute("drift-compensation") - { - } - - ~SubscribeAttributeColorControlDriftCompensation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeDriftCompensationWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CompensationText - */ -class ReadColorControlCompensationText : public ReadAttribute { -public: - ReadColorControlCompensationText() - : ReadAttribute("compensation-text") - { - } - - ~ReadColorControlCompensationText() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CompensationText read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCompensationText() - : SubscribeAttribute("compensation-text") - { - } - - ~SubscribeAttributeColorControlCompensationText() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCompensationTextWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorTemperatureMireds - */ -class ReadColorControlColorTemperatureMireds : public ReadAttribute { -public: - ReadColorControlColorTemperatureMireds() - : ReadAttribute("color-temperature-mireds") - { - } - - ~ReadColorControlColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorTemperatureMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorTemperatureMireds() - : SubscribeAttribute("color-temperature-mireds") - { - } - - ~SubscribeAttributeColorControlColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorTemperatureMiredsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorMode - */ -class ReadColorControlColorMode : public ReadAttribute { -public: - ReadColorControlColorMode() - : ReadAttribute("color-mode") - { - } - - ~ReadColorControlColorMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorMode() - : SubscribeAttribute("color-mode") - { - } - - ~SubscribeAttributeColorControlColorMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Options - */ -class ReadColorControlOptions : public ReadAttribute { -public: - ReadColorControlOptions() - : ReadAttribute("options") - { - } - - ~ReadColorControlOptions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Options read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlOptions : public WriteAttribute { -public: - WriteColorControlOptions() - : WriteAttribute("options") - { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlOptions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOptionsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl Options write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlOptions : public SubscribeAttribute { -public: - SubscribeAttributeColorControlOptions() - : SubscribeAttribute("options") - { - } - - ~SubscribeAttributeColorControlOptions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOptionsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfPrimaries - */ -class ReadColorControlNumberOfPrimaries : public ReadAttribute { -public: - ReadColorControlNumberOfPrimaries() - : ReadAttribute("number-of-primaries") - { - } - - ~ReadColorControlNumberOfPrimaries() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl NumberOfPrimaries read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { -public: - SubscribeAttributeColorControlNumberOfPrimaries() - : SubscribeAttribute("number-of-primaries") - { - } - - ~SubscribeAttributeColorControlNumberOfPrimaries() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeNumberOfPrimariesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1X - */ -class ReadColorControlPrimary1X : public ReadAttribute { -public: - ReadColorControlPrimary1X() - : ReadAttribute("primary1x") - { - } - - ~ReadColorControlPrimary1X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary1X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1X() - : SubscribeAttribute("primary1x") - { - } - - ~SubscribeAttributeColorControlPrimary1X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1Y - */ -class ReadColorControlPrimary1Y : public ReadAttribute { -public: - ReadColorControlPrimary1Y() - : ReadAttribute("primary1y") - { - } - - ~ReadColorControlPrimary1Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary1Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1Y() - : SubscribeAttribute("primary1y") - { - } - - ~SubscribeAttributeColorControlPrimary1Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary1Intensity - */ -class ReadColorControlPrimary1Intensity : public ReadAttribute { -public: - ReadColorControlPrimary1Intensity() - : ReadAttribute("primary1intensity") - { - } - - ~ReadColorControlPrimary1Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary1Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary1Intensity() - : SubscribeAttribute("primary1intensity") - { - } - - ~SubscribeAttributeColorControlPrimary1Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary1IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2X - */ -class ReadColorControlPrimary2X : public ReadAttribute { -public: - ReadColorControlPrimary2X() - : ReadAttribute("primary2x") - { - } - - ~ReadColorControlPrimary2X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary2X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2X() - : SubscribeAttribute("primary2x") - { - } - - ~SubscribeAttributeColorControlPrimary2X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2Y - */ -class ReadColorControlPrimary2Y : public ReadAttribute { -public: - ReadColorControlPrimary2Y() - : ReadAttribute("primary2y") - { - } - - ~ReadColorControlPrimary2Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary2Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2Y() - : SubscribeAttribute("primary2y") - { - } - - ~SubscribeAttributeColorControlPrimary2Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary2Intensity - */ -class ReadColorControlPrimary2Intensity : public ReadAttribute { -public: - ReadColorControlPrimary2Intensity() - : ReadAttribute("primary2intensity") - { - } - - ~ReadColorControlPrimary2Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary2Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary2Intensity() - : SubscribeAttribute("primary2intensity") - { - } - - ~SubscribeAttributeColorControlPrimary2Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary2IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3X - */ -class ReadColorControlPrimary3X : public ReadAttribute { -public: - ReadColorControlPrimary3X() - : ReadAttribute("primary3x") - { - } - - ~ReadColorControlPrimary3X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary3X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3X() - : SubscribeAttribute("primary3x") - { - } - - ~SubscribeAttributeColorControlPrimary3X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3Y - */ -class ReadColorControlPrimary3Y : public ReadAttribute { -public: - ReadColorControlPrimary3Y() - : ReadAttribute("primary3y") - { - } - - ~ReadColorControlPrimary3Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary3Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3Y() - : SubscribeAttribute("primary3y") - { - } - - ~SubscribeAttributeColorControlPrimary3Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary3Intensity - */ -class ReadColorControlPrimary3Intensity : public ReadAttribute { -public: - ReadColorControlPrimary3Intensity() - : ReadAttribute("primary3intensity") - { - } - - ~ReadColorControlPrimary3Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary3Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary3Intensity() - : SubscribeAttribute("primary3intensity") - { - } - - ~SubscribeAttributeColorControlPrimary3Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary3IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4X - */ -class ReadColorControlPrimary4X : public ReadAttribute { -public: - ReadColorControlPrimary4X() - : ReadAttribute("primary4x") - { - } - - ~ReadColorControlPrimary4X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary4X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4X() - : SubscribeAttribute("primary4x") - { - } - - ~SubscribeAttributeColorControlPrimary4X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4Y - */ -class ReadColorControlPrimary4Y : public ReadAttribute { -public: - ReadColorControlPrimary4Y() - : ReadAttribute("primary4y") - { - } - - ~ReadColorControlPrimary4Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary4Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4Y() - : SubscribeAttribute("primary4y") - { - } - - ~SubscribeAttributeColorControlPrimary4Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary4Intensity - */ -class ReadColorControlPrimary4Intensity : public ReadAttribute { -public: - ReadColorControlPrimary4Intensity() - : ReadAttribute("primary4intensity") - { - } - - ~ReadColorControlPrimary4Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary4Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary4Intensity() - : SubscribeAttribute("primary4intensity") - { - } - - ~SubscribeAttributeColorControlPrimary4Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary4IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5X - */ -class ReadColorControlPrimary5X : public ReadAttribute { -public: - ReadColorControlPrimary5X() - : ReadAttribute("primary5x") - { - } - - ~ReadColorControlPrimary5X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary5X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5X() - : SubscribeAttribute("primary5x") - { - } - - ~SubscribeAttributeColorControlPrimary5X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5Y - */ -class ReadColorControlPrimary5Y : public ReadAttribute { -public: - ReadColorControlPrimary5Y() - : ReadAttribute("primary5y") - { - } - - ~ReadColorControlPrimary5Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary5Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5Y() - : SubscribeAttribute("primary5y") - { - } - - ~SubscribeAttributeColorControlPrimary5Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary5Intensity - */ -class ReadColorControlPrimary5Intensity : public ReadAttribute { -public: - ReadColorControlPrimary5Intensity() - : ReadAttribute("primary5intensity") - { - } - - ~ReadColorControlPrimary5Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary5Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary5Intensity() - : SubscribeAttribute("primary5intensity") - { - } - - ~SubscribeAttributeColorControlPrimary5Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary5IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6X - */ -class ReadColorControlPrimary6X : public ReadAttribute { -public: - ReadColorControlPrimary6X() - : ReadAttribute("primary6x") - { - } - - ~ReadColorControlPrimary6X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary6X read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6X() - : SubscribeAttribute("primary6x") - { - } - - ~SubscribeAttributeColorControlPrimary6X() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6XWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6Y - */ -class ReadColorControlPrimary6Y : public ReadAttribute { -public: - ReadColorControlPrimary6Y() - : ReadAttribute("primary6y") - { - } - - ~ReadColorControlPrimary6Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary6Y read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6Y() - : SubscribeAttribute("primary6y") - { - } - - ~SubscribeAttributeColorControlPrimary6Y() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6YWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Primary6Intensity - */ -class ReadColorControlPrimary6Intensity : public ReadAttribute { -public: - ReadColorControlPrimary6Intensity() - : ReadAttribute("primary6intensity") - { - } - - ~ReadColorControlPrimary6Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl Primary6Intensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlPrimary6Intensity() - : SubscribeAttribute("primary6intensity") - { - } - - ~SubscribeAttributeColorControlPrimary6Intensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePrimary6IntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WhitePointX - */ -class ReadColorControlWhitePointX : public ReadAttribute { -public: - ReadColorControlWhitePointX() - : ReadAttribute("white-point-x") - { - } - - ~ReadColorControlWhitePointX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl WhitePointX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlWhitePointX : public WriteAttribute { -public: - WriteColorControlWhitePointX() - : WriteAttribute("white-point-x") - { - AddArgument("attr-name", "white-point-x"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeWhitePointXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlWhitePointX() - : SubscribeAttribute("white-point-x") - { - } - - ~SubscribeAttributeColorControlWhitePointX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWhitePointXWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute WhitePointY - */ -class ReadColorControlWhitePointY : public ReadAttribute { -public: - ReadColorControlWhitePointY() - : ReadAttribute("white-point-y") - { - } - - ~ReadColorControlWhitePointY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl WhitePointY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlWhitePointY : public WriteAttribute { -public: - WriteColorControlWhitePointY() - : WriteAttribute("white-point-y") - { - AddArgument("attr-name", "white-point-y"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlWhitePointY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeWhitePointYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlWhitePointY() - : SubscribeAttribute("white-point-y") - { - } - - ~SubscribeAttributeColorControlWhitePointY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeWhitePointYWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRX - */ -class ReadColorControlColorPointRX : public ReadAttribute { -public: - ReadColorControlColorPointRX() - : ReadAttribute("color-point-rx") - { - } - - ~ReadColorControlColorPointRX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointRX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRX : public WriteAttribute { -public: - WriteColorControlColorPointRX() - : WriteAttribute("color-point-rx") - { - AddArgument("attr-name", "color-point-rx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRX() - : SubscribeAttribute("color-point-rx") - { - } - - ~SubscribeAttributeColorControlColorPointRX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointRXWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRY - */ -class ReadColorControlColorPointRY : public ReadAttribute { -public: - ReadColorControlColorPointRY() - : ReadAttribute("color-point-ry") - { - } - - ~ReadColorControlColorPointRY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointRY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRY : public WriteAttribute { -public: - WriteColorControlColorPointRY() - : WriteAttribute("color-point-ry") - { - AddArgument("attr-name", "color-point-ry"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointRYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRY() - : SubscribeAttribute("color-point-ry") - { - } - - ~SubscribeAttributeColorControlColorPointRY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointRYWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointRIntensity - */ -class ReadColorControlColorPointRIntensity : public ReadAttribute { -public: - ReadColorControlColorPointRIntensity() - : ReadAttribute("color-point-rintensity") - { - } - - ~ReadColorControlColorPointRIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointRIntensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointRIntensity : public WriteAttribute { -public: - WriteColorControlColorPointRIntensity() - : WriteAttribute("color-point-rintensity") - { - AddArgument("attr-name", "color-point-rintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointRIntensity() - : SubscribeAttribute("color-point-rintensity") - { - } - - ~SubscribeAttributeColorControlColorPointRIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointRIntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGX - */ -class ReadColorControlColorPointGX : public ReadAttribute { -public: - ReadColorControlColorPointGX() - : ReadAttribute("color-point-gx") - { - } - - ~ReadColorControlColorPointGX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointGX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGX : public WriteAttribute { -public: - WriteColorControlColorPointGX() - : WriteAttribute("color-point-gx") - { - AddArgument("attr-name", "color-point-gx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointGXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGX() - : SubscribeAttribute("color-point-gx") - { - } - - ~SubscribeAttributeColorControlColorPointGX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointGXWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGY - */ -class ReadColorControlColorPointGY : public ReadAttribute { -public: - ReadColorControlColorPointGY() - : ReadAttribute("color-point-gy") - { - } - - ~ReadColorControlColorPointGY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointGY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGY : public WriteAttribute { -public: - WriteColorControlColorPointGY() - : WriteAttribute("color-point-gy") - { - AddArgument("attr-name", "color-point-gy"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointGYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGY() - : SubscribeAttribute("color-point-gy") - { - } - - ~SubscribeAttributeColorControlColorPointGY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointGYWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointGIntensity - */ -class ReadColorControlColorPointGIntensity : public ReadAttribute { -public: - ReadColorControlColorPointGIntensity() - : ReadAttribute("color-point-gintensity") - { - } - - ~ReadColorControlColorPointGIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointGIntensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointGIntensity : public WriteAttribute { -public: - WriteColorControlColorPointGIntensity() - : WriteAttribute("color-point-gintensity") - { - AddArgument("attr-name", "color-point-gintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointGIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointGIntensity() - : SubscribeAttribute("color-point-gintensity") - { - } - - ~SubscribeAttributeColorControlColorPointGIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointGIntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointBX - */ -class ReadColorControlColorPointBX : public ReadAttribute { -public: - ReadColorControlColorPointBX() - : ReadAttribute("color-point-bx") - { - } - - ~ReadColorControlColorPointBX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointBX read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointBX : public WriteAttribute { -public: - WriteColorControlColorPointBX() - : WriteAttribute("color-point-bx") - { - AddArgument("attr-name", "color-point-bx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointBXWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointBX() - : SubscribeAttribute("color-point-bx") - { - } - - ~SubscribeAttributeColorControlColorPointBX() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointBXWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointBY - */ -class ReadColorControlColorPointBY : public ReadAttribute { -public: - ReadColorControlColorPointBY() - : ReadAttribute("color-point-by") - { - } - - ~ReadColorControlColorPointBY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointBY read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointBY : public WriteAttribute { -public: - WriteColorControlColorPointBY() - : WriteAttribute("color-point-by") - { - AddArgument("attr-name", "color-point-by"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeColorPointBYWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointBY() - : SubscribeAttribute("color-point-by") - { - } - - ~SubscribeAttributeColorControlColorPointBY() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointBYWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorPointBIntensity - */ -class ReadColorControlColorPointBIntensity : public ReadAttribute { -public: - ReadColorControlColorPointBIntensity() - : ReadAttribute("color-point-bintensity") - { - } - - ~ReadColorControlColorPointBIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorPointBIntensity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlColorPointBIntensity : public WriteAttribute { -public: - WriteColorControlColorPointBIntensity() - : WriteAttribute("color-point-bintensity") - { - AddArgument("attr-name", "color-point-bintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointBIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorPointBIntensity() - : SubscribeAttribute("color-point-bintensity") - { - } - - ~SubscribeAttributeColorControlColorPointBIntensity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorPointBIntensityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnhancedCurrentHue - */ -class ReadColorControlEnhancedCurrentHue : public ReadAttribute { -public: - ReadColorControlEnhancedCurrentHue() - : ReadAttribute("enhanced-current-hue") - { - } - - ~ReadColorControlEnhancedCurrentHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl EnhancedCurrentHue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { -public: - SubscribeAttributeColorControlEnhancedCurrentHue() - : SubscribeAttribute("enhanced-current-hue") - { - } - - ~SubscribeAttributeColorControlEnhancedCurrentHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnhancedCurrentHueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EnhancedColorMode - */ -class ReadColorControlEnhancedColorMode : public ReadAttribute { -public: - ReadColorControlEnhancedColorMode() - : ReadAttribute("enhanced-color-mode") - { - } - - ~ReadColorControlEnhancedColorMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl EnhancedColorMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { -public: - SubscribeAttributeColorControlEnhancedColorMode() - : SubscribeAttribute("enhanced-color-mode") - { - } - - ~SubscribeAttributeColorControlEnhancedColorMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEnhancedColorModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorLoopActive - */ -class ReadColorControlColorLoopActive : public ReadAttribute { -public: - ReadColorControlColorLoopActive() - : ReadAttribute("color-loop-active") - { - } - - ~ReadColorControlColorLoopActive() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorLoopActive read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorLoopActive() - : SubscribeAttribute("color-loop-active") - { - } - - ~SubscribeAttributeColorControlColorLoopActive() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopActiveWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorLoopDirection - */ -class ReadColorControlColorLoopDirection : public ReadAttribute { -public: - ReadColorControlColorLoopDirection() - : ReadAttribute("color-loop-direction") - { - } - - ~ReadColorControlColorLoopDirection() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorLoopDirection read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorLoopDirection() - : SubscribeAttribute("color-loop-direction") - { - } - - ~SubscribeAttributeColorControlColorLoopDirection() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopDirectionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorLoopTime - */ -class ReadColorControlColorLoopTime : public ReadAttribute { -public: - ReadColorControlColorLoopTime() - : ReadAttribute("color-loop-time") - { - } - - ~ReadColorControlColorLoopTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorLoopTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorLoopTime() - : SubscribeAttribute("color-loop-time") - { - } - - ~SubscribeAttributeColorControlColorLoopTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorLoopStartEnhancedHue - */ -class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { -public: - ReadColorControlColorLoopStartEnhancedHue() - : ReadAttribute("color-loop-start-enhanced-hue") - { - } - - ~ReadColorControlColorLoopStartEnhancedHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorLoopStartEnhancedHue() - : SubscribeAttribute("color-loop-start-enhanced-hue") - { - } - - ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorLoopStoredEnhancedHue - */ -class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { -public: - ReadColorControlColorLoopStoredEnhancedHue() - : ReadAttribute("color-loop-stored-enhanced-hue") - { - } - - ~ReadColorControlColorLoopStoredEnhancedHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorLoopStoredEnhancedHue() - : SubscribeAttribute("color-loop-stored-enhanced-hue") - { - } - - ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorCapabilities - */ -class ReadColorControlColorCapabilities : public ReadAttribute { -public: - ReadColorControlColorCapabilities() - : ReadAttribute("color-capabilities") - { - } - - ~ReadColorControlColorCapabilities() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorCapabilities read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorCapabilities() - : SubscribeAttribute("color-capabilities") - { - } - - ~SubscribeAttributeColorControlColorCapabilities() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorCapabilitiesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorTempPhysicalMinMireds - */ -class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { -public: - ReadColorControlColorTempPhysicalMinMireds() - : ReadAttribute("color-temp-physical-min-mireds") - { - } - - ~ReadColorControlColorTempPhysicalMinMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorTempPhysicalMinMireds() - : SubscribeAttribute("color-temp-physical-min-mireds") - { - } - - ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ColorTempPhysicalMaxMireds - */ -class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { -public: - ReadColorControlColorTempPhysicalMaxMireds() - : ReadAttribute("color-temp-physical-max-mireds") - { - } - - ~ReadColorControlColorTempPhysicalMaxMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlColorTempPhysicalMaxMireds() - : SubscribeAttribute("color-temp-physical-max-mireds") - { - } - - ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute CoupleColorTempToLevelMinMireds - */ -class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { -public: - ReadColorControlCoupleColorTempToLevelMinMireds() - : ReadAttribute("couple-color-temp-to-level-min-mireds") - { - } - - ~ReadColorControlCoupleColorTempToLevelMinMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() - : SubscribeAttribute("couple-color-temp-to-level-min-mireds") - { - } - - ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute StartUpColorTemperatureMireds - */ -class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { -public: - ReadColorControlStartUpColorTemperatureMireds() - : ReadAttribute("start-up-color-temperature-mireds") - { - } - - ~ReadColorControlStartUpColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { -public: - WriteColorControlStartUpColorTemperatureMireds() - : WriteAttribute("start-up-color-temperature-mireds") - { - AddArgument("attr-name", "start-up-color-temperature-mireds"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlStartUpColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedShort:mValue.Value()]; - } - - [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { -public: - SubscribeAttributeColorControlStartUpColorTemperatureMireds() - : SubscribeAttribute("start-up-color-temperature-mireds") - { - } - - ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadColorControlGeneratedCommandList : public ReadAttribute { -public: - ReadColorControlGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadColorControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeColorControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeColorControlGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadColorControlAcceptedCommandList : public ReadAttribute { -public: - ReadColorControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadColorControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeColorControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeColorControlAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadColorControlEventList : public ReadAttribute { -public: - ReadColorControlEventList() - : ReadAttribute("event-list") - { - } - - ~ReadColorControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlEventList : public SubscribeAttribute { -public: - SubscribeAttributeColorControlEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeColorControlEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadColorControlAttributeList : public ReadAttribute { -public: - ReadColorControlAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadColorControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeColorControlAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeColorControlAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadColorControlFeatureMap : public ReadAttribute { -public: - ReadColorControlFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadColorControlFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeColorControlFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeColorControlFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadColorControlClusterRevision : public ReadAttribute { -public: - ReadColorControlClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadColorControlClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ColorControl ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeColorControlClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeColorControlClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute PhysicalMinLevel - */ -class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { -public: - ReadBallastConfigurationPhysicalMinLevel() - : ReadAttribute("physical-min-level") - { - } - - ~ReadBallastConfigurationPhysicalMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationPhysicalMinLevel() - : SubscribeAttribute("physical-min-level") - { - } - - ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalMinLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalMaxLevel - */ -class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { -public: - ReadBallastConfigurationPhysicalMaxLevel() - : ReadAttribute("physical-max-level") - { - } - - ~ReadBallastConfigurationPhysicalMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationPhysicalMaxLevel() - : SubscribeAttribute("physical-max-level") - { - } - - ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalMaxLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BallastStatus - */ -class ReadBallastConfigurationBallastStatus : public ReadAttribute { -public: - ReadBallastConfigurationBallastStatus() - : ReadAttribute("ballast-status") - { - } - - ~ReadBallastConfigurationBallastStatus() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration BallastStatus read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationBallastStatus() - : SubscribeAttribute("ballast-status") - { - } - - ~SubscribeAttributeBallastConfigurationBallastStatus() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeBallastStatusWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinLevel - */ -class ReadBallastConfigurationMinLevel : public ReadAttribute { -public: - ReadBallastConfigurationMinLevel() - : ReadAttribute("min-level") - { - } - - ~ReadBallastConfigurationMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration MinLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationMinLevel : public WriteAttribute { -public: - WriteBallastConfigurationMinLevel() - : WriteAttribute("min-level") - { - AddArgument("attr-name", "min-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMinLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationMinLevel() - : SubscribeAttribute("min-level") - { - } - - ~SubscribeAttributeBallastConfigurationMinLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxLevel - */ -class ReadBallastConfigurationMaxLevel : public ReadAttribute { -public: - ReadBallastConfigurationMaxLevel() - : ReadAttribute("max-level") - { - } - - ~ReadBallastConfigurationMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration MaxLevel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationMaxLevel : public WriteAttribute { -public: - WriteBallastConfigurationMaxLevel() - : WriteAttribute("max-level") - { - AddArgument("attr-name", "max-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMaxLevelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationMaxLevel() - : SubscribeAttribute("max-level") - { - } - - ~SubscribeAttributeBallastConfigurationMaxLevel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxLevelWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute IntrinsicBallastFactor - */ -class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { -public: - ReadBallastConfigurationIntrinsicBallastFactor() - : ReadAttribute("intrinsic-ballast-factor") - { - } - - ~ReadBallastConfigurationIntrinsicBallastFactor() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { -public: - WriteBallastConfigurationIntrinsicBallastFactor() - : WriteAttribute("intrinsic-ballast-factor") - { - AddArgument("attr-name", "intrinsic-ballast-factor"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationIntrinsicBallastFactor() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() - : SubscribeAttribute("intrinsic-ballast-factor") - { - } - - ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute BallastFactorAdjustment - */ -class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { -public: - ReadBallastConfigurationBallastFactorAdjustment() - : ReadAttribute("ballast-factor-adjustment") - { - } - - ~ReadBallastConfigurationBallastFactorAdjustment() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { -public: - WriteBallastConfigurationBallastFactorAdjustment() - : WriteAttribute("ballast-factor-adjustment") - { - AddArgument("attr-name", "ballast-factor-adjustment"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationBallastFactorAdjustment() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedChar:mValue.Value()]; - } - - [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationBallastFactorAdjustment() - : SubscribeAttribute("ballast-factor-adjustment") - { - } - - ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampQuantity - */ -class ReadBallastConfigurationLampQuantity : public ReadAttribute { -public: - ReadBallastConfigurationLampQuantity() - : ReadAttribute("lamp-quantity") - { - } - - ~ReadBallastConfigurationLampQuantity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampQuantity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampQuantity() - : SubscribeAttribute("lamp-quantity") - { - } - - ~SubscribeAttributeBallastConfigurationLampQuantity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampQuantityWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampType - */ -class ReadBallastConfigurationLampType : public ReadAttribute { -public: - ReadBallastConfigurationLampType() - : ReadAttribute("lamp-type") - { - } - - ~ReadBallastConfigurationLampType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampType : public WriteAttribute { -public: - WriteBallastConfigurationLampType() - : WriteAttribute("lamp-type") - { - AddArgument("attr-name", "lamp-type"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampType() - : SubscribeAttribute("lamp-type") - { - } - - ~SubscribeAttributeBallastConfigurationLampType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampTypeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampManufacturer - */ -class ReadBallastConfigurationLampManufacturer : public ReadAttribute { -public: - ReadBallastConfigurationLampManufacturer() - : ReadAttribute("lamp-manufacturer") - { - } - - ~ReadBallastConfigurationLampManufacturer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampManufacturer read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampManufacturer : public WriteAttribute { -public: - WriteBallastConfigurationLampManufacturer() - : WriteAttribute("lamp-manufacturer") - { - AddArgument("attr-name", "lamp-manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampManufacturer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampManufacturerWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampManufacturer() - : SubscribeAttribute("lamp-manufacturer") - { - } - - ~SubscribeAttributeBallastConfigurationLampManufacturer() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampManufacturerWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampRatedHours - */ -class ReadBallastConfigurationLampRatedHours : public ReadAttribute { -public: - ReadBallastConfigurationLampRatedHours() - : ReadAttribute("lamp-rated-hours") - { - } - - ~ReadBallastConfigurationLampRatedHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampRatedHours read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampRatedHours : public WriteAttribute { -public: - WriteBallastConfigurationLampRatedHours() - : WriteAttribute("lamp-rated-hours") - { - AddArgument("attr-name", "lamp-rated-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampRatedHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampRatedHours() - : SubscribeAttribute("lamp-rated-hours") - { - } - - ~SubscribeAttributeBallastConfigurationLampRatedHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampRatedHoursWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampBurnHours - */ -class ReadBallastConfigurationLampBurnHours : public ReadAttribute { -public: - ReadBallastConfigurationLampBurnHours() - : ReadAttribute("lamp-burn-hours") - { - } - - ~ReadBallastConfigurationLampBurnHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampBurnHours read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampBurnHours : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHours() - : WriteAttribute("lamp-burn-hours") - { - AddArgument("attr-name", "lamp-burn-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampBurnHours() - : SubscribeAttribute("lamp-burn-hours") - { - } - - ~SubscribeAttributeBallastConfigurationLampBurnHours() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampBurnHoursWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampAlarmMode - */ -class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { -public: - ReadBallastConfigurationLampAlarmMode() - : ReadAttribute("lamp-alarm-mode") - { - } - - ~ReadBallastConfigurationLampAlarmMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampAlarmMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { -public: - WriteBallastConfigurationLampAlarmMode() - : WriteAttribute("lamp-alarm-mode") - { - AddArgument("attr-name", "lamp-alarm-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampAlarmMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLampAlarmModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampAlarmMode() - : SubscribeAttribute("lamp-alarm-mode") - { - } - - ~SubscribeAttributeBallastConfigurationLampAlarmMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampAlarmModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LampBurnHoursTripPoint - */ -class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { -public: - ReadBallastConfigurationLampBurnHoursTripPoint() - : ReadAttribute("lamp-burn-hours-trip-point") - { - } - - ~ReadBallastConfigurationLampBurnHoursTripPoint() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHoursTripPoint() - : WriteAttribute("lamp-burn-hours-trip-point") - { - AddArgument("attr-name", "lamp-burn-hours-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHoursTripPoint() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [NSNumber numberWithUnsignedInt:mValue.Value()]; - } - - [cluster writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::Nullable mValue; -}; - -class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() - : SubscribeAttribute("lamp-burn-hours-trip-point") - { - } - - ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { -public: - ReadBallastConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadBallastConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeBallastConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { -public: - ReadBallastConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadBallastConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeBallastConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadBallastConfigurationEventList : public ReadAttribute { -public: - ReadBallastConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBallastConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBallastConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadBallastConfigurationAttributeList : public ReadAttribute { -public: - ReadBallastConfigurationAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadBallastConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeBallastConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadBallastConfigurationFeatureMap : public ReadAttribute { -public: - ReadBallastConfigurationFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadBallastConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeBallastConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadBallastConfigurationClusterRevision : public ReadAttribute { -public: - ReadBallastConfigurationClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadBallastConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BallastConfiguration ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeBallastConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { -public: - ReadIlluminanceMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadIlluminanceMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadIlluminanceMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadIlluminanceMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadIlluminanceMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadIlluminanceMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Tolerance - */ -class ReadIlluminanceMeasurementTolerance : public ReadAttribute { -public: - ReadIlluminanceMeasurementTolerance() - : ReadAttribute("tolerance") - { - } - - ~ReadIlluminanceMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement Tolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementTolerance() - : SubscribeAttribute("tolerance") - { - } - - ~SubscribeAttributeIlluminanceMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute LightSensorType - */ -class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { -public: - ReadIlluminanceMeasurementLightSensorType() - : ReadAttribute("light-sensor-type") - { - } - - ~ReadIlluminanceMeasurementLightSensorType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement LightSensorType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementLightSensorType() - : SubscribeAttribute("light-sensor-type") - { - } - - ~SubscribeAttributeIlluminanceMeasurementLightSensorType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeLightSensorTypeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadIlluminanceMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadIlluminanceMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { -public: - ReadIlluminanceMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadIlluminanceMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadIlluminanceMeasurementEventList : public ReadAttribute { -public: - ReadIlluminanceMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadIlluminanceMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeIlluminanceMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { -public: - ReadIlluminanceMeasurementAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadIlluminanceMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeIlluminanceMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { -public: - ReadIlluminanceMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadIlluminanceMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeIlluminanceMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { -public: - ReadIlluminanceMeasurementClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadIlluminanceMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeIlluminanceMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeIlluminanceMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { -public: - ReadTemperatureMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadTemperatureMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributeTemperatureMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadTemperatureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadTemperatureMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadTemperatureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadTemperatureMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Tolerance - */ -class ReadTemperatureMeasurementTolerance : public ReadAttribute { -public: - ReadTemperatureMeasurementTolerance() - : ReadAttribute("tolerance") - { - } - - ~ReadTemperatureMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement Tolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementTolerance() - : SubscribeAttribute("tolerance") - { - } - - ~SubscribeAttributeTemperatureMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadTemperatureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadTemperatureMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { -public: - ReadTemperatureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadTemperatureMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadTemperatureMeasurementEventList : public ReadAttribute { -public: - ReadTemperatureMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadTemperatureMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeTemperatureMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadTemperatureMeasurementAttributeList : public ReadAttribute { -public: - ReadTemperatureMeasurementAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadTemperatureMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeTemperatureMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { -public: - ReadTemperatureMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadTemperatureMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeTemperatureMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { -public: - ReadTemperatureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadTemperatureMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TemperatureMeasurement ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeTemperatureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeTemperatureMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadPressureMeasurementMeasuredValue : public ReadAttribute { -public: - ReadPressureMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadPressureMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributePressureMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadPressureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadPressureMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributePressureMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadPressureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadPressureMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributePressureMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Tolerance - */ -class ReadPressureMeasurementTolerance : public ReadAttribute { -public: - ReadPressureMeasurementTolerance() - : ReadAttribute("tolerance") - { - } - - ~ReadPressureMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement Tolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementTolerance() - : SubscribeAttribute("tolerance") - { - } - - ~SubscribeAttributePressureMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ScaledValue - */ -class ReadPressureMeasurementScaledValue : public ReadAttribute { -public: - ReadPressureMeasurementScaledValue() - : ReadAttribute("scaled-value") - { - } - - ~ReadPressureMeasurementScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement ScaledValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementScaledValue() - : SubscribeAttribute("scaled-value") - { - } - - ~SubscribeAttributePressureMeasurementScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeScaledValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinScaledValue - */ -class ReadPressureMeasurementMinScaledValue : public ReadAttribute { -public: - ReadPressureMeasurementMinScaledValue() - : ReadAttribute("min-scaled-value") - { - } - - ~ReadPressureMeasurementMinScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement MinScaledValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementMinScaledValue() - : SubscribeAttribute("min-scaled-value") - { - } - - ~SubscribeAttributePressureMeasurementMinScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinScaledValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxScaledValue - */ -class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { -public: - ReadPressureMeasurementMaxScaledValue() - : ReadAttribute("max-scaled-value") - { - } - - ~ReadPressureMeasurementMaxScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement MaxScaledValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementMaxScaledValue() - : SubscribeAttribute("max-scaled-value") - { - } - - ~SubscribeAttributePressureMeasurementMaxScaledValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxScaledValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ScaledTolerance - */ -class ReadPressureMeasurementScaledTolerance : public ReadAttribute { -public: - ReadPressureMeasurementScaledTolerance() - : ReadAttribute("scaled-tolerance") - { - } - - ~ReadPressureMeasurementScaledTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement ScaledTolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementScaledTolerance() - : SubscribeAttribute("scaled-tolerance") - { - } - - ~SubscribeAttributePressureMeasurementScaledTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeScaledToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Scale - */ -class ReadPressureMeasurementScale : public ReadAttribute { -public: - ReadPressureMeasurementScale() - : ReadAttribute("scale") - { - } - - ~ReadPressureMeasurementScale() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement Scale read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementScale() - : SubscribeAttribute("scale") - { - } - - ~SubscribeAttributePressureMeasurementScale() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeScaleWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadPressureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadPressureMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributePressureMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { -public: - ReadPressureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadPressureMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributePressureMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadPressureMeasurementEventList : public ReadAttribute { -public: - ReadPressureMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadPressureMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributePressureMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadPressureMeasurementAttributeList : public ReadAttribute { -public: - ReadPressureMeasurementAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadPressureMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributePressureMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadPressureMeasurementFeatureMap : public ReadAttribute { -public: - ReadPressureMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadPressureMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributePressureMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadPressureMeasurementClusterRevision : public ReadAttribute { -public: - ReadPressureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadPressureMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PressureMeasurement ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributePressureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributePressureMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadFlowMeasurementMeasuredValue : public ReadAttribute { -public: - ReadFlowMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadFlowMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributeFlowMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadFlowMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadFlowMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributeFlowMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadFlowMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadFlowMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Tolerance - */ -class ReadFlowMeasurementTolerance : public ReadAttribute { -public: - ReadFlowMeasurementTolerance() - : ReadAttribute("tolerance") - { - } - - ~ReadFlowMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement Tolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementTolerance() - : SubscribeAttribute("tolerance") - { - } - - ~SubscribeAttributeFlowMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadFlowMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadFlowMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeFlowMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { -public: - ReadFlowMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadFlowMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeFlowMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadFlowMeasurementEventList : public ReadAttribute { -public: - ReadFlowMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadFlowMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeFlowMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadFlowMeasurementAttributeList : public ReadAttribute { -public: - ReadFlowMeasurementAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadFlowMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeFlowMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadFlowMeasurementFeatureMap : public ReadAttribute { -public: - ReadFlowMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadFlowMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeFlowMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadFlowMeasurementClusterRevision : public ReadAttribute { -public: - ReadFlowMeasurementClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadFlowMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("FlowMeasurement ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeFlowMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeFlowMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute MeasuredValue - */ -class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementMeasuredValue() - : ReadAttribute("measured-value") - { - } - - ~ReadRelativeHumidityMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MinMeasuredValue - */ -class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") - { - } - - ~ReadRelativeHumidityMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMinMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxMeasuredValue - */ -class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") - { - } - - ~ReadRelativeHumidityMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute Tolerance - */ -class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementTolerance() - : ReadAttribute("tolerance") - { - } - - ~ReadRelativeHumidityMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementTolerance() - : SubscribeAttribute("tolerance") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementTolerance() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeToleranceWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadRelativeHumidityMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadRelativeHumidityMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementEventList() - : ReadAttribute("event-list") - { - } - - ~ReadRelativeHumidityMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadRelativeHumidityMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadRelativeHumidityMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { -public: - ReadRelativeHumidityMeasurementClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadRelativeHumidityMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeRelativeHumidityMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * HoldTime | 0x0003 | -| * HoldTimeLimits | 0x0004 | -| * PIROccupiedToUnoccupiedDelay | 0x0010 | -| * PIRUnoccupiedToOccupiedDelay | 0x0011 | -| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * OccupancyChanged | 0x0000 | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute Occupancy - */ -class ReadOccupancySensingOccupancy : public ReadAttribute { -public: - ReadOccupancySensingOccupancy() - : ReadAttribute("occupancy") - { - } - - ~ReadOccupancySensingOccupancy() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing Occupancy read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingOccupancy() - : SubscribeAttribute("occupancy") - { - } - - ~SubscribeAttributeOccupancySensingOccupancy() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupancyWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupancySensorType - */ -class ReadOccupancySensingOccupancySensorType : public ReadAttribute { -public: - ReadOccupancySensingOccupancySensorType() - : ReadAttribute("occupancy-sensor-type") - { - } - - ~ReadOccupancySensingOccupancySensorType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing OccupancySensorType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingOccupancySensorType() - : SubscribeAttribute("occupancy-sensor-type") - { - } - - ~SubscribeAttributeOccupancySensingOccupancySensorType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupancySensorTypeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute OccupancySensorTypeBitmap - */ -class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { -public: - ReadOccupancySensingOccupancySensorTypeBitmap() - : ReadAttribute("occupancy-sensor-type-bitmap") - { - } - - ~ReadOccupancySensingOccupancySensorTypeBitmap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() - : SubscribeAttribute("occupancy-sensor-type-bitmap") - { - } - - ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute HoldTime - */ -class ReadOccupancySensingHoldTime : public ReadAttribute { -public: - ReadOccupancySensingHoldTime() - : ReadAttribute("hold-time") - { - } - - ~ReadOccupancySensingHoldTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHoldTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.HoldTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing HoldTime read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingHoldTime : public WriteAttribute { -public: - WriteOccupancySensingHoldTime() - : WriteAttribute("hold-time") - { - AddArgument("attr-name", "hold-time"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingHoldTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeHoldTimeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing HoldTime write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingHoldTime : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingHoldTime() - : SubscribeAttribute("hold-time") - { - } - - ~SubscribeAttributeOccupancySensingHoldTime() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeHoldTimeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.HoldTime response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute HoldTimeLimits - */ -class ReadOccupancySensingHoldTimeLimits : public ReadAttribute { -public: - ReadOccupancySensingHoldTimeLimits() - : ReadAttribute("hold-time-limits") - { - } - - ~ReadOccupancySensingHoldTimeLimits() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHoldTimeLimitsWithCompletion:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing HoldTimeLimits read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingHoldTimeLimits : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingHoldTimeLimits() - : SubscribeAttribute("hold-time-limits") - { - } - - ~SubscribeAttributeOccupancySensingHoldTimeLimits() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeHoldTimeLimitsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute PIROccupiedToUnoccupiedDelay - */ -class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingPIROccupiedToUnoccupiedDelay() - : ReadAttribute("piroccupied-to-unoccupied-delay") - { - } - - ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - : WriteAttribute("piroccupied-to-unoccupied-delay") - { - AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() - : SubscribeAttribute("piroccupied-to-unoccupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PIRUnoccupiedToOccupiedDelay - */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() - : ReadAttribute("pirunoccupied-to-occupied-delay") - { - } - - ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - : WriteAttribute("pirunoccupied-to-occupied-delay") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() - : SubscribeAttribute("pirunoccupied-to-occupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PIRUnoccupiedToOccupiedThreshold - */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { -public: - ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : ReadAttribute("pirunoccupied-to-occupied-threshold") - { - } - - ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : WriteAttribute("pirunoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("pirunoccupied-to-occupied-threshold") - { - } - - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UltrasonicOccupiedToUnoccupiedDelay - */ -class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - } - - ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UltrasonicUnoccupiedToOccupiedDelay - */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") - { - } - - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute UltrasonicUnoccupiedToOccupiedThreshold - */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { -public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") - { - } - - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") - { - } - - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalContactOccupiedToUnoccupiedDelay - */ -class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") - { - } - - ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalContactUnoccupiedToOccupiedDelay - */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { -public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") - { - } - - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") - { - } - - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute PhysicalContactUnoccupiedToOccupiedThreshold - */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { -public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") - { - } - - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") - { - } - - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { -public: - ReadOccupancySensingGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOccupancySensingGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeOccupancySensingGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { -public: - ReadOccupancySensingAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadOccupancySensingAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeOccupancySensingAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute EventList - */ -class ReadOccupancySensingEventList : public ReadAttribute { -public: - ReadOccupancySensingEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOccupancySensingEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOccupancySensingEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - -/* - * Attribute AttributeList - */ -class ReadOccupancySensingAttributeList : public ReadAttribute { -public: - ReadOccupancySensingAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadOccupancySensingAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OccupancySensing AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeOccupancySensingAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeOccupancySensingAttributeList() +class ColorControlStepColorTemperature : public ClusterCommand { +public: + ColorControlStepColorTemperature() + : ClusterCommand("step-color-temperature") { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorTemperatureWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /* - * Attribute FeatureMap + * Attribute CurrentHue */ -class ReadOccupancySensingFeatureMap : public ReadAttribute { +class ReadColorControlCurrentHue : public ReadAttribute { public: - ReadOccupancySensingFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlCurrentHue() + : ReadAttribute("current-hue") { } - ~ReadOccupancySensingFeatureMap() + ~ReadColorControlCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing FeatureMap read Error", error); + LogNSError("ColorControl CurrentHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -132789,25 +114834,25 @@ class ReadOccupancySensingFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlCurrentHue() + : SubscribeAttribute("current-hue") { } - ~SubscribeAttributeOccupancySensingFeatureMap() + ~SubscribeAttributeColorControlCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -132818,10 +114863,10 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.CurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -132835,34 +114880,34 @@ class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute CurrentSaturation */ -class ReadOccupancySensingClusterRevision : public ReadAttribute { +class ReadColorControlCurrentSaturation : public ReadAttribute { public: - ReadOccupancySensingClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlCurrentSaturation() + : ReadAttribute("current-saturation") { } - ~ReadOccupancySensingClusterRevision() + ~ReadColorControlCurrentSaturation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OccupancySensing ClusterRevision read Error", error); + LogNSError("ColorControl CurrentSaturation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -132871,25 +114916,25 @@ class ReadOccupancySensingClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlCurrentSaturation() + : SubscribeAttribute("current-saturation") { } - ~SubscribeAttributeOccupancySensingClusterRevision() + ~SubscribeAttributeColorControlCurrentSaturation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -132900,10 +114945,10 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCurrentSaturationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -132916,62 +114961,35 @@ class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute RemainingTime */ -class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlRemainingTime : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlRemainingTime() + : ReadAttribute("remaining-time") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() + ~ReadColorControlRemainingTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl RemainingTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -132980,25 +114998,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttri } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeColorControlRemainingTime() + : SubscribeAttribute("remaining-time") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeColorControlRemainingTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::RemainingTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133009,10 +115027,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133026,34 +115044,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : pu }; /* - * Attribute MinMeasuredValue + * Attribute CurrentX */ -class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlCurrentX : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlCurrentX() + : ReadAttribute("current-x") { } - ~ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + ~ReadColorControlCurrentX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl CurrentX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133062,25 +115080,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlCurrentX() + : SubscribeAttribute("current-x") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeColorControlCurrentX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133091,10 +115109,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeCurrentXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133108,34 +115126,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : }; /* - * Attribute MaxMeasuredValue + * Attribute CurrentY */ -class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlCurrentY : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlCurrentY() + : ReadAttribute("current-y") { } - ~ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + ~ReadColorControlCurrentY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl CurrentY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133144,25 +115162,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeColorControlCurrentY() + : SubscribeAttribute("current-y") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeColorControlCurrentY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CurrentY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133173,10 +115191,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeCurrentYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133190,34 +115208,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : }; /* - * Attribute PeakMeasuredValue + * Attribute DriftCompensation */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlDriftCompensation : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlDriftCompensation() + : ReadAttribute("drift-compensation") { } - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + ~ReadColorControlDriftCompensation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl DriftCompensation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133226,25 +115244,25 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadA } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlDriftCompensation() + : SubscribeAttribute("drift-compensation") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeColorControlDriftCompensation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::DriftCompensation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133255,10 +115273,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeDriftCompensationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133272,34 +115290,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute PeakMeasuredValueWindow + * Attribute CompensationText */ -class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlCompensationText : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlCompensationText() + : ReadAttribute("compensation-text") { } - ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadColorControlCompensationText() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl CompensationText read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133308,25 +115326,25 @@ class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlCompensationText() + : SubscribeAttribute("compensation-text") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeColorControlCompensationText() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CompensationText::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133337,10 +115355,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeCompensationTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133354,34 +115372,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueW }; /* - * Attribute AverageMeasuredValue + * Attribute ColorTemperatureMireds */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlColorTemperatureMireds : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlColorTemperatureMireds() + : ReadAttribute("color-temperature-mireds") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + ~ReadColorControlColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl ColorTemperatureMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133390,25 +115408,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public Re } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlColorTemperatureMireds() + : SubscribeAttribute("color-temperature-mireds") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeColorControlColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133419,10 +115437,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133436,34 +115454,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal }; /* - * Attribute AverageMeasuredValueWindow + * Attribute ColorMode */ -class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlColorMode : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlColorMode() + : ReadAttribute("color-mode") { } - ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadColorControlColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl ColorMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133472,25 +115490,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : pub } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeColorControlColorMode() + : SubscribeAttribute("color-mode") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeColorControlColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133501,10 +115519,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133518,34 +115536,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredVal }; /* - * Attribute Uncertainty + * Attribute Options */ -class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlOptions : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlOptions() + : ReadAttribute("options") { } - ~ReadCarbonMonoxideConcentrationMeasurementUncertainty() + ~ReadColorControlOptions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl Options read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133554,107 +115572,66 @@ class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribu } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class WriteColorControlOptions : public WriteAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + WriteColorControlOptions() + : WriteAttribute("options") { + AddArgument("attr-name", "options"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() + ~WriteColorControlOptions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeUncertaintyWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MeasurementUnit - */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { -public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") - { - } - - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); + [cluster writeAttributeOptionsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlOptions : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlOptions() + : SubscribeAttribute("options") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeColorControlOptions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Options::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133665,10 +115642,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.Options response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133682,34 +115659,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : }; /* - * Attribute MeasurementMedium + * Attribute NumberOfPrimaries */ -class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlNumberOfPrimaries : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlNumberOfPrimaries() + : ReadAttribute("number-of-primaries") { } - ~ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() + ~ReadColorControlNumberOfPrimaries() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl NumberOfPrimaries read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133718,25 +115695,25 @@ class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadA } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlNumberOfPrimaries() + : SubscribeAttribute("number-of-primaries") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeColorControlNumberOfPrimaries() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::NumberOfPrimaries::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133747,10 +115724,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeNumberOfPrimariesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133764,34 +115741,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium }; /* - * Attribute LevelValue + * Attribute Primary1X */ -class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlPrimary1X : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlPrimary1X() + : ReadAttribute("primary1x") { } - ~ReadCarbonMonoxideConcentrationMeasurementLevelValue() + ~ReadColorControlPrimary1X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl Primary1X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133800,25 +115777,25 @@ class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribut } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlPrimary1X() + : SubscribeAttribute("primary1x") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() + ~SubscribeAttributeColorControlPrimary1X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133829,10 +115806,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributePrimary1XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133846,34 +115823,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : publi }; /* - * Attribute GeneratedCommandList + * Attribute Primary1Y */ -class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlPrimary1Y : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlPrimary1Y() + : ReadAttribute("primary1y") { } - ~ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + ~ReadColorControlPrimary1Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl Primary1Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133882,25 +115859,25 @@ class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public Re } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlPrimary1Y() + : SubscribeAttribute("primary1y") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeColorControlPrimary1Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133911,10 +115888,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePrimary1YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -133928,34 +115905,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandLi }; /* - * Attribute AcceptedCommandList + * Attribute Primary1Intensity */ -class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlPrimary1Intensity : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlPrimary1Intensity() + : ReadAttribute("primary1intensity") { } - ~ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + ~ReadColorControlPrimary1Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl Primary1Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -133964,25 +115941,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public Rea } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlPrimary1Intensity() + : SubscribeAttribute("primary1intensity") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeColorControlPrimary1Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary1Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -133993,10 +115970,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePrimary1IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134009,37 +115986,35 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandLis } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute Primary2X */ -class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadColorControlPrimary2X : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadColorControlPrimary2X() + : ReadAttribute("primary2x") { } - ~ReadCarbonMonoxideConcentrationMeasurementEventList() + ~ReadColorControlPrimary2X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); + LogNSError("ColorControl Primary2X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134048,25 +116023,25 @@ class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlPrimary2X() + : SubscribeAttribute("primary2x") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() + ~SubscribeAttributeColorControlPrimary2X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134077,10 +116052,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePrimary2XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134093,37 +116068,35 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Primary2Y */ -class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlPrimary2Y : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlPrimary2Y() + : ReadAttribute("primary2y") { } - ~ReadCarbonMonoxideConcentrationMeasurementAttributeList() + ~ReadColorControlPrimary2Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl Primary2Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134132,25 +116105,25 @@ class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttri } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlPrimary2Y() + : SubscribeAttribute("primary2y") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() + ~SubscribeAttributeColorControlPrimary2Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134161,10 +116134,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePrimary2YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134178,34 +116151,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : pu }; /* - * Attribute FeatureMap + * Attribute Primary2Intensity */ -class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlPrimary2Intensity : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary2Intensity() + : ReadAttribute("primary2intensity") { } - ~ReadCarbonMonoxideConcentrationMeasurementFeatureMap() + ~ReadColorControlPrimary2Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl Primary2Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134214,25 +116187,25 @@ class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribut } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary2Intensity() + : SubscribeAttribute("primary2intensity") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() + ~SubscribeAttributeColorControlPrimary2Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary2Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134243,10 +116216,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary2IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134260,34 +116233,34 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : publi }; /* - * Attribute ClusterRevision + * Attribute Primary3X */ -class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlPrimary3X : public ReadAttribute { public: - ReadCarbonMonoxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlPrimary3X() + : ReadAttribute("primary3x") { } - ~ReadCarbonMonoxideConcentrationMeasurementClusterRevision() + ~ReadColorControlPrimary3X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl Primary3X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134296,25 +116269,25 @@ class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAtt } }; -class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { public: - SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlPrimary3X() + : SubscribeAttribute("primary3x") { } - ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() + ~SubscribeAttributeColorControlPrimary3X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134325,10 +116298,10 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePrimary3XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134341,62 +116314,35 @@ class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : } }; -/*----------------------------------------------------------------------------*\ -| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute Primary3Y */ -class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary3Y : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlPrimary3Y() + : ReadAttribute("primary3y") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasuredValue() + ~ReadColorControlPrimary3Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl Primary3Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134405,25 +116351,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttrib } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeColorControlPrimary3Y() + : SubscribeAttribute("primary3y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeColorControlPrimary3Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134434,10 +116380,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributePrimary3YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary3Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134451,34 +116397,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : pub }; /* - * Attribute MinMeasuredValue + * Attribute Primary3Intensity */ -class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary3Intensity : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlPrimary3Intensity() + : ReadAttribute("primary3intensity") { } - ~ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() + ~ReadColorControlPrimary3Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl Primary3Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134487,25 +116433,25 @@ class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAtt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlPrimary3Intensity() + : SubscribeAttribute("primary3intensity") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeColorControlPrimary3Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary3Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134516,10 +116462,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributePrimary3IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134533,34 +116479,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : }; /* - * Attribute MaxMeasuredValue + * Attribute Primary4X */ -class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary4X : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlPrimary4X() + : ReadAttribute("primary4x") { } - ~ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + ~ReadColorControlPrimary4X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl Primary4X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134569,25 +116515,25 @@ class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAtt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeColorControlPrimary4X() + : SubscribeAttribute("primary4x") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeColorControlPrimary4X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134598,10 +116544,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributePrimary4XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134615,34 +116561,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : }; /* - * Attribute PeakMeasuredValue + * Attribute Primary4Y */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary4Y : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlPrimary4Y() + : ReadAttribute("primary4y") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + ~ReadColorControlPrimary4Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl Primary4Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134651,25 +116597,25 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlPrimary4Y() + : SubscribeAttribute("primary4y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeColorControlPrimary4Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134680,10 +116626,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributePrimary4YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134697,34 +116643,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : }; /* - * Attribute PeakMeasuredValueWindow + * Attribute Primary4Intensity */ -class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlPrimary4Intensity : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlPrimary4Intensity() + : ReadAttribute("primary4intensity") { } - ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadColorControlPrimary4Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl Primary4Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134733,25 +116679,25 @@ class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlPrimary4Intensity() + : SubscribeAttribute("primary4intensity") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeColorControlPrimary4Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary4Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134762,10 +116708,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributePrimary4IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134779,34 +116725,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWi }; /* - * Attribute AverageMeasuredValue + * Attribute Primary5X */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlPrimary5X : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlPrimary5X() + : ReadAttribute("primary5x") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + ~ReadColorControlPrimary5X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl Primary5X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134815,25 +116761,25 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlPrimary5X() + : SubscribeAttribute("primary5x") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeColorControlPrimary5X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134844,10 +116790,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributePrimary5XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134861,34 +116807,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu }; /* - * Attribute AverageMeasuredValueWindow + * Attribute Primary5Y */ -class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlPrimary5Y : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlPrimary5Y() + : ReadAttribute("primary5y") { } - ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadColorControlPrimary5Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl Primary5Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134897,25 +116843,25 @@ class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : publ } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeColorControlPrimary5Y() + : SubscribeAttribute("primary5y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeColorControlPrimary5Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -134926,10 +116872,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributePrimary5YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.Primary5Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -134943,34 +116889,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValu }; /* - * Attribute Uncertainty + * Attribute Primary5Intensity */ -class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlPrimary5Intensity : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlPrimary5Intensity() + : ReadAttribute("primary5intensity") { } - ~ReadCarbonDioxideConcentrationMeasurementUncertainty() + ~ReadColorControlPrimary5Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl Primary5Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -134979,25 +116925,25 @@ class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribut } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeColorControlPrimary5Intensity() + : SubscribeAttribute("primary5intensity") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() + ~SubscribeAttributeColorControlPrimary5Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary5Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135008,10 +116954,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributePrimary5IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135025,34 +116971,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : publi }; /* - * Attribute MeasurementUnit + * Attribute Primary6X */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlPrimary6X : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlPrimary6X() + : ReadAttribute("primary6x") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() + ~ReadColorControlPrimary6X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl Primary6X read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135061,25 +117007,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlPrimary6X() + : SubscribeAttribute("primary6x") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeColorControlPrimary6X() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6X::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135090,10 +117036,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributePrimary6XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.Primary6X response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135107,34 +117053,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : p }; /* - * Attribute MeasurementMedium + * Attribute Primary6Y */ -class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlPrimary6Y : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlPrimary6Y() + : ReadAttribute("primary6y") { } - ~ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() + ~ReadColorControlPrimary6Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl Primary6Y read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135143,25 +117089,25 @@ class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAt } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlPrimary6Y() + : SubscribeAttribute("primary6y") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeColorControlPrimary6Y() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Y::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135172,10 +117118,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributePrimary6YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ColorControl.Primary6Y response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135189,34 +117135,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : }; /* - * Attribute LevelValue + * Attribute Primary6Intensity */ -class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlPrimary6Intensity : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlPrimary6Intensity() + : ReadAttribute("primary6intensity") { } - ~ReadCarbonDioxideConcentrationMeasurementLevelValue() + ~ReadColorControlPrimary6Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl Primary6Intensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135225,25 +117171,25 @@ class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlPrimary6Intensity() + : SubscribeAttribute("primary6intensity") { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() + ~SubscribeAttributeColorControlPrimary6Intensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::Primary6Intensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135254,10 +117200,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributePrimary6IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135271,34 +117217,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public }; /* - * Attribute GeneratedCommandList + * Attribute WhitePointX */ -class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlWhitePointX : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlWhitePointX() + : ReadAttribute("white-point-x") { } - ~ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() + ~ReadColorControlWhitePointX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl WhitePointX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135307,25 +117253,66 @@ class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public Rea } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteColorControlWhitePointX : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteColorControlWhitePointX() + : WriteAttribute("white-point-x") { + AddArgument("attr-name", "white-point-x"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() + ~WriteColorControlWhitePointX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointX() + : SubscribeAttribute("white-point-x") + { + } + + ~SubscribeAttributeColorControlWhitePointX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135336,10 +117323,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWhitePointXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135353,34 +117340,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandLis }; /* - * Attribute AcceptedCommandList + * Attribute WhitePointY */ -class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlWhitePointY : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlWhitePointY() + : ReadAttribute("white-point-y") { } - ~ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() + ~ReadColorControlWhitePointY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl WhitePointY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135389,25 +117376,66 @@ class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public Read } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteColorControlWhitePointY : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteColorControlWhitePointY() + : WriteAttribute("white-point-y") { + AddArgument("attr-name", "white-point-y"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() + ~WriteColorControlWhitePointY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlWhitePointY() + : SubscribeAttribute("white-point-y") + { + } + + ~SubscribeAttributeColorControlWhitePointY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::WhitePointY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135418,10 +117446,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeWhitePointYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135434,37 +117462,35 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ColorPointRX */ -class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadColorControlColorPointRX : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadColorControlColorPointRX() + : ReadAttribute("color-point-rx") { } - ~ReadCarbonDioxideConcentrationMeasurementEventList() + ~ReadColorControlColorPointRX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); + LogNSError("ColorControl ColorPointRX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135473,25 +117499,66 @@ class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class WriteColorControlColorPointRX : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + WriteColorControlColorPointRX() + : WriteAttribute("color-point-rx") { + AddArgument("attr-name", "color-point-rx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() + ~WriteColorControlColorPointRX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRX() + : SubscribeAttribute("color-point-rx") + { + } + + ~SubscribeAttributeColorControlColorPointRX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135502,10 +117569,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeColorPointRXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135518,37 +117585,35 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ColorPointRY */ -class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlColorPointRY : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlColorPointRY() + : ReadAttribute("color-point-ry") { } - ~ReadCarbonDioxideConcentrationMeasurementAttributeList() + ~ReadColorControlColorPointRY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl ColorPointRY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135557,25 +117622,66 @@ class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttrib } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class WriteColorControlColorPointRY : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + WriteColorControlColorPointRY() + : WriteAttribute("color-point-ry") + { + AddArgument("attr-name", "color-point-ry"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlColorPointRY() { } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRY() + : SubscribeAttribute("color-point-ry") + { + } + + ~SubscribeAttributeColorControlColorPointRY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135586,10 +117692,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeColorPointRYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135603,34 +117709,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : pub }; /* - * Attribute FeatureMap + * Attribute ColorPointRIntensity */ -class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlColorPointRIntensity : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlColorPointRIntensity() + : ReadAttribute("color-point-rintensity") { } - ~ReadCarbonDioxideConcentrationMeasurementFeatureMap() + ~ReadColorControlColorPointRIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl ColorPointRIntensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135639,25 +117745,69 @@ class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class WriteColorControlColorPointRIntensity : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + WriteColorControlColorPointRIntensity() + : WriteAttribute("color-point-rintensity") { + AddArgument("attr-name", "color-point-rintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() + ~WriteColorControlColorPointRIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointRIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRIntensity() + : SubscribeAttribute("color-point-rintensity") + { + } + + ~SubscribeAttributeColorControlColorPointRIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointRIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135668,10 +117818,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeColorPointRIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135685,34 +117835,34 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public }; /* - * Attribute ClusterRevision + * Attribute ColorPointGX */ -class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlColorPointGX : public ReadAttribute { public: - ReadCarbonDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlColorPointGX() + : ReadAttribute("color-point-gx") { } - ~ReadCarbonDioxideConcentrationMeasurementClusterRevision() + ~ReadColorControlColorPointGX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl ColorPointGX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135721,25 +117871,66 @@ class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttr } }; -class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class WriteColorControlColorPointGX : public WriteAttribute { public: - SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteColorControlColorPointGX() + : WriteAttribute("color-point-gx") { + AddArgument("attr-name", "color-point-gx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() + ~WriteColorControlColorPointGX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGX() + : SubscribeAttribute("color-point-gx") + { + } + + ~SubscribeAttributeColorControlColorPointGX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135750,10 +117941,10 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeColorPointGXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135766,62 +117957,35 @@ class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : p } }; -/*----------------------------------------------------------------------------*\ -| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute ColorPointGY */ -class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointGY : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlColorPointGY() + : ReadAttribute("color-point-gy") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() + ~ReadColorControlColorPointGY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl ColorPointGY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135830,25 +117994,66 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointGY : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteColorControlColorPointGY() + : WriteAttribute("color-point-gy") { + AddArgument("attr-name", "color-point-gy"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() + ~WriteColorControlColorPointGY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGY() + : SubscribeAttribute("color-point-gy") + { + } + + ~SubscribeAttributeColorControlColorPointGY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135859,10 +118064,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointGYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135876,61 +118081,105 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : p }; /* - * Attribute MinMeasuredValue + * Attribute ColorPointGIntensity */ -class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointGIntensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlColorPointGIntensity() + : ReadAttribute("color-point-gintensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + ~ReadColorControlColorPointGIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointGIntensity read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteColorControlColorPointGIntensity : public WriteAttribute { +public: + WriteColorControlColorPointGIntensity() + : WriteAttribute("color-point-gintensity") + { + AddArgument("attr-name", "color-point-gintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlColorPointGIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointGIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlColorPointGIntensity() + : SubscribeAttribute("color-point-gintensity") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeColorControlColorPointGIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointGIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -135941,10 +118190,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointGIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -135958,34 +118207,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue }; /* - * Attribute MaxMeasuredValue + * Attribute ColorPointBX */ -class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointBX : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlColorPointBX() + : ReadAttribute("color-point-bx") { } - ~ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + ~ReadColorControlColorPointBX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointBX read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -135994,25 +118243,66 @@ class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadA } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointBX : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteColorControlColorPointBX() + : WriteAttribute("color-point-bx") { + AddArgument("attr-name", "color-point-bx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + ~WriteColorControlColorPointBX() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBXWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBX() + : SubscribeAttribute("color-point-bx") + { + } + + ~SubscribeAttributeColorControlColorPointBX() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBX::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136023,10 +118313,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointBXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136040,34 +118330,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue }; /* - * Attribute PeakMeasuredValue + * Attribute ColorPointBY */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlColorPointBY : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlColorPointBY() + : ReadAttribute("color-point-by") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + ~ReadColorControlColorPointBY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl ColorPointBY read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136076,25 +118366,66 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class WriteColorControlColorPointBY : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + WriteColorControlColorPointBY() + : WriteAttribute("color-point-by") { + AddArgument("attr-name", "color-point-by"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + ~WriteColorControlColorPointBY() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBYWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBY() + : SubscribeAttribute("color-point-by") + { + } + + ~SubscribeAttributeColorControlColorPointBY() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBY::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136105,10 +118436,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeColorPointBYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136122,34 +118453,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute PeakMeasuredValueWindow + * Attribute ColorPointBIntensity */ -class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlColorPointBIntensity : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlColorPointBIntensity() + : ReadAttribute("color-point-bintensity") { } - ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadColorControlColorPointBIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl ColorPointBIntensity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136158,25 +118489,69 @@ class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : publi } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteColorControlColorPointBIntensity : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + WriteColorControlColorPointBIntensity() + : WriteAttribute("color-point-bintensity") { + AddArgument("attr-name", "color-point-bintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + ~WriteColorControlColorPointBIntensity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeColorPointBIntensityWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBIntensity() + : SubscribeAttribute("color-point-bintensity") + { + } + + ~SubscribeAttributeColorControlColorPointBIntensity() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorPointBIntensity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136187,10 +118562,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeColorPointBIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136204,34 +118579,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue }; /* - * Attribute AverageMeasuredValue + * Attribute EnhancedCurrentHue */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlEnhancedCurrentHue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlEnhancedCurrentHue() + : ReadAttribute("enhanced-current-hue") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + ~ReadColorControlEnhancedCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl EnhancedCurrentHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136240,25 +118615,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlEnhancedCurrentHue() + : SubscribeAttribute("enhanced-current-hue") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeColorControlEnhancedCurrentHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136269,10 +118644,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEnhancedCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136286,34 +118661,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa }; /* - * Attribute AverageMeasuredValueWindow + * Attribute EnhancedColorMode */ -class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadColorControlEnhancedColorMode : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadColorControlEnhancedColorMode() + : ReadAttribute("enhanced-color-mode") { } - ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadColorControlEnhancedColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("ColorControl EnhancedColorMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136322,25 +118697,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : pu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeColorControlEnhancedColorMode() + : SubscribeAttribute("enhanced-color-mode") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeColorControlEnhancedColorMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136351,10 +118726,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeEnhancedColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136368,34 +118743,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredVa }; /* - * Attribute Uncertainty + * Attribute ColorLoopActive */ -class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadColorControlColorLoopActive : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadColorControlColorLoopActive() + : ReadAttribute("color-loop-active") { } - ~ReadNitrogenDioxideConcentrationMeasurementUncertainty() + ~ReadColorControlColorLoopActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); + LogNSError("ColorControl ColorLoopActive read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136404,25 +118779,25 @@ class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttrib } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeColorControlColorLoopActive() + : SubscribeAttribute("color-loop-active") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() + ~SubscribeAttributeColorControlColorLoopActive() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136433,10 +118808,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeColorLoopActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136450,34 +118825,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : pub }; /* - * Attribute MeasurementUnit + * Attribute ColorLoopDirection */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadColorControlColorLoopDirection : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadColorControlColorLoopDirection() + : ReadAttribute("color-loop-direction") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() + ~ReadColorControlColorLoopDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("ColorControl ColorLoopDirection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136486,25 +118861,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeColorControlColorLoopDirection() + : SubscribeAttribute("color-loop-direction") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeColorControlColorLoopDirection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136515,10 +118890,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeColorLoopDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136532,34 +118907,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : }; /* - * Attribute MeasurementMedium + * Attribute ColorLoopTime */ -class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadColorControlColorLoopTime : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadColorControlColorLoopTime() + : ReadAttribute("color-loop-time") { } - ~ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() + ~ReadColorControlColorLoopTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("ColorControl ColorLoopTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136568,25 +118943,25 @@ class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public Read } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeColorControlColorLoopTime() + : SubscribeAttribute("color-loop-time") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeColorControlColorLoopTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136597,10 +118972,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeColorLoopTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136614,34 +118989,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium }; /* - * Attribute LevelValue + * Attribute ColorLoopStartEnhancedHue */ -class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadColorControlColorLoopStartEnhancedHue() + : ReadAttribute("color-loop-start-enhanced-hue") { } - ~ReadNitrogenDioxideConcentrationMeasurementLevelValue() + ~ReadColorControlColorLoopStartEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); + LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136650,25 +119025,25 @@ class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeColorControlColorLoopStartEnhancedHue() + : SubscribeAttribute("color-loop-start-enhanced-hue") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() + ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136679,10 +119054,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136696,34 +119071,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : publ }; /* - * Attribute GeneratedCommandList + * Attribute ColorLoopStoredEnhancedHue */ -class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlColorLoopStoredEnhancedHue() + : ReadAttribute("color-loop-stored-enhanced-hue") { } - ~ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + ~ReadColorControlColorLoopStoredEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136732,25 +119107,25 @@ class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public R } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlColorLoopStoredEnhancedHue() + : SubscribeAttribute("color-loop-stored-enhanced-hue") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136761,10 +119136,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136778,34 +119153,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandL }; /* - * Attribute AcceptedCommandList + * Attribute ColorCapabilities */ -class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadColorControlColorCapabilities : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlColorCapabilities() + : ReadAttribute("color-capabilities") { } - ~ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + ~ReadColorControlColorCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("ColorControl ColorCapabilities read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136814,25 +119189,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public Re } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlColorCapabilities() + : SubscribeAttribute("color-capabilities") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeColorControlColorCapabilities() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorCapabilities::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136843,10 +119218,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeColorCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136859,37 +119234,35 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandLi } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ColorTempPhysicalMinMireds */ -class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribute { +class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadColorControlColorTempPhysicalMinMireds() + : ReadAttribute("color-temp-physical-min-mireds") { } - ~ReadNitrogenDioxideConcentrationMeasurementEventList() + ~ReadColorControlColorTempPhysicalMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); + LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136898,25 +119271,25 @@ class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribut } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeColorControlColorTempPhysicalMinMireds() + : SubscribeAttribute("color-temp-physical-min-mireds") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() + ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMinMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -136927,10 +119300,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -136943,37 +119316,35 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : publi } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ColorTempPhysicalMaxMireds */ -class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlColorTempPhysicalMaxMireds() + : ReadAttribute("color-temp-physical-max-mireds") { } - ~ReadNitrogenDioxideConcentrationMeasurementAttributeList() + ~ReadColorControlColorTempPhysicalMaxMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); + LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -136982,25 +119353,25 @@ class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttr } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlColorTempPhysicalMaxMireds() + : SubscribeAttribute("color-temp-physical-max-mireds") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() + ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137011,10 +119382,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137028,34 +119399,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : p }; /* - * Attribute FeatureMap + * Attribute CoupleColorTempToLevelMinMireds */ -class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlCoupleColorTempToLevelMinMireds() + : ReadAttribute("couple-color-temp-to-level-min-mireds") { } - ~ReadNitrogenDioxideConcentrationMeasurementFeatureMap() + ~ReadColorControlCoupleColorTempToLevelMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); + LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137064,25 +119435,25 @@ class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribu } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() + : SubscribeAttribute("couple-color-temp-to-level-min-mireds") { } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() + ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137093,10 +119464,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137110,34 +119481,34 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : publ }; /* - * Attribute ClusterRevision + * Attribute StartUpColorTemperatureMireds */ -class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { public: - ReadNitrogenDioxideConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlStartUpColorTemperatureMireds() + : ReadAttribute("start-up-color-temperature-mireds") { } - ~ReadNitrogenDioxideConcentrationMeasurementClusterRevision() + ~ReadColorControlStartUpColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137146,25 +119517,69 @@ class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAt } }; -class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { public: - SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteColorControlStartUpColorTemperatureMireds() + : WriteAttribute("start-up-color-temperature-mireds") { + AddArgument("attr-name", "start-up-color-temperature-mireds"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() + ~WriteColorControlStartUpColorTemperatureMireds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } + + [cluster writeAttributeStartUpColorTemperatureMiredsWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl StartUpColorTemperatureMireds write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { +public: + SubscribeAttributeColorControlStartUpColorTemperatureMireds() + : SubscribeAttribute("start-up-color-temperature-mireds") + { + } + + ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::StartUpColorTemperatureMireds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137175,10 +119590,10 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137191,62 +119606,35 @@ class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : } }; -/*----------------------------------------------------------------------------*\ -| Cluster OzoneConcentrationMeasurement | 0x0415 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute GeneratedCommandList */ -class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadColorControlGeneratedCommandList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadColorControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOzoneConcentrationMeasurementMeasuredValue() + ~ReadColorControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("ColorControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137255,25 +119643,25 @@ class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeColorControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeColorControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137284,10 +119672,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137301,34 +119689,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public Subs }; /* - * Attribute MinMeasuredValue + * Attribute AcceptedCommandList */ -class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadColorControlAcceptedCommandList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadColorControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOzoneConcentrationMeasurementMinMeasuredValue() + ~ReadColorControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("ColorControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137337,25 +119725,25 @@ class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeColorControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeColorControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137366,10 +119754,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137382,35 +119770,37 @@ class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public S } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxMeasuredValue + * Attribute EventList */ -class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadColorControlEventList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadColorControlEventList() + : ReadAttribute("event-list") { } - ~ReadOzoneConcentrationMeasurementMaxMeasuredValue() + ~ReadColorControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("ColorControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137419,25 +119809,25 @@ class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlEventList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeColorControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeColorControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137448,10 +119838,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137464,35 +119854,37 @@ class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public S } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute PeakMeasuredValue + * Attribute AttributeList */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadColorControlAttributeList : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadColorControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOzoneConcentrationMeasurementPeakMeasuredValue() + ~ReadColorControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("ColorControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137501,25 +119893,25 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute } }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeColorControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeColorControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137530,10 +119922,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137547,34 +119939,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public }; /* - * Attribute PeakMeasuredValueWindow + * Attribute FeatureMap */ -class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadColorControlFeatureMap : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadColorControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadColorControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("ColorControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137583,25 +119975,25 @@ class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeColorControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeColorControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137612,10 +120004,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137629,34 +120021,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : p }; /* - * Attribute AverageMeasuredValue + * Attribute ClusterRevision */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadColorControlClusterRevision : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadColorControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValue() + ~ReadColorControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("ColorControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137665,25 +120057,25 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeColorControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeColorControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ColorControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ColorControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137694,10 +120086,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137710,35 +120102,65 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : publ } }; +/*----------------------------------------------------------------------------*\ +| Cluster BallastConfiguration | 0x0301 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AverageMeasuredValueWindow + * Attribute PhysicalMinLevel */ -class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadBallastConfigurationPhysicalMinLevel() + : ReadAttribute("physical-min-level") { } - ~ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadBallastConfigurationPhysicalMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137747,25 +120169,25 @@ class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeBallastConfigurationPhysicalMinLevel() + : SubscribeAttribute("physical-min-level") { } - ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMinLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137776,10 +120198,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributePhysicalMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137793,34 +120215,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow }; /* - * Attribute Uncertainty + * Attribute PhysicalMaxLevel */ -class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadBallastConfigurationPhysicalMaxLevel() + : ReadAttribute("physical-max-level") { } - ~ReadOzoneConcentrationMeasurementUncertainty() + ~ReadBallastConfigurationPhysicalMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137829,25 +120251,25 @@ class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeBallastConfigurationPhysicalMaxLevel() + : SubscribeAttribute("physical-max-level") { } - ~SubscribeAttributeOzoneConcentrationMeasurementUncertainty() + ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::PhysicalMaxLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137858,10 +120280,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributePhysicalMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137875,34 +120297,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public Subscr }; /* - * Attribute MeasurementUnit + * Attribute BallastStatus */ -class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadBallastConfigurationBallastStatus : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadBallastConfigurationBallastStatus() + : ReadAttribute("ballast-status") { } - ~ReadOzoneConcentrationMeasurementMeasurementUnit() + ~ReadBallastConfigurationBallastStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("BallastConfiguration BallastStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137911,25 +120333,25 @@ class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeBallastConfigurationBallastStatus() + : SubscribeAttribute("ballast-status") { } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeBallastConfigurationBallastStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -137940,10 +120362,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeBallastStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -137957,34 +120379,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public Su }; /* - * Attribute MeasurementMedium + * Attribute MinLevel */ -class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadBallastConfigurationMinLevel : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadBallastConfigurationMinLevel() + : ReadAttribute("min-level") { } - ~ReadOzoneConcentrationMeasurementMeasurementMedium() + ~ReadBallastConfigurationMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("BallastConfiguration MinLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -137993,25 +120415,66 @@ class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class WriteBallastConfigurationMinLevel : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + WriteBallastConfigurationMinLevel() + : WriteAttribute("min-level") { + AddArgument("attr-name", "min-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() + ~WriteBallastConfigurationMinLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeMinLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MinLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationMinLevel() + : SubscribeAttribute("min-level") + { + } + + ~SubscribeAttributeBallastConfigurationMinLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MinLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138022,10 +120485,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138039,34 +120502,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public }; /* - * Attribute LevelValue + * Attribute MaxLevel */ -class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadBallastConfigurationMaxLevel : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadBallastConfigurationMaxLevel() + : ReadAttribute("max-level") { } - ~ReadOzoneConcentrationMeasurementLevelValue() + ~ReadBallastConfigurationMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); + LogNSError("BallastConfiguration MaxLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138075,25 +120538,66 @@ class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public SubscribeAttribute { +class WriteBallastConfigurationMaxLevel : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + WriteBallastConfigurationMaxLevel() + : WriteAttribute("max-level") { + AddArgument("attr-name", "max-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementLevelValue() + ~WriteBallastConfigurationMaxLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeMaxLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MaxLevel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationMaxLevel() + : SubscribeAttribute("max-level") + { + } + + ~SubscribeAttributeBallastConfigurationMaxLevel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::MaxLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138104,10 +120608,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138121,34 +120625,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public Subscri }; /* - * Attribute GeneratedCommandList + * Attribute IntrinsicBallastFactor */ -class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBallastConfigurationIntrinsicBallastFactor() + : ReadAttribute("intrinsic-ballast-factor") { } - ~ReadOzoneConcentrationMeasurementGeneratedCommandList() + ~ReadBallastConfigurationIntrinsicBallastFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138157,25 +120661,69 @@ class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteBallastConfigurationIntrinsicBallastFactor() + : WriteAttribute("intrinsic-ballast-factor") { + AddArgument("attr-name", "intrinsic-ballast-factor"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() + ~WriteBallastConfigurationIntrinsicBallastFactor() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeIntrinsicBallastFactorWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + : SubscribeAttribute("intrinsic-ballast-factor") + { + } + + ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::IntrinsicBallastFactor::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138186,10 +120734,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138203,34 +120751,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : publ }; /* - * Attribute AcceptedCommandList + * Attribute BallastFactorAdjustment */ -class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBallastConfigurationBallastFactorAdjustment() + : ReadAttribute("ballast-factor-adjustment") { } - ~ReadOzoneConcentrationMeasurementAcceptedCommandList() + ~ReadBallastConfigurationBallastFactorAdjustment() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138239,25 +120787,69 @@ class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteBallastConfigurationBallastFactorAdjustment() + : WriteAttribute("ballast-factor-adjustment") { + AddArgument("attr-name", "ballast-factor-adjustment"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() + ~WriteBallastConfigurationBallastFactorAdjustment() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } + + [cluster writeAttributeBallastFactorAdjustmentWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration BallastFactorAdjustment write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + : SubscribeAttribute("ballast-factor-adjustment") + { + } + + ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::BallastFactorAdjustment::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138268,10 +120860,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138284,37 +120876,35 @@ class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : publi } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute LampQuantity */ -class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { +class ReadBallastConfigurationLampQuantity : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadBallastConfigurationLampQuantity() + : ReadAttribute("lamp-quantity") { } - ~ReadOzoneConcentrationMeasurementEventList() + ~ReadBallastConfigurationLampQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement EventList read Error", error); + LogNSError("BallastConfiguration LampQuantity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138323,25 +120913,25 @@ class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBallastConfigurationLampQuantity() + : SubscribeAttribute("lamp-quantity") { } - ~SubscribeAttributeOzoneConcentrationMeasurementEventList() + ~SubscribeAttributeBallastConfigurationLampQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138352,10 +120942,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeLampQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138368,37 +120958,35 @@ class SubscribeAttributeOzoneConcentrationMeasurementEventList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute LampType */ -class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadBallastConfigurationLampType : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadBallastConfigurationLampType() + : ReadAttribute("lamp-type") { } - ~ReadOzoneConcentrationMeasurementAttributeList() + ~ReadBallastConfigurationLampType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); + LogNSError("BallastConfiguration LampType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138407,25 +120995,66 @@ class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public SubscribeAttribute { +class WriteBallastConfigurationLampType : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + WriteBallastConfigurationLampType() + : WriteAttribute("lamp-type") { + AddArgument("attr-name", "lamp-type"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementAttributeList() + ~WriteBallastConfigurationLampType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampType() + : SubscribeAttribute("lamp-type") + { + } + + ~SubscribeAttributeBallastConfigurationLampType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138436,10 +121065,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeLampTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138453,34 +121082,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public Subs }; /* - * Attribute FeatureMap + * Attribute LampManufacturer */ -class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadBallastConfigurationLampManufacturer : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadBallastConfigurationLampManufacturer() + : ReadAttribute("lamp-manufacturer") { } - ~ReadOzoneConcentrationMeasurementFeatureMap() + ~ReadBallastConfigurationLampManufacturer() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); + LogNSError("BallastConfiguration LampManufacturer read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138489,25 +121118,66 @@ class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class WriteBallastConfigurationLampManufacturer : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + WriteBallastConfigurationLampManufacturer() + : WriteAttribute("lamp-manufacturer") + { + AddArgument("attr-name", "lamp-manufacturer"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationLampManufacturer() { } - ~SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLampManufacturerWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampManufacturer() + : SubscribeAttribute("lamp-manufacturer") + { + } + + ~SubscribeAttributeBallastConfigurationLampManufacturer() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampManufacturer::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138518,10 +121188,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeLampManufacturerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138535,34 +121205,34 @@ class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public Subscri }; /* - * Attribute ClusterRevision + * Attribute LampRatedHours */ -class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadBallastConfigurationLampRatedHours : public ReadAttribute { public: - ReadOzoneConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadBallastConfigurationLampRatedHours() + : ReadAttribute("lamp-rated-hours") { } - ~ReadOzoneConcentrationMeasurementClusterRevision() + ~ReadBallastConfigurationLampRatedHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("BallastConfiguration LampRatedHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138571,25 +121241,69 @@ class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class WriteBallastConfigurationLampRatedHours : public WriteAttribute { public: - SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteBallastConfigurationLampRatedHours() + : WriteAttribute("lamp-rated-hours") { + AddArgument("attr-name", "lamp-rated-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() + ~WriteBallastConfigurationLampRatedHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampRatedHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampRatedHours() + : SubscribeAttribute("lamp-rated-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampRatedHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampRatedHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138600,10 +121314,10 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeLampRatedHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138616,62 +121330,35 @@ class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public Su } }; -/*----------------------------------------------------------------------------*\ -| Cluster Pm25ConcentrationMeasurement | 0x042A | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute LampBurnHours */ -class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationLampBurnHours : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadBallastConfigurationLampBurnHours() + : ReadAttribute("lamp-burn-hours") { } - ~ReadPm25ConcentrationMeasurementMeasuredValue() + ~ReadBallastConfigurationLampBurnHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("BallastConfiguration LampBurnHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138680,25 +121367,69 @@ class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHours : public WriteAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteBallastConfigurationLampBurnHours() + : WriteAttribute("lamp-burn-hours") { + AddArgument("attr-name", "lamp-burn-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() + ~WriteBallastConfigurationLampBurnHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampBurnHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHours() + : SubscribeAttribute("lamp-burn-hours") + { + } + + ~SubscribeAttributeBallastConfigurationLampBurnHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138709,10 +121440,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeLampBurnHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138726,34 +121457,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public Subsc }; /* - * Attribute MinMeasuredValue + * Attribute LampAlarmMode */ -class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadBallastConfigurationLampAlarmMode() + : ReadAttribute("lamp-alarm-mode") { } - ~ReadPm25ConcentrationMeasurementMinMeasuredValue() + ~ReadBallastConfigurationLampAlarmMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("BallastConfiguration LampAlarmMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138762,25 +121493,66 @@ class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteBallastConfigurationLampAlarmMode() + : WriteAttribute("lamp-alarm-mode") + { + AddArgument("attr-name", "lamp-alarm-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBallastConfigurationLampAlarmMode() { } - ~SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeLampAlarmModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampAlarmMode() + : SubscribeAttribute("lamp-alarm-mode") + { + } + + ~SubscribeAttributeBallastConfigurationLampAlarmMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampAlarmMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138791,10 +121563,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeLampAlarmModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138808,34 +121580,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public Su }; /* - * Attribute MaxMeasuredValue + * Attribute LampBurnHoursTripPoint */ -class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadBallastConfigurationLampBurnHoursTripPoint() + : ReadAttribute("lamp-burn-hours-trip-point") { } - ~ReadPm25ConcentrationMeasurementMaxMeasuredValue() + ~ReadBallastConfigurationLampBurnHoursTripPoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138844,25 +121616,69 @@ class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteBallastConfigurationLampBurnHoursTripPoint() + : WriteAttribute("lamp-burn-hours-trip-point") { + AddArgument("attr-name", "lamp-burn-hours-trip-point"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() + ~WriteBallastConfigurationLampBurnHoursTripPoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLampBurnHoursTripPointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +public: + SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + : SubscribeAttribute("lamp-burn-hours-trip-point") + { + } + + ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::LampBurnHoursTripPoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138873,10 +121689,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138890,34 +121706,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public Su }; /* - * Attribute PeakMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadBallastConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValue() + ~ReadBallastConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("BallastConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -138926,25 +121742,25 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeBallastConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeBallastConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -138955,10 +121771,10 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -138972,34 +121788,34 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public S }; /* - * Attribute PeakMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadBallastConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadBallastConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("BallastConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139008,25 +121824,25 @@ class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeBallastConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeBallastConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139037,10 +121853,10 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139053,35 +121869,37 @@ class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : pu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageMeasuredValue + * Attribute EventList */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadBallastConfigurationEventList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadBallastConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValue() + ~ReadBallastConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("BallastConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139090,25 +121908,25 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeBallastConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeBallastConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139119,10 +121937,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139135,35 +121953,37 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : publi } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageMeasuredValueWindow + * Attribute AttributeList */ -class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadBallastConfigurationAttributeList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadBallastConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadBallastConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("BallastConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139172,25 +121992,25 @@ class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeBallastConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeBallastConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139201,10 +122021,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139218,34 +122038,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : }; /* - * Attribute Uncertainty + * Attribute FeatureMap */ -class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadBallastConfigurationFeatureMap : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadBallastConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm25ConcentrationMeasurementUncertainty() + ~ReadBallastConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("BallastConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139254,25 +122074,25 @@ class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeBallastConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm25ConcentrationMeasurementUncertainty() + ~SubscribeAttributeBallastConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139283,10 +122103,10 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139300,34 +122120,34 @@ class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public Subscri }; /* - * Attribute MeasurementUnit + * Attribute ClusterRevision */ -class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadBallastConfigurationClusterRevision : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadBallastConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm25ConcentrationMeasurementMeasurementUnit() + ~ReadBallastConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("BallastConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139336,25 +122156,25 @@ class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeBallastConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeBallastConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BallastConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BallastConfiguration::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139365,10 +122185,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139381,35 +122201,56 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public Sub } }; +/*----------------------------------------------------------------------------*\ +| Cluster IlluminanceMeasurement | 0x0400 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MeasurementMedium + * Attribute MeasuredValue */ -class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadIlluminanceMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm25ConcentrationMeasurementMeasurementMedium() + ~ReadIlluminanceMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139418,25 +122259,25 @@ class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeIlluminanceMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139447,10 +122288,10 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139464,34 +122305,34 @@ class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public S }; /* - * Attribute LevelValue + * Attribute MinMeasuredValue */ -class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadIlluminanceMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm25ConcentrationMeasurementLevelValue() + ~ReadIlluminanceMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139500,25 +122341,25 @@ class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementLevelValue() + ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139529,10 +122370,10 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139546,34 +122387,34 @@ class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute MaxMeasuredValue */ -class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadIlluminanceMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm25ConcentrationMeasurementGeneratedCommandList() + ~ReadIlluminanceMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139582,25 +122423,25 @@ class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139611,10 +122452,10 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139628,34 +122469,34 @@ class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : publi }; /* - * Attribute AcceptedCommandList + * Attribute Tolerance */ -class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadIlluminanceMeasurementTolerance : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIlluminanceMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm25ConcentrationMeasurementAcceptedCommandList() + ~ReadIlluminanceMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("IlluminanceMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139664,25 +122505,25 @@ class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIlluminanceMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeIlluminanceMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139693,10 +122534,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139709,37 +122550,35 @@ class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute LightSensorType */ -class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { +class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadIlluminanceMeasurementLightSensorType() + : ReadAttribute("light-sensor-type") { } - ~ReadPm25ConcentrationMeasurementEventList() + ~ReadIlluminanceMeasurementLightSensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + LogNSError("IlluminanceMeasurement LightSensorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139748,25 +122587,25 @@ class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeIlluminanceMeasurementLightSensorType() + : SubscribeAttribute("light-sensor-type") { } - ~SubscribeAttributePm25ConcentrationMeasurementEventList() + ~SubscribeAttributeIlluminanceMeasurementLightSensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::LightSensorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139777,10 +122616,10 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeLightSensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139793,37 +122632,35 @@ class SubscribeAttributePm25ConcentrationMeasurementEventList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadIlluminanceMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm25ConcentrationMeasurementAttributeList() + ~ReadIlluminanceMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139832,25 +122669,25 @@ class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementAttributeList() + ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139861,10 +122698,10 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139878,34 +122715,34 @@ class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public Subsc }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadIlluminanceMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm25ConcentrationMeasurementFeatureMap() + ~ReadIlluminanceMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139914,25 +122751,25 @@ class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementFeatureMap() + ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -139943,10 +122780,10 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -139959,35 +122796,37 @@ class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public Subscrib } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadIlluminanceMeasurementEventList : public ReadAttribute { public: - ReadPm25ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadIlluminanceMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm25ConcentrationMeasurementClusterRevision() + ~ReadIlluminanceMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("IlluminanceMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -139996,25 +122835,25 @@ class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm25ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeIlluminanceMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm25ConcentrationMeasurementClusterRevision() + ~SubscribeAttributeIlluminanceMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140025,10 +122864,10 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140041,62 +122880,37 @@ class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public Sub } }; -/*----------------------------------------------------------------------------*\ -| Cluster FormaldehydeConcentrationMeasurement | 0x042B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute AttributeList */ -class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadIlluminanceMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadFormaldehydeConcentrationMeasurementMeasuredValue() + ~ReadIlluminanceMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140105,25 +122919,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeIlluminanceMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeIlluminanceMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140134,10 +122948,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140151,34 +122965,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : publ }; /* - * Attribute MinMeasuredValue + * Attribute FeatureMap */ -class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadIlluminanceMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() + ~ReadIlluminanceMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140187,25 +123001,25 @@ class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttr } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeIlluminanceMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeIlluminanceMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140216,10 +123030,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140233,34 +123047,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : p }; /* - * Attribute MaxMeasuredValue + * Attribute ClusterRevision */ -class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadIlluminanceMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() + ~ReadIlluminanceMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140269,25 +123083,25 @@ class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttr } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeIlluminanceMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeIlluminanceMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::IlluminanceMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IlluminanceMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140298,10 +123112,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140314,35 +123128,55 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : p } }; +/*----------------------------------------------------------------------------*\ +| Cluster TemperatureMeasurement | 0x0402 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute PeakMeasuredValue + * Attribute MeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadTemperatureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() + ~ReadTemperatureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("TemperatureMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140351,25 +123185,25 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeTemperatureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeTemperatureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140380,10 +123214,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140397,34 +123231,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : }; /* - * Attribute PeakMeasuredValueWindow + * Attribute MinMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadTemperatureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadTemperatureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140433,25 +123267,25 @@ class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public R } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140462,10 +123296,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140479,34 +123313,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWin }; /* - * Attribute AverageMeasuredValue + * Attribute MaxMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadTemperatureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() + ~ReadTemperatureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140515,25 +123349,25 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140544,10 +123378,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140561,34 +123395,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue }; /* - * Attribute AverageMeasuredValueWindow + * Attribute Tolerance */ -class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadTemperatureMeasurementTolerance : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadTemperatureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadTemperatureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("TemperatureMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140597,25 +123431,25 @@ class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : publi } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeTemperatureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeTemperatureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140626,10 +123460,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140643,34 +123477,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue }; /* - * Attribute Uncertainty + * Attribute GeneratedCommandList */ -class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadTemperatureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementUncertainty() + ~ReadTemperatureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); + LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140679,25 +123513,25 @@ class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() + ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140708,10 +123542,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140725,34 +123559,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public }; /* - * Attribute MeasurementUnit + * Attribute AcceptedCommandList */ -class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadTemperatureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementUnit() + ~ReadTemperatureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140761,25 +123595,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140790,10 +123624,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140806,35 +123640,37 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : pu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MeasurementMedium + * Attribute EventList */ -class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadTemperatureMeasurementEventList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadTemperatureMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadFormaldehydeConcentrationMeasurementMeasurementMedium() + ~ReadTemperatureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("TemperatureMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140843,25 +123679,25 @@ class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAtt } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeTemperatureMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeTemperatureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140872,10 +123708,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140888,35 +123724,37 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute LevelValue + * Attribute AttributeList */ -class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadTemperatureMeasurementAttributeList : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadTemperatureMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadFormaldehydeConcentrationMeasurementLevelValue() + ~ReadTemperatureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); + LogNSError("TemperatureMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -140925,25 +123763,25 @@ class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeTemperatureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() + ~SubscribeAttributeTemperatureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -140954,10 +123792,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -140971,34 +123809,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTemperatureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() + ~ReadTemperatureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("TemperatureMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141007,25 +123845,25 @@ class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public Read } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTemperatureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeTemperatureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141036,10 +123874,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141053,34 +123891,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTemperatureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() + ~ReadTemperatureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("TemperatureMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141089,25 +123927,25 @@ class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadA } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTemperatureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeTemperatureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TemperatureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141118,10 +123956,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141134,37 +123972,60 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster PressureMeasurement | 0x0403 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Attribute MeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { +class ReadPressureMeasurementMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadPressureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementEventList() + ~ReadPressureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); + LogNSError("PressureMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141173,25 +124034,25 @@ class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePressureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() + ~SubscribeAttributePressureMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141202,10 +124063,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141218,37 +124079,35 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public S } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute MinMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadPressureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementAttributeList() + ~ReadPressureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); + LogNSError("PressureMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141257,25 +124116,25 @@ class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribu } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePressureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() + ~SubscribeAttributePressureMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141286,10 +124145,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141303,34 +124162,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : publ }; /* - * Attribute FeatureMap + * Attribute MaxMeasuredValue */ -class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadPressureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadFormaldehydeConcentrationMeasurementFeatureMap() + ~ReadPressureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); + LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141339,25 +124198,25 @@ class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePressureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() + ~SubscribeAttributePressureMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141368,10 +124227,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141385,34 +124244,34 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public }; /* - * Attribute ClusterRevision + * Attribute Tolerance */ -class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadPressureMeasurementTolerance : public ReadAttribute { public: - ReadFormaldehydeConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadPressureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadFormaldehydeConcentrationMeasurementClusterRevision() + ~ReadPressureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("PressureMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141421,25 +124280,25 @@ class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttri } }; -class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePressureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() + ~SubscribeAttributePressureMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141450,10 +124309,10 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141466,62 +124325,35 @@ class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : pu } }; -/*----------------------------------------------------------------------------*\ -| Cluster Pm1ConcentrationMeasurement | 0x042C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute ScaledValue */ -class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementScaledValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPressureMeasurementScaledValue() + : ReadAttribute("scaled-value") { } - ~ReadPm1ConcentrationMeasurementMeasuredValue() + ~ReadPressureMeasurementScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("PressureMeasurement ScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141530,25 +124362,25 @@ class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePressureMeasurementScaledValue() + : SubscribeAttribute("scaled-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() + ~SubscribeAttributePressureMeasurementScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141559,10 +124391,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141576,34 +124408,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public Subscr }; /* - * Attribute MinMeasuredValue + * Attribute MinScaledValue */ -class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMinScaledValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPressureMeasurementMinScaledValue() + : ReadAttribute("min-scaled-value") { } - ~ReadPm1ConcentrationMeasurementMinMeasuredValue() + ~ReadPressureMeasurementMinScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("PressureMeasurement MinScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141612,25 +124444,25 @@ class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePressureMeasurementMinScaledValue() + : SubscribeAttribute("min-scaled-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributePressureMeasurementMinScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MinScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141641,10 +124473,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeMinScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141658,34 +124490,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public Sub }; /* - * Attribute MaxMeasuredValue + * Attribute MaxScaledValue */ -class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPressureMeasurementMaxScaledValue() + : ReadAttribute("max-scaled-value") { } - ~ReadPm1ConcentrationMeasurementMaxMeasuredValue() + ~ReadPressureMeasurementMaxScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("PressureMeasurement MaxScaledValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141694,25 +124526,25 @@ class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePressureMeasurementMaxScaledValue() + : SubscribeAttribute("max-scaled-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributePressureMeasurementMaxScaledValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::MaxScaledValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141723,10 +124555,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeMaxScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141740,34 +124572,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public Sub }; /* - * Attribute PeakMeasuredValue + * Attribute ScaledTolerance */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementScaledTolerance : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadPressureMeasurementScaledTolerance() + : ReadAttribute("scaled-tolerance") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValue() + ~ReadPressureMeasurementScaledTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("PressureMeasurement ScaledTolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141776,25 +124608,25 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributePressureMeasurementScaledTolerance() + : SubscribeAttribute("scaled-tolerance") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributePressureMeasurementScaledTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ScaledTolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141805,10 +124637,10 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeScaledToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141822,34 +124654,34 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public Su }; /* - * Attribute PeakMeasuredValueWindow + * Attribute Scale */ -class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadPressureMeasurementScale : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadPressureMeasurementScale() + : ReadAttribute("scale") { } - ~ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadPressureMeasurementScale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("PressureMeasurement Scale read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141858,25 +124690,25 @@ class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttrib } }; -class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributePressureMeasurementScale() + : SubscribeAttribute("scale") { } - ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributePressureMeasurementScale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::Scale::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141887,10 +124719,10 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeScaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141904,34 +124736,34 @@ class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : pub }; /* - * Attribute AverageMeasuredValue + * Attribute GeneratedCommandList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadPressureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValue() + ~ReadPressureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("PressureMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -141940,25 +124772,25 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributePressureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributePressureMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -141969,10 +124801,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -141986,34 +124818,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public }; /* - * Attribute AverageMeasuredValueWindow + * Attribute AcceptedCommandList */ -class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadPressureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadPressureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("PressureMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142022,25 +124854,25 @@ class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAtt } }; -class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributePressureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributePressureMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142051,10 +124883,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142067,35 +124899,37 @@ class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Uncertainty + * Attribute EventList */ -class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadPressureMeasurementEventList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadPressureMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm1ConcentrationMeasurementUncertainty() + ~ReadPressureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("PressureMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142104,25 +124938,25 @@ class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributePressureMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementUncertainty() + ~SubscribeAttributePressureMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142133,10 +124967,10 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142149,35 +124983,37 @@ class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MeasurementUnit + * Attribute AttributeList */ -class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadPressureMeasurementAttributeList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadPressureMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm1ConcentrationMeasurementMeasurementUnit() + ~ReadPressureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("PressureMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142186,25 +125022,25 @@ class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributePressureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributePressureMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142215,10 +125051,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142232,34 +125068,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public Subs }; /* - * Attribute MeasurementMedium + * Attribute FeatureMap */ -class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadPressureMeasurementFeatureMap : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadPressureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm1ConcentrationMeasurementMeasurementMedium() + ~ReadPressureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("PressureMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142268,25 +125104,25 @@ class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributePressureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributePressureMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142297,10 +125133,10 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142314,34 +125150,34 @@ class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public Su }; /* - * Attribute LevelValue + * Attribute ClusterRevision */ -class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadPressureMeasurementClusterRevision : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadPressureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm1ConcentrationMeasurementLevelValue() + ~ReadPressureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); + LogNSError("PressureMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142350,25 +125186,25 @@ class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributePressureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm1ConcentrationMeasurementLevelValue() + ~SubscribeAttributePressureMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PressureMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PressureMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142379,10 +125215,10 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142395,35 +125231,55 @@ class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public Subscribe } }; +/*----------------------------------------------------------------------------*\ +| Cluster FlowMeasurement | 0x0404 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Attribute MeasuredValue */ -class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadFlowMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadFlowMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm1ConcentrationMeasurementGeneratedCommandList() + ~ReadFlowMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("FlowMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142432,25 +125288,25 @@ class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeFlowMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeFlowMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142461,10 +125317,10 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142478,34 +125334,34 @@ class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute MinMeasuredValue */ -class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadFlowMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm1ConcentrationMeasurementAcceptedCommandList() + ~ReadFlowMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("FlowMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142514,25 +125370,25 @@ class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeFlowMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeFlowMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142543,10 +125399,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142559,37 +125415,35 @@ class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxMeasuredValue */ -class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { +class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadFlowMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm1ConcentrationMeasurementEventList() + ~ReadFlowMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement EventList read Error", error); + LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142598,25 +125452,25 @@ class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeFlowMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm1ConcentrationMeasurementEventList() + ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142627,10 +125481,10 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142643,37 +125497,35 @@ class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Tolerance */ -class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadFlowMeasurementTolerance : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadFlowMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm1ConcentrationMeasurementAttributeList() + ~ReadFlowMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); + LogNSError("FlowMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142682,25 +125534,25 @@ class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeFlowMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm1ConcentrationMeasurementAttributeList() + ~SubscribeAttributeFlowMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142711,10 +125563,10 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142728,34 +125580,34 @@ class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public Subscr }; /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadFlowMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm1ConcentrationMeasurementFeatureMap() + ~ReadFlowMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("FlowMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142764,25 +125616,25 @@ class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeFlowMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementFeatureMap() + ~SubscribeAttributeFlowMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142793,10 +125645,10 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142810,34 +125662,34 @@ class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public Subscribe }; /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm1ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadFlowMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm1ConcentrationMeasurementClusterRevision() + ~ReadFlowMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("FlowMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142846,25 +125698,25 @@ class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm1ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeFlowMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm1ConcentrationMeasurementClusterRevision() + ~SubscribeAttributeFlowMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142875,10 +125727,10 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -142891,62 +125743,37 @@ class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster Pm10ConcentrationMeasurement | 0x042D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute MeasuredValue + * Attribute EventList */ -class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementEventList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadFlowMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm10ConcentrationMeasurementMeasuredValue() + ~ReadFlowMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("FlowMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -142955,25 +125782,25 @@ class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeFlowMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeFlowMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -142984,10 +125811,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143000,35 +125827,37 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MinMeasuredValue + * Attribute AttributeList */ -class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementAttributeList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadFlowMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm10ConcentrationMeasurementMinMeasuredValue() + ~ReadFlowMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("FlowMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143037,25 +125866,25 @@ class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeFlowMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeFlowMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143066,10 +125895,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143083,34 +125912,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public Su }; /* - * Attribute MaxMeasuredValue + * Attribute FeatureMap */ -class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementFeatureMap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadFlowMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm10ConcentrationMeasurementMaxMeasuredValue() + ~ReadFlowMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("FlowMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143119,25 +125948,25 @@ class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeFlowMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeFlowMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143148,10 +125977,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143165,34 +125994,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public Su }; /* - * Attribute PeakMeasuredValue + * Attribute ClusterRevision */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementClusterRevision : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadFlowMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValue() + ~ReadFlowMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("FlowMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143201,25 +126030,25 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + SubscribeAttributeFlowMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeFlowMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FlowMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FlowMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143230,10 +126059,10 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143246,35 +126075,55 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public S } }; +/*----------------------------------------------------------------------------*\ +| Cluster RelativeHumidityMeasurement | 0x0405 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute PeakMeasuredValueWindow + * Attribute MeasuredValue */ -class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadRelativeHumidityMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadRelativeHumidityMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143283,25 +126132,25 @@ class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttri } }; -class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143312,10 +126161,10 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143329,34 +126178,34 @@ class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : pu }; /* - * Attribute AverageMeasuredValue + * Attribute MinMeasuredValue */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadRelativeHumidityMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValue() + ~ReadRelativeHumidityMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143365,25 +126214,25 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143394,10 +126243,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143411,34 +126260,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : publi }; /* - * Attribute AverageMeasuredValueWindow + * Attribute MaxMeasuredValue */ -class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadRelativeHumidityMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadRelativeHumidityMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143447,25 +126296,25 @@ class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAt } }; -class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143476,10 +126325,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143493,34 +126342,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : }; /* - * Attribute Uncertainty + * Attribute Tolerance */ -class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadRelativeHumidityMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadPm10ConcentrationMeasurementUncertainty() + ~ReadRelativeHumidityMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143529,25 +126378,25 @@ class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + SubscribeAttributeRelativeHumidityMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributePm10ConcentrationMeasurementUncertainty() + ~SubscribeAttributeRelativeHumidityMeasurementTolerance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::Tolerance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143558,10 +126407,10 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143575,34 +126424,34 @@ class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public Subscri }; /* - * Attribute MeasurementUnit + * Attribute GeneratedCommandList */ -class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadRelativeHumidityMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPm10ConcentrationMeasurementMeasurementUnit() + ~ReadRelativeHumidityMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143611,25 +126460,25 @@ class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143640,10 +126489,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143657,34 +126506,34 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public Sub }; /* - * Attribute MeasurementMedium + * Attribute AcceptedCommandList */ -class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadRelativeHumidityMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPm10ConcentrationMeasurementMeasurementMedium() + ~ReadRelativeHumidityMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143693,25 +126542,25 @@ class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143722,10 +126571,10 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143738,35 +126587,37 @@ class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public S } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute LevelValue + * Attribute EventList */ -class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadRelativeHumidityMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPm10ConcentrationMeasurementLevelValue() + ~ReadRelativeHumidityMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); + LogNSError("RelativeHumidityMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143775,25 +126626,25 @@ class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + SubscribeAttributeRelativeHumidityMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementLevelValue() + ~SubscribeAttributeRelativeHumidityMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143804,10 +126655,10 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143820,35 +126671,37 @@ class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRelativeHumidityMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPm10ConcentrationMeasurementGeneratedCommandList() + ~ReadRelativeHumidityMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143857,25 +126710,25 @@ class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRelativeHumidityMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143886,10 +126739,10 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143903,34 +126756,34 @@ class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : publi }; /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRelativeHumidityMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPm10ConcentrationMeasurementAcceptedCommandList() + ~ReadRelativeHumidityMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -143939,25 +126792,25 @@ class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRelativeHumidityMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -143968,10 +126821,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -143984,37 +126837,35 @@ class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { +class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementEventList() - : ReadAttribute("event-list") + ReadRelativeHumidityMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPm10ConcentrationMeasurementEventList() + ~ReadRelativeHumidityMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement EventList read Error", error); + LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144023,25 +126874,25 @@ class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRelativeHumidityMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePm10ConcentrationMeasurementEventList() + ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RelativeHumidityMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RelativeHumidityMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144052,10 +126903,10 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144068,37 +126919,66 @@ class SubscribeAttributePm10ConcentrationMeasurementEventList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OccupancySensing | 0x0406 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * HoldTime | 0x0003 | +| * HoldTimeLimits | 0x0004 | +| * PIROccupiedToUnoccupiedDelay | 0x0010 | +| * PIRUnoccupiedToOccupiedDelay | 0x0011 | +| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * OccupancyChanged | 0x0000 | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Attribute Occupancy */ -class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingOccupancy : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadOccupancySensingOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPm10ConcentrationMeasurementAttributeList() + ~ReadOccupancySensingOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing Occupancy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144107,25 +126987,25 @@ class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOccupancySensingOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePm10ConcentrationMeasurementAttributeList() + ~SubscribeAttributeOccupancySensingOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144136,10 +127016,10 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144153,34 +127033,34 @@ class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public Subsc }; /* - * Attribute FeatureMap + * Attribute OccupancySensorType */ -class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingOccupancySensorType : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadOccupancySensingOccupancySensorType() + : ReadAttribute("occupancy-sensor-type") { } - ~ReadPm10ConcentrationMeasurementFeatureMap() + ~ReadOccupancySensingOccupancySensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing OccupancySensorType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144189,25 +127069,25 @@ class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOccupancySensingOccupancySensorType() + : SubscribeAttribute("occupancy-sensor-type") { } - ~SubscribeAttributePm10ConcentrationMeasurementFeatureMap() + ~SubscribeAttributeOccupancySensingOccupancySensorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144218,10 +127098,10 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOccupancySensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144235,34 +127115,34 @@ class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public Subscrib }; /* - * Attribute ClusterRevision + * Attribute OccupancySensorTypeBitmap */ -class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { public: - ReadPm10ConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOccupancySensingOccupancySensorTypeBitmap() + : ReadAttribute("occupancy-sensor-type-bitmap") { } - ~ReadPm10ConcentrationMeasurementClusterRevision() + ~ReadOccupancySensingOccupancySensorTypeBitmap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144271,25 +127151,25 @@ class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { public: - SubscribeAttributePm10ConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() + : SubscribeAttribute("occupancy-sensor-type-bitmap") { } - ~SubscribeAttributePm10ConcentrationMeasurementClusterRevision() + ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144300,10 +127180,10 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144316,89 +127196,105 @@ class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public Sub } }; -/*----------------------------------------------------------------------------*\ -| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * PeakMeasuredValue | 0x0003 | -| * PeakMeasuredValueWindow | 0x0004 | -| * AverageMeasuredValue | 0x0005 | -| * AverageMeasuredValueWindow | 0x0006 | -| * Uncertainty | 0x0007 | -| * MeasurementUnit | 0x0008 | -| * MeasurementMedium | 0x0009 | -| * LevelValue | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute HoldTime + */ +class ReadOccupancySensingHoldTime : public ReadAttribute { +public: + ReadOccupancySensingHoldTime() + : ReadAttribute("hold-time") + { + } + + ~ReadOccupancySensingHoldTime() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHoldTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.HoldTime response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OccupancySensing HoldTime read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; -/* - * Attribute MeasuredValue - */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public ReadAttribute { +class WriteOccupancySensingHoldTime : public WriteAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() - : ReadAttribute("measured-value") + WriteOccupancySensingHoldTime() + : WriteAttribute("hold-time") { + AddArgument("attr-name", "hold-time"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + ~WriteOccupancySensingHoldTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeHoldTimeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing HoldTime write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint16_t mValue; }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingHoldTime : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeOccupancySensingHoldTime() + : SubscribeAttribute("hold-time") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeOccupancySensingHoldTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144409,10 +127305,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeHoldTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.HoldTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144425,35 +127321,38 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MinMeasuredValue + * Attribute HoldTimeLimits */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOccupancySensingHoldTimeLimits : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOccupancySensingHoldTimeLimits() + : ReadAttribute("hold-time-limits") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + ~ReadOccupancySensingHoldTimeLimits() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHoldTimeLimitsWithCompletion:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("OccupancySensing HoldTimeLimits read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144462,25 +127361,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingHoldTimeLimits : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeOccupancySensingHoldTimeLimits() + : SubscribeAttribute("hold-time-limits") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeOccupancySensingHoldTimeLimits() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::HoldTimeLimits::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144491,10 +127390,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeHoldTimeLimitsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(MTROccupancySensingClusterHoldTimeLimitsStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.HoldTimeLimits response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144507,35 +127406,37 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMin } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxMeasuredValue + * Attribute PIROccupiedToUnoccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOccupancySensingPIROccupiedToUnoccupiedDelay() + : ReadAttribute("piroccupied-to-unoccupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144544,25 +127445,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteOccupancySensingPIROccupiedToUnoccupiedDelay() + : WriteAttribute("piroccupied-to-unoccupied-delay") { + AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePIROccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + : SubscribeAttribute("piroccupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIROccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144573,10 +127515,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144590,34 +127532,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMax }; /* - * Attribute PeakMeasuredValue + * Attribute PIRUnoccupiedToOccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : ReadAttribute("peak-measured-value") + ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() + : ReadAttribute("pirunoccupied-to-occupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144626,25 +127568,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() - : SubscribeAttribute("peak-measured-value") + WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() + : WriteAttribute("pirunoccupied-to-occupied-delay") { + AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + : SubscribeAttribute("pirunoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144655,10 +127638,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144672,34 +127655,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea }; /* - * Attribute PeakMeasuredValueWindow + * Attribute PIRUnoccupiedToOccupiedThreshold */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : ReadAttribute("peak-measured-value-window") + ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : ReadAttribute("pirunoccupied-to-occupied-threshold") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144708,25 +127691,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() - : SubscribeAttribute("peak-measured-value-window") + WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : WriteAttribute("pirunoccupied-to-occupied-threshold") { + AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PIRUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144737,10 +127761,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144754,34 +127778,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPea }; /* - * Attribute AverageMeasuredValue + * Attribute UltrasonicOccupiedToUnoccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : ReadAttribute("average-measured-value") + ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144790,25 +127814,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() - : SubscribeAttribute("average-measured-value") + WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144819,10 +127884,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWithParams:params + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144836,34 +127901,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve }; /* - * Attribute AverageMeasuredValueWindow + * Attribute UltrasonicUnoccupiedToOccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : ReadAttribute("average-measured-value-window") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144872,25 +127937,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredVa } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() - : SubscribeAttribute("average-measured-value-window") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144901,10 +128007,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -144918,34 +128024,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAve }; /* - * Attribute Uncertainty + * Attribute UltrasonicUnoccupiedToOccupiedThreshold */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : ReadAttribute("uncertainty") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -144954,25 +128060,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : pub } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() - : SubscribeAttribute("uncertainty") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -144983,10 +128130,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUncertaintyWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145000,34 +128147,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUnc }; /* - * Attribute MeasurementUnit + * Attribute PhysicalContactOccupiedToUnoccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : ReadAttribute("measurement-unit") + ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145036,25 +128183,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() - : SubscribeAttribute("measurement-unit") + WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145065,10 +128253,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementUnitWithParams:params + [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145082,34 +128270,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea }; /* - * Attribute MeasurementMedium + * Attribute PhysicalContactUnoccupiedToOccupiedDelay */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : ReadAttribute("measurement-medium") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145118,25 +128306,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() - : SubscribeAttribute("measurement-medium") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedDelay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145147,10 +128376,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementMediumWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145164,34 +128393,34 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMea }; /* - * Attribute LevelValue + * Attribute PhysicalContactUnoccupiedToOccupiedThreshold */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : ReadAttribute("level-value") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145200,25 +128429,66 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() - : SubscribeAttribute("level-value") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145229,10 +128499,10 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLevelValueWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145248,32 +128518,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLev /* * Attribute GeneratedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ReadOccupancySensingGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ~ReadOccupancySensingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("OccupancySensing GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145282,25 +128552,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandL } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + SubscribeAttributeOccupancySensingGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeOccupancySensingGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145314,7 +128584,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145330,32 +128600,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGen /* * Attribute AcceptedCommandList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ReadOccupancySensingAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ~ReadOccupancySensingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("OccupancySensing AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145364,25 +128634,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandLi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + SubscribeAttributeOccupancySensingAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeOccupancySensingAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145396,7 +128666,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145414,32 +128684,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcc /* * Attribute EventList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public ReadAttribute { +class ReadOccupancySensingEventList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ReadOccupancySensingEventList() : ReadAttribute("event-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ~ReadOccupancySensingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"OccupancySensing.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); + LogNSError("OccupancySensing EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145448,25 +128718,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : publi } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + SubscribeAttributeOccupancySensingEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + ~SubscribeAttributeOccupancySensingEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145480,7 +128750,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"OccupancySensing.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145498,32 +128768,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEve /* * Attribute AttributeList */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingAttributeList : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ReadOccupancySensingAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ~ReadOccupancySensingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145532,25 +128802,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : p } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + SubscribeAttributeOccupancySensingAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + ~SubscribeAttributeOccupancySensingAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145564,7 +128834,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145580,32 +128850,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAtt /* * Attribute FeatureMap */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingFeatureMap : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ReadOccupancySensingFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ~ReadOccupancySensingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145614,25 +128884,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : publ } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + SubscribeAttributeOccupancySensingFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + ~SubscribeAttributeOccupancySensingFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145646,7 +128916,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145662,32 +128932,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFea /* * Attribute ClusterRevision */ -class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingClusterRevision : public ReadAttribute { public: - ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ReadOccupancySensingClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ~ReadOccupancySensingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145696,25 +128966,25 @@ class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : } }; -class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + SubscribeAttributeOccupancySensingClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + ~SubscribeAttributeOccupancySensingClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OccupancySensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OccupancySensing::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145728,7 +128998,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145742,7 +129012,7 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu }; /*----------------------------------------------------------------------------*\ -| Cluster RadonConcentrationMeasurement | 0x042F | +| Cluster CarbonMonoxideConcentrationMeasurement | 0x040C | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| @@ -145771,32 +129041,32 @@ class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClu /* * Attribute MeasuredValue */ -class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasuredValue() + ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() : ReadAttribute("measured-value") { } - ~ReadRadonConcentrationMeasurementMeasuredValue() + ~ReadCarbonMonoxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145805,25 +129075,25 @@ class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145837,7 +129107,7 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145853,32 +129123,32 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public Subs /* * Attribute MinMeasuredValue */ -class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMinMeasuredValue() + ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() : ReadAttribute("min-measured-value") { } - ~ReadRadonConcentrationMeasurementMinMeasuredValue() + ~ReadCarbonMonoxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145887,25 +129157,25 @@ class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -145919,7 +129189,7 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -145935,32 +129205,32 @@ class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public S /* * Attribute MaxMeasuredValue */ -class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMaxMeasuredValue() + ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() : ReadAttribute("max-measured-value") { } - ~ReadRadonConcentrationMeasurementMaxMeasuredValue() + ~ReadCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -145969,25 +129239,25 @@ class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146001,7 +129271,7 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146017,32 +129287,32 @@ class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public S /* * Attribute PeakMeasuredValue */ -class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementPeakMeasuredValue() + ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() : ReadAttribute("peak-measured-value") { } - ~ReadRadonConcentrationMeasurementPeakMeasuredValue() + ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146051,25 +129321,25 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute } }; -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146083,7 +129353,7 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146099,32 +129369,32 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public /* * Attribute PeakMeasuredValueWindow */ -class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() + ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() : ReadAttribute("peak-measured-value-window") { } - ~ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() + ~ReadCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146133,25 +129403,25 @@ class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttr } }; -class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146165,7 +129435,7 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146181,32 +129451,32 @@ class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : p /* * Attribute AverageMeasuredValue */ -class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValue() + ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() : ReadAttribute("average-measured-value") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValue() + ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146215,25 +129485,25 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribu } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146247,7 +129517,7 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146263,32 +129533,32 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : publ /* * Attribute AverageMeasuredValueWindow */ -class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() + ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() : ReadAttribute("average-measured-value-window") { } - ~ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() + ~ReadCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146297,25 +129567,25 @@ class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadA } }; -class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146329,7 +129599,7 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146345,32 +129615,32 @@ class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow /* * Attribute Uncertainty */ -class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadRadonConcentrationMeasurementUncertainty() + ReadCarbonMonoxideConcentrationMeasurementUncertainty() : ReadAttribute("uncertainty") { } - ~ReadRadonConcentrationMeasurementUncertainty() + ~ReadCarbonMonoxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146379,25 +129649,25 @@ class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementUncertainty() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeRadonConcentrationMeasurementUncertainty() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146411,7 +129681,7 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146427,32 +129697,32 @@ class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public Subscr /* * Attribute MeasurementUnit */ -class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementUnit() + ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() : ReadAttribute("measurement-unit") { } - ~ReadRadonConcentrationMeasurementMeasurementUnit() + ~ReadCarbonMonoxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146461,25 +129731,25 @@ class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146493,7 +129763,7 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146509,32 +129779,32 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public Su /* * Attribute MeasurementMedium */ -class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadRadonConcentrationMeasurementMeasurementMedium() + ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() : ReadAttribute("measurement-medium") { } - ~ReadRadonConcentrationMeasurementMeasurementMedium() + ~ReadCarbonMonoxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146543,25 +129813,25 @@ class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute } }; -class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146575,7 +129845,7 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146591,32 +129861,32 @@ class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public /* * Attribute LevelValue */ -class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementLevelValue() + ReadCarbonMonoxideConcentrationMeasurementLevelValue() : ReadAttribute("level-value") { } - ~ReadRadonConcentrationMeasurementLevelValue() + ~ReadCarbonMonoxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146625,25 +129895,25 @@ class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementLevelValue() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() : SubscribeAttribute("level-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementLevelValue() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146657,7 +129927,7 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146673,32 +129943,32 @@ class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public Subscri /* * Attribute GeneratedCommandList */ -class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementGeneratedCommandList() + ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRadonConcentrationMeasurementGeneratedCommandList() + ~ReadCarbonMonoxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146707,25 +129977,25 @@ class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146739,7 +130009,7 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146755,32 +130025,32 @@ class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : publ /* * Attribute AcceptedCommandList */ -class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAcceptedCommandList() + ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRadonConcentrationMeasurementAcceptedCommandList() + ~ReadCarbonMonoxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146789,25 +130059,25 @@ class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146821,7 +130091,7 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146839,32 +130109,32 @@ class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : publi /* * Attribute EventList */ -class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementEventList() + ReadCarbonMonoxideConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadRadonConcentrationMeasurementEventList() + ~ReadCarbonMonoxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement EventList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146873,25 +130143,25 @@ class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementEventList() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementEventList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146905,7 +130175,7 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -146923,32 +130193,32 @@ class SubscribeAttributeRadonConcentrationMeasurementEventList : public Subscrib /* * Attribute AttributeList */ -class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { +class ReadCarbonMonoxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadRadonConcentrationMeasurementAttributeList() + ReadCarbonMonoxideConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRadonConcentrationMeasurementAttributeList() + ~ReadCarbonMonoxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); + LogNSError("CarbonMonoxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -146957,25 +130227,189 @@ class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementAttributeList() + SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRadonConcentrationMeasurementAttributeList() + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::AttributeList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadCarbonMonoxideConcentrationMeasurementFeatureMap : public ReadAttribute { +public: + ReadCarbonMonoxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadCarbonMonoxideConcentrationMeasurementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("CarbonMonoxideConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::FeatureMap::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadCarbonMonoxideConcentrationMeasurementClusterRevision : public ReadAttribute { +public: + ReadCarbonMonoxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadCarbonMonoxideConcentrationMeasurementClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("CarbonMonoxideConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeCarbonMonoxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonMonoxideConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonMonoxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -146986,10 +130420,10 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonMonoxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147002,35 +130436,62 @@ class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster CarbonDioxideConcentrationMeasurement | 0x040D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute FeatureMap + * Attribute MeasuredValue */ -class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadCarbonDioxideConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadRadonConcentrationMeasurementFeatureMap() + ~ReadCarbonDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147039,25 +130500,25 @@ class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementFeatureMap() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147068,10 +130529,10 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147085,34 +130546,34 @@ class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public Subscri }; /* - * Attribute ClusterRevision + * Attribute MinMeasuredValue */ -class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadRadonConcentrationMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadRadonConcentrationMeasurementClusterRevision() + ~ReadCarbonDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147121,25 +130582,25 @@ class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeRadonConcentrationMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeRadonConcentrationMeasurementClusterRevision() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147150,10 +130611,10 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147166,110 +130627,35 @@ class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public Su } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster WiFiNetworkManagement | 0x0451 | -|------------------------------------------------------------------------------| -| Commands: | | -| * NetworkPassphraseRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Ssid | 0x0000 | -| * PassphraseSurrogate | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command NetworkPassphraseRequest - */ -class WiFiNetworkManagementNetworkPassphraseRequest : public ClusterCommand { -public: - WiFiNetworkManagementNetworkPassphraseRequest() - : ClusterCommand("network-passphrase-request") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster networkPassphraseRequestWithParams:params completion: - ^(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Ssid + * Attribute MaxMeasuredValue */ -class ReadWiFiNetworkManagementSsid : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadWiFiNetworkManagementSsid() - : ReadAttribute("ssid") + ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadWiFiNetworkManagementSsid() + ~ReadCarbonDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::Ssid::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.SSID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement SSID read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147278,25 +130664,25 @@ class ReadWiFiNetworkManagementSsid : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementSsid : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementSsid() - : SubscribeAttribute("ssid") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeWiFiNetworkManagementSsid() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::Ssid::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147307,10 +130693,10 @@ class SubscribeAttributeWiFiNetworkManagementSsid : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSSIDWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.SSID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147323,38 +130709,35 @@ class SubscribeAttributeWiFiNetworkManagementSsid : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PassphraseSurrogate + * Attribute PeakMeasuredValue */ -class ReadWiFiNetworkManagementPassphraseSurrogate : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadWiFiNetworkManagementPassphraseSurrogate() - : ReadAttribute("passphrase-surrogate") + ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadWiFiNetworkManagementPassphraseSurrogate() + ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::PassphraseSurrogate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePassphraseSurrogateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.PassphraseSurrogate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement PassphraseSurrogate read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147363,25 +130746,25 @@ class ReadWiFiNetworkManagementPassphraseSurrogate : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate() - : SubscribeAttribute("passphrase-surrogate") + SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::PassphraseSurrogate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147392,10 +130775,10 @@ class SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePassphraseSurrogateWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.PassphraseSurrogate response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147408,38 +130791,35 @@ class SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute PeakMeasuredValueWindow */ -class ReadWiFiNetworkManagementGeneratedCommandList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadWiFiNetworkManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadWiFiNetworkManagementGeneratedCommandList() + ~ReadCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement GeneratedCommandList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147448,25 +130828,25 @@ class ReadWiFiNetworkManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeWiFiNetworkManagementGeneratedCommandList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147477,10 +130857,10 @@ class SubscribeAttributeWiFiNetworkManagementGeneratedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147493,38 +130873,35 @@ class SubscribeAttributeWiFiNetworkManagementGeneratedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute AverageMeasuredValue */ -class ReadWiFiNetworkManagementAcceptedCommandList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadWiFiNetworkManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadWiFiNetworkManagementAcceptedCommandList() + ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement AcceptedCommandList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147533,25 +130910,25 @@ class ReadWiFiNetworkManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeWiFiNetworkManagementAcceptedCommandList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147562,10 +130939,10 @@ class SubscribeAttributeWiFiNetworkManagementAcceptedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147578,38 +130955,35 @@ class SubscribeAttributeWiFiNetworkManagementAcceptedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AverageMeasuredValueWindow */ -class ReadWiFiNetworkManagementEventList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadWiFiNetworkManagementEventList() - : ReadAttribute("event-list") + ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadWiFiNetworkManagementEventList() + ~ReadCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement EventList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147618,25 +130992,25 @@ class ReadWiFiNetworkManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementEventList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeWiFiNetworkManagementEventList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147647,10 +131021,10 @@ class SubscribeAttributeWiFiNetworkManagementEventList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147663,38 +131037,35 @@ class SubscribeAttributeWiFiNetworkManagementEventList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Uncertainty */ -class ReadWiFiNetworkManagementAttributeList : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadWiFiNetworkManagementAttributeList() - : ReadAttribute("attribute-list") + ReadCarbonDioxideConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadWiFiNetworkManagementAttributeList() + ~ReadCarbonDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement AttributeList read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147703,25 +131074,25 @@ class ReadWiFiNetworkManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeWiFiNetworkManagementAttributeList() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147732,10 +131103,10 @@ class SubscribeAttributeWiFiNetworkManagementAttributeList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147748,38 +131119,35 @@ class SubscribeAttributeWiFiNetworkManagementAttributeList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute MeasurementUnit */ -class ReadWiFiNetworkManagementFeatureMap : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadWiFiNetworkManagementFeatureMap() - : ReadAttribute("feature-map") + ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadWiFiNetworkManagementFeatureMap() + ~ReadCarbonDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement FeatureMap read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147788,25 +131156,25 @@ class ReadWiFiNetworkManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeWiFiNetworkManagementFeatureMap() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147817,10 +131185,10 @@ class SubscribeAttributeWiFiNetworkManagementFeatureMap : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.FeatureMap response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147833,38 +131201,35 @@ class SubscribeAttributeWiFiNetworkManagementFeatureMap : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute MeasurementMedium */ -class ReadWiFiNetworkManagementClusterRevision : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadWiFiNetworkManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadWiFiNetworkManagementClusterRevision() + ~ReadCarbonDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkManagement ClusterRevision read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -147873,25 +131238,25 @@ class ReadWiFiNetworkManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeWiFiNetworkManagementClusterRevision() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -147902,10 +131267,10 @@ class SubscribeAttributeWiFiNetworkManagementClusterRevision : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkManagement.ClusterRevision response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -147918,287 +131283,117 @@ class SubscribeAttributeWiFiNetworkManagementClusterRevision : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ThreadBorderRouterManagement | 0x0452 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetActiveDatasetRequest | 0x00 | -| * GetPendingDatasetRequest | 0x01 | -| * SetActiveDatasetRequest | 0x03 | -| * SetPendingDatasetRequest | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BorderRouterName | 0x0000 | -| * BorderAgentID | 0x0001 | -| * ThreadVersion | 0x0002 | -| * InterfaceEnabled | 0x0003 | -| * ActiveDatasetTimestamp | 0x0004 | -| * PendingDatasetTimestamp | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL /* - * Command GetActiveDatasetRequest + * Attribute LevelValue */ -class ThreadBorderRouterManagementGetActiveDatasetRequest : public ClusterCommand { +class ReadCarbonDioxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ThreadBorderRouterManagementGetActiveDatasetRequest() - : ClusterCommand("get-active-dataset-request") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadCarbonDioxideConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getActiveDatasetRequestWithParams:params completion: - ^(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetPendingDatasetRequest - */ -class ThreadBorderRouterManagementGetPendingDatasetRequest : public ClusterCommand { -public: - ThreadBorderRouterManagementGetPendingDatasetRequest() - : ClusterCommand("get-pending-dataset-request") + ~ReadCarbonDioxideConcentrationMeasurementLevelValue() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getPendingDatasetRequestWithParams:params completion: - ^(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("CarbonDioxideConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetActiveDatasetRequest - */ -class ThreadBorderRouterManagementSetActiveDatasetRequest : public ClusterCommand { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - ThreadBorderRouterManagementSetActiveDatasetRequest() - : ClusterCommand("set-active-dataset-request") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ActiveDataset", &mRequest.activeDataset); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.activeDataset = [NSData dataWithBytes:mRequest.activeDataset.data() length:mRequest.activeDataset.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setActiveDatasetRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetPendingDatasetRequest - */ -class ThreadBorderRouterManagementSetPendingDatasetRequest : public ClusterCommand { -public: - ThreadBorderRouterManagementSetPendingDatasetRequest() - : ClusterCommand("set-pending-dataset-request") + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementLevelValue() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("PendingDataset", &mRequest.pendingDataset); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::LevelValue::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.pendingDataset = [NSData dataWithBytes:mRequest.pendingDataset.data() length:mRequest.pendingDataset.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setPendingDatasetRequestWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLevelValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute BorderRouterName + * Attribute GeneratedCommandList */ -class ReadThreadBorderRouterManagementBorderRouterName : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadThreadBorderRouterManagementBorderRouterName() - : ReadAttribute("border-router-name") + ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadBorderRouterManagementBorderRouterName() + ~ReadCarbonDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderRouterName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBorderRouterNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.BorderRouterName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement BorderRouterName read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148207,25 +131402,25 @@ class ReadThreadBorderRouterManagementBorderRouterName : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementBorderRouterName : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementBorderRouterName() - : SubscribeAttribute("border-router-name") + SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadBorderRouterManagementBorderRouterName() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderRouterName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148236,10 +131431,10 @@ class SubscribeAttributeThreadBorderRouterManagementBorderRouterName : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBorderRouterNameWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.BorderRouterName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148252,38 +131447,35 @@ class SubscribeAttributeThreadBorderRouterManagementBorderRouterName : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute BorderAgentID + * Attribute AcceptedCommandList */ -class ReadThreadBorderRouterManagementBorderAgentID : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadThreadBorderRouterManagementBorderAgentID() - : ReadAttribute("border-agent-id") + ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadBorderRouterManagementBorderAgentID() + ~ReadCarbonDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderAgentID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBorderAgentIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.BorderAgentID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement BorderAgentID read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148292,25 +131484,25 @@ class ReadThreadBorderRouterManagementBorderAgentID : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementBorderAgentID : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementBorderAgentID() - : SubscribeAttribute("border-agent-id") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadBorderRouterManagementBorderAgentID() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderAgentID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148321,10 +131513,10 @@ class SubscribeAttributeThreadBorderRouterManagementBorderAgentID : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBorderAgentIDWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.BorderAgentID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148337,38 +131529,37 @@ class SubscribeAttributeThreadBorderRouterManagementBorderAgentID : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute ThreadVersion + * Attribute EventList */ -class ReadThreadBorderRouterManagementThreadVersion : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadThreadBorderRouterManagementThreadVersion() - : ReadAttribute("thread-version") + ReadCarbonDioxideConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadThreadBorderRouterManagementThreadVersion() + ~ReadCarbonDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ThreadVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement ThreadVersion read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148377,25 +131568,25 @@ class ReadThreadBorderRouterManagementThreadVersion : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementThreadVersion : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementThreadVersion() - : SubscribeAttribute("thread-version") + SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadBorderRouterManagementThreadVersion() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148406,10 +131597,10 @@ class SubscribeAttributeThreadBorderRouterManagementThreadVersion : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadVersionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ThreadVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148423,37 +131614,36 @@ class SubscribeAttributeThreadBorderRouterManagementThreadVersion : public Subsc }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute InterfaceEnabled + * Attribute AttributeList */ -class ReadThreadBorderRouterManagementInterfaceEnabled : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadThreadBorderRouterManagementInterfaceEnabled() - : ReadAttribute("interface-enabled") + ReadCarbonDioxideConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadBorderRouterManagementInterfaceEnabled() + ~ReadCarbonDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.InterfaceEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement InterfaceEnabled read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148462,25 +131652,25 @@ class ReadThreadBorderRouterManagementInterfaceEnabled : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled() - : SubscribeAttribute("interface-enabled") + SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148491,10 +131681,10 @@ class SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterfaceEnabledWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.InterfaceEnabled response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148507,38 +131697,35 @@ class SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ActiveDatasetTimestamp + * Attribute FeatureMap */ -class ReadThreadBorderRouterManagementActiveDatasetTimestamp : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadThreadBorderRouterManagementActiveDatasetTimestamp() - : ReadAttribute("active-dataset-timestamp") + ReadCarbonDioxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadBorderRouterManagementActiveDatasetTimestamp() + ~ReadCarbonDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveDatasetTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ActiveDatasetTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement ActiveDatasetTimestamp read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148547,25 +131734,25 @@ class ReadThreadBorderRouterManagementActiveDatasetTimestamp : public ReadAttrib } }; -class SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp() - : SubscribeAttribute("active-dataset-timestamp") + SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148576,10 +131763,10 @@ class SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveDatasetTimestampWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ActiveDatasetTimestamp response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148592,38 +131779,35 @@ class SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp : pub } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PendingDatasetTimestamp + * Attribute ClusterRevision */ -class ReadThreadBorderRouterManagementPendingDatasetTimestamp : public ReadAttribute { +class ReadCarbonDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadThreadBorderRouterManagementPendingDatasetTimestamp() - : ReadAttribute("pending-dataset-timestamp") + ReadCarbonDioxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThreadBorderRouterManagementPendingDatasetTimestamp() + ~ReadCarbonDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePendingDatasetTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.PendingDatasetTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement PendingDatasetTimestamp read Error", error); + LogNSError("CarbonDioxideConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148632,25 +131816,25 @@ class ReadThreadBorderRouterManagementPendingDatasetTimestamp : public ReadAttri } }; -class SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp : public SubscribeAttribute { +class SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp() - : SubscribeAttribute("pending-dataset-timestamp") + SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp() + ~SubscribeAttributeCarbonDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CarbonDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCarbonDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148661,10 +131845,10 @@ class SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePendingDatasetTimestampWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.PendingDatasetTimestamp response %@", [value description]); + NSLog(@"CarbonDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148677,38 +131861,62 @@ class SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp : pu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster NitrogenDioxideConcentrationMeasurement | 0x0413 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute GeneratedCommandList + * Attribute MeasuredValue */ -class ReadThreadBorderRouterManagementGeneratedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadThreadBorderRouterManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadThreadBorderRouterManagementGeneratedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement GeneratedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148717,25 +131925,25 @@ class ReadThreadBorderRouterManagementGeneratedCommandList : public ReadAttribut } }; -class SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148746,10 +131954,10 @@ class SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148762,38 +131970,35 @@ class SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList : publi } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute MinMeasuredValue */ -class ReadThreadBorderRouterManagementAcceptedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadThreadBorderRouterManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadThreadBorderRouterManagementAcceptedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement AcceptedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148802,25 +132007,25 @@ class ReadThreadBorderRouterManagementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148831,10 +132036,10 @@ class SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148847,38 +132052,35 @@ class SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxMeasuredValue */ -class ReadThreadBorderRouterManagementEventList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadThreadBorderRouterManagementEventList() - : ReadAttribute("event-list") + ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadThreadBorderRouterManagementEventList() + ~ReadNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement EventList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148887,25 +132089,25 @@ class ReadThreadBorderRouterManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementEventList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeThreadBorderRouterManagementEventList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -148916,10 +132118,10 @@ class SubscribeAttributeThreadBorderRouterManagementEventList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -148932,38 +132134,35 @@ class SubscribeAttributeThreadBorderRouterManagementEventList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute PeakMeasuredValue */ -class ReadThreadBorderRouterManagementAttributeList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadThreadBorderRouterManagementAttributeList() - : ReadAttribute("attribute-list") + ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadThreadBorderRouterManagementAttributeList() + ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement AttributeList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -148972,25 +132171,25 @@ class ReadThreadBorderRouterManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeThreadBorderRouterManagementAttributeList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149001,10 +132200,10 @@ class SubscribeAttributeThreadBorderRouterManagementAttributeList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149017,38 +132216,35 @@ class SubscribeAttributeThreadBorderRouterManagementAttributeList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute PeakMeasuredValueWindow */ -class ReadThreadBorderRouterManagementFeatureMap : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadThreadBorderRouterManagementFeatureMap() - : ReadAttribute("feature-map") + ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadThreadBorderRouterManagementFeatureMap() + ~ReadNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement FeatureMap read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149057,25 +132253,25 @@ class ReadThreadBorderRouterManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeThreadBorderRouterManagementFeatureMap() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149086,10 +132282,10 @@ class SubscribeAttributeThreadBorderRouterManagementFeatureMap : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.FeatureMap response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149102,38 +132298,35 @@ class SubscribeAttributeThreadBorderRouterManagementFeatureMap : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute AverageMeasuredValue */ -class ReadThreadBorderRouterManagementClusterRevision : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadThreadBorderRouterManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadThreadBorderRouterManagementClusterRevision() + ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadBorderRouterManagement ClusterRevision read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149142,25 +132335,25 @@ class ReadThreadBorderRouterManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThreadBorderRouterManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeThreadBorderRouterManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeThreadBorderRouterManagementClusterRevision() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149171,10 +132364,10 @@ class SubscribeAttributeThreadBorderRouterManagementClusterRevision : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadBorderRouterManagement.ClusterRevision response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149187,299 +132380,144 @@ class SubscribeAttributeThreadBorderRouterManagementClusterRevision : public Sub } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ThreadNetworkDirectory | 0x0453 | -|------------------------------------------------------------------------------| -| Commands: | | -| * AddNetwork | 0x00 | -| * RemoveNetwork | 0x01 | -| * GetOperationalDataset | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PreferredExtendedPanID | 0x0000 | -| * ThreadNetworks | 0x0001 | -| * ThreadNetworkTableSize | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL /* - * Command AddNetwork + * Attribute AverageMeasuredValueWindow */ -class ThreadNetworkDirectoryAddNetwork : public ClusterCommand { +class ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ThreadNetworkDirectoryAddNetwork() - : ClusterCommand("add-network") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("OperationalDataset", &mRequest.operationalDataset); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::AddNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadNetworkDirectoryClusterAddNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addNetworkWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ThreadNetworkDirectory::Commands::AddNetwork::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command RemoveNetwork - */ -class ThreadNetworkDirectoryRemoveNetwork : public ClusterCommand { -public: - ThreadNetworkDirectoryRemoveNetwork() - : ClusterCommand("remove-network") + ~ReadNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExtendedPanID", &mRequest.extendedPanID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::RemoveNetwork::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadNetworkDirectoryClusterRemoveNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.extendedPanID = [NSData dataWithBytes:mRequest.extendedPanID.data() length:mRequest.extendedPanID.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeNetworkWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("NitrogenDioxideConcentrationMeasurement AverageMeasuredValueWindow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ThreadNetworkDirectory::Commands::RemoveNetwork::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetOperationalDataset - */ -class ThreadNetworkDirectoryGetOperationalDataset : public ClusterCommand { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - ThreadNetworkDirectoryGetOperationalDataset() - : ClusterCommand("get-operational-dataset") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExtendedPanID", &mRequest.extendedPanID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAverageMeasuredValueWindow() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::GetOperationalDataset::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.extendedPanID = [NSData dataWithBytes:mRequest.extendedPanID.data() length:mRequest.extendedPanID.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getOperationalDatasetWithParams:params completion: - ^(MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadNetworkDirectory::Commands::OperationalDatasetResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ThreadNetworkDirectory::Commands::OperationalDatasetResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ThreadNetworkDirectory::Commands::GetOperationalDataset::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PreferredExtendedPanID + * Attribute Uncertainty */ -class ReadThreadNetworkDirectoryPreferredExtendedPanID : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadThreadNetworkDirectoryPreferredExtendedPanID() - : ReadAttribute("preferred-extended-pan-id") + ReadNitrogenDioxideConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadThreadNetworkDirectoryPreferredExtendedPanID() + ~ReadNitrogenDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePreferredExtendedPanIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.PreferredExtendedPanID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory PreferredExtendedPanID read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThreadNetworkDirectoryPreferredExtendedPanID : public WriteAttribute { -public: - WriteThreadNetworkDirectoryPreferredExtendedPanID() - : WriteAttribute("preferred-extended-pan-id") - { - AddArgument("attr-name", "preferred-extended-pan-id"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThreadNetworkDirectoryPreferredExtendedPanID() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSData * _Nullable value = nil; - if (!mValue.IsNull()) { - value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; - } - - [cluster writeAttributePreferredExtendedPanIDWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThreadNetworkDirectory PreferredExtendedPanID write Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID() - : SubscribeAttribute("preferred-extended-pan-id") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149490,10 +132528,10 @@ class SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePreferredExtendedPanIDWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.PreferredExtendedPanID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149506,38 +132544,35 @@ class SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ThreadNetworks + * Attribute MeasurementUnit */ -class ReadThreadNetworkDirectoryThreadNetworks : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadThreadNetworkDirectoryThreadNetworks() - : ReadAttribute("thread-networks") + ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadThreadNetworkDirectoryThreadNetworks() + ~ReadNitrogenDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ThreadNetworks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory ThreadNetworks read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149546,25 +132581,25 @@ class ReadThreadNetworkDirectoryThreadNetworks : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryThreadNetworks : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryThreadNetworks() - : SubscribeAttribute("thread-networks") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeThreadNetworkDirectoryThreadNetworks() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149575,10 +132610,10 @@ class SubscribeAttributeThreadNetworkDirectoryThreadNetworks : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadNetworksWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ThreadNetworks response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149591,38 +132626,35 @@ class SubscribeAttributeThreadNetworkDirectoryThreadNetworks : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ThreadNetworkTableSize + * Attribute MeasurementMedium */ -class ReadThreadNetworkDirectoryThreadNetworkTableSize : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadThreadNetworkDirectoryThreadNetworkTableSize() - : ReadAttribute("thread-network-table-size") + ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadThreadNetworkDirectoryThreadNetworkTableSize() + ~ReadNitrogenDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadNetworkTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ThreadNetworkTableSize response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory ThreadNetworkTableSize read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149631,25 +132663,25 @@ class ReadThreadNetworkDirectoryThreadNetworkTableSize : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize() - : SubscribeAttribute("thread-network-table-size") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149660,10 +132692,10 @@ class SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadNetworkTableSizeWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ThreadNetworkTableSize response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149676,38 +132708,35 @@ class SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute LevelValue */ -class ReadThreadNetworkDirectoryGeneratedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadThreadNetworkDirectoryGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadNitrogenDioxideConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadThreadNetworkDirectoryGeneratedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory GeneratedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149716,25 +132745,25 @@ class ReadThreadNetworkDirectoryGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149745,10 +132774,10 @@ class SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149761,38 +132790,35 @@ class SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDirectoryAcceptedCommandList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDirectoryAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDirectoryAcceptedCommandList() + ~ReadNitrogenDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory AcceptedCommandList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149801,25 +132827,25 @@ class ReadThreadNetworkDirectoryAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149830,10 +132856,10 @@ class SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.AcceptedCommandList response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149846,38 +132872,35 @@ class SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDirectoryEventList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDirectoryEventList() - : ReadAttribute("event-list") + ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDirectoryEventList() + ~ReadNitrogenDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory EventList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149886,25 +132909,25 @@ class ReadThreadNetworkDirectoryEventList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryEventList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDirectoryEventList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -149915,10 +132938,10 @@ class SubscribeAttributeThreadNetworkDirectoryEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.EventList response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -149931,38 +132954,37 @@ class SubscribeAttributeThreadNetworkDirectoryEventList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute EventList */ -class ReadThreadNetworkDirectoryAttributeList : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementEventList : public ReadAttribute { public: - ReadThreadNetworkDirectoryAttributeList() - : ReadAttribute("attribute-list") + ReadNitrogenDioxideConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDirectoryAttributeList() + ~ReadNitrogenDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory AttributeList read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -149971,25 +132993,25 @@ class ReadThreadNetworkDirectoryAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryAttributeList : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDirectoryAttributeList() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150000,10 +133022,10 @@ class SubscribeAttributeThreadNetworkDirectoryAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.AttributeList response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150017,37 +133039,36 @@ class SubscribeAttributeThreadNetworkDirectoryAttributeList : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AttributeList */ -class ReadThreadNetworkDirectoryFeatureMap : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadThreadNetworkDirectoryFeatureMap() - : ReadAttribute("feature-map") + ReadNitrogenDioxideConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadNetworkDirectoryFeatureMap() + ~ReadNitrogenDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory FeatureMap read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150056,25 +133077,25 @@ class ReadThreadNetworkDirectoryFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryFeatureMap : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadNetworkDirectoryFeatureMap() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150085,10 +133106,10 @@ class SubscribeAttributeThreadNetworkDirectoryFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150101,38 +133122,35 @@ class SubscribeAttributeThreadNetworkDirectoryFeatureMap : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute FeatureMap */ -class ReadThreadNetworkDirectoryClusterRevision : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadThreadNetworkDirectoryClusterRevision() - : ReadAttribute("cluster-revision") + ReadNitrogenDioxideConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadNetworkDirectoryClusterRevision() + ~ReadNitrogenDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDirectory ClusterRevision read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150141,25 +133159,25 @@ class ReadThreadNetworkDirectoryClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDirectoryClusterRevision : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDirectoryClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadNetworkDirectoryClusterRevision() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150170,10 +133188,10 @@ class SubscribeAttributeThreadNetworkDirectoryClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDirectory.ClusterRevision response %@", [value description]); + NSLog(@"NitrogenDioxideConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150186,55 +133204,35 @@ class SubscribeAttributeThreadNetworkDirectoryClusterRevision : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster WakeOnLan | 0x0503 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MACAddress | 0x0000 | -| * LinkLocalAddress | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MACAddress + * Attribute ClusterRevision */ -class ReadWakeOnLanMACAddress : public ReadAttribute { +class ReadNitrogenDioxideConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadWakeOnLanMACAddress() - : ReadAttribute("macaddress") + ReadNitrogenDioxideConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadWakeOnLanMACAddress() + ~ReadNitrogenDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN MACAddress read Error", error); + LogNSError("NitrogenDioxideConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150243,25 +133241,25 @@ class ReadWakeOnLanMACAddress : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { +class SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanMACAddress() - : SubscribeAttribute("macaddress") + SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWakeOnLanMACAddress() + ~SubscribeAttributeNitrogenDioxideConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NitrogenDioxideConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNitrogenDioxideConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150272,10 +133270,10 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMACAddressWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NitrogenDioxideConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150288,37 +133286,62 @@ class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster OzoneConcentrationMeasurement | 0x0415 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute LinkLocalAddress + * Attribute MeasuredValue */ -class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadWakeOnLanLinkLocalAddress() - : ReadAttribute("link-local-address") + ReadOzoneConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadWakeOnLanLinkLocalAddress() + ~ReadOzoneConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLinkLocalAddressWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN LinkLocalAddress read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150327,25 +133350,25 @@ class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanLinkLocalAddress() - : SubscribeAttribute("link-local-address") + SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeWakeOnLanLinkLocalAddress() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150356,10 +133379,10 @@ class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLinkLocalAddressWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150372,37 +133395,35 @@ class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute MinMeasuredValue */ -class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadWakeOnLanGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOzoneConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadWakeOnLanGeneratedCommandList() + ~ReadOzoneConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150411,25 +133432,25 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeWakeOnLanGeneratedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150440,10 +133461,10 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150457,34 +133478,34 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut }; /* - * Attribute AcceptedCommandList + * Attribute MaxMeasuredValue */ -class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadWakeOnLanAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOzoneConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadWakeOnLanAcceptedCommandList() + ~ReadOzoneConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150493,25 +133514,25 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeWakeOnLanAcceptedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150522,10 +133543,10 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150538,37 +133559,35 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute PeakMeasuredValue */ -class ReadWakeOnLanEventList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadWakeOnLanEventList() - : ReadAttribute("event-list") + ReadOzoneConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadWakeOnLanEventList() + ~ReadOzoneConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN EventList read Error", error); + LogNSError("OzoneConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150577,25 +133596,25 @@ class ReadWakeOnLanEventList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeWakeOnLanEventList() + ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150606,10 +133625,10 @@ class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150622,37 +133641,35 @@ class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute PeakMeasuredValueWindow */ -class ReadWakeOnLanAttributeList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadWakeOnLanAttributeList() - : ReadAttribute("attribute-list") + ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadWakeOnLanAttributeList() + ~ReadOzoneConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN AttributeList read Error", error); + LogNSError("OzoneConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150661,25 +133678,25 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeWakeOnLanAttributeList() + ~SubscribeAttributeOzoneConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150690,10 +133707,10 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150707,34 +133724,34 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AverageMeasuredValue */ -class ReadWakeOnLanFeatureMap : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadWakeOnLanFeatureMap() - : ReadAttribute("feature-map") + ReadOzoneConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadWakeOnLanFeatureMap() + ~ReadOzoneConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN FeatureMap read Error", error); + LogNSError("OzoneConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150743,25 +133760,25 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeWakeOnLanFeatureMap() + ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150772,10 +133789,10 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150789,34 +133806,34 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute AverageMeasuredValueWindow */ -class ReadWakeOnLanClusterRevision : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadWakeOnLanClusterRevision() - : ReadAttribute("cluster-revision") + ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadWakeOnLanClusterRevision() + ~ReadOzoneConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WakeOnLAN ClusterRevision read Error", error); + LogNSError("OzoneConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -150825,25 +133842,25 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeWakeOnLanClusterRevision() + ~SubscribeAttributeOzoneConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -150854,10 +133871,10 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -150870,565 +133887,117 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster Channel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x02 | -| * SkipChannel | 0x03 | -| * GetProgramGuide | 0x04 | -| * RecordProgram | 0x06 | -| * CancelRecordProgram | 0x07 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * Lineup | 0x0001 | -| * CurrentChannel | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ChangeChannel + * Attribute Uncertainty */ -class ChannelChangeChannel : public ClusterCommand { +class ReadOzoneConcentrationMeasurementUncertainty : public ReadAttribute { public: - ChannelChangeChannel() - : ClusterCommand("change-channel") - { - AddArgument("Match", &mRequest.match); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadOzoneConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.match = [[NSString alloc] initWithBytes:mRequest.match.data() length:mRequest.match.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeChannelWithParams:params completion: - ^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; -}; - -/* - * Command ChangeChannelByNumber - */ -class ChannelChangeChannelByNumber : public ClusterCommand { -public: - ChannelChangeChannelByNumber() - : ClusterCommand("change-channel-by-number") + ~ReadOzoneConcentrationMeasurementUncertainty() { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; - params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeChannelByNumberWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OzoneConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; }; -/* - * Command SkipChannel - */ -class ChannelSkipChannel : public ClusterCommand { +class SubscribeAttributeOzoneConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - ChannelSkipChannel() - : ClusterCommand("skip-channel") - { - AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeOzoneConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.count = [NSNumber numberWithShort:mRequest.count]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipChannelWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; -}; - -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetProgramGuide - */ -class ChannelGetProgramGuide : public ClusterCommand { -public: - ChannelGetProgramGuide() - : ClusterCommand("get-program-guide") - , mComplex_ChannelList(&mRequest.channelList) - , mComplex_PageToken(&mRequest.pageToken) - , mComplex_ExternalIDList(&mRequest.externalIDList) + ~SubscribeAttributeOzoneConcentrationMeasurementUncertainty() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ChannelList", &mComplex_ChannelList); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PageToken", &mComplex_PageToken); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExternalIDList", &mComplex_ExternalIDList); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Data", &mRequest.data); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::GetProgramGuide::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::Uncertainty::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterGetProgramGuideParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.startTime.HasValue()) { - params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; - } else { - params.startTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.endTime.HasValue()) { - params.endTime = [NSNumber numberWithUnsignedInt:mRequest.endTime.Value()]; - } else { - params.endTime = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.channelList.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.channelList.Value()) { - MTRChannelClusterChannelInfoStruct * newElement_1; - newElement_1 = [MTRChannelClusterChannelInfoStruct new]; - newElement_1.majorNumber = [NSNumber numberWithUnsignedShort:entry_1.majorNumber]; - newElement_1.minorNumber = [NSNumber numberWithUnsignedShort:entry_1.minorNumber]; - if (entry_1.name.HasValue()) { - newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.Value().data() length:entry_1.name.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_1.name = nil; - } - if (entry_1.callSign.HasValue()) { - newElement_1.callSign = [[NSString alloc] initWithBytes:entry_1.callSign.Value().data() length:entry_1.callSign.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_1.callSign = nil; - } - if (entry_1.affiliateCallSign.HasValue()) { - newElement_1.affiliateCallSign = [[NSString alloc] initWithBytes:entry_1.affiliateCallSign.Value().data() length:entry_1.affiliateCallSign.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_1.affiliateCallSign = nil; - } - if (entry_1.identifier.HasValue()) { - newElement_1.identifier = [[NSString alloc] initWithBytes:entry_1.identifier.Value().data() length:entry_1.identifier.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_1.identifier = nil; - } - if (entry_1.type.HasValue()) { - newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type.Value())]; - } else { - newElement_1.type = nil; - } - [array_1 addObject:newElement_1]; - } - params.channelList = array_1; - } - } else { - params.channelList = nil; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.pageToken.HasValue()) { - params.pageToken = [MTRChannelClusterPageTokenStruct new]; - if (mRequest.pageToken.Value().limit.HasValue()) { - params.pageToken.limit = [NSNumber numberWithUnsignedShort:mRequest.pageToken.Value().limit.Value()]; - } else { - params.pageToken.limit = nil; - } - if (mRequest.pageToken.Value().after.HasValue()) { - params.pageToken.after = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().after.Value().data() length:mRequest.pageToken.Value().after.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.pageToken.after = nil; - } - if (mRequest.pageToken.Value().before.HasValue()) { - params.pageToken.before = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().before.Value().data() length:mRequest.pageToken.Value().before.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.pageToken.before = nil; - } - } else { - params.pageToken = nil; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.recordingFlag.HasValue()) { - params.recordingFlag = [NSNumber numberWithUnsignedInt:mRequest.recordingFlag.Value().Raw()]; - } else { - params.recordingFlag = nil; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.externalIDList.HasValue()) { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.externalIDList.Value()) { - MTRChannelClusterAdditionalInfoStruct * newElement_1; - newElement_1 = [MTRChannelClusterAdditionalInfoStruct new]; - newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.data() length:entry_1.name.size() encoding:NSUTF8StringEncoding]; - newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; - [array_1 addObject:newElement_1]; + [cluster subscribeAttributeUncertaintyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.externalIDList = array_1; - } - } else { - params.externalIDList = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.data.HasValue()) { - params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; - } else { - params.data = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getProgramGuideWithParams:params completion: - ^(MTRChannelClusterProgramGuideResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Channel::Commands::GetProgramGuide::Type mRequest; - TypedComplexArgument>> mComplex_ChannelList; - TypedComplexArgument> mComplex_PageToken; - TypedComplexArgument>> mComplex_ExternalIDList; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command RecordProgram - */ -class ChannelRecordProgram : public ClusterCommand { -public: - ChannelRecordProgram() - : ClusterCommand("record-program") - , mComplex_ExternalIDList(&mRequest.externalIDList) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ProgramIdentifier", &mRequest.programIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExternalIDList", &mComplex_ExternalIDList); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Data", &mRequest.data); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::RecordProgram::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterRecordProgramParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.externalIDList) { - MTRChannelClusterAdditionalInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - params.externalIDList = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster recordProgramWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Channel::Commands::RecordProgram::Type mRequest; - TypedComplexArgument> mComplex_ExternalIDList; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command CancelRecordProgram - */ -class ChannelCancelRecordProgram : public ClusterCommand { -public: - ChannelCancelRecordProgram() - : ClusterCommand("cancel-record-program") - , mComplex_ExternalIDList(&mRequest.externalIDList) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("ProgramIdentifier", &mRequest.programIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ExternalIDList", &mComplex_ExternalIDList); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Data", &mRequest.data); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::CancelRecordProgram::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + SetCommandExitStatus(error); + }]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterCancelRecordProgramParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.externalIDList) { - MTRChannelClusterAdditionalInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - params.externalIDList = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster cancelRecordProgramWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type mRequest; - TypedComplexArgument> mComplex_ExternalIDList; }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute ChannelList + * Attribute MeasurementUnit */ -class ReadChannelChannelList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadChannelChannelList() - : ReadAttribute("channel-list") + ReadOzoneConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadChannelChannelList() + ~ReadOzoneConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel ChannelList read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151437,25 +134006,25 @@ class ReadChannelChannelList : public ReadAttribute { } }; -class SubscribeAttributeChannelChannelList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeChannelChannelList() - : SubscribeAttribute("channel-list") + SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeChannelChannelList() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151466,10 +134035,10 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelListWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151483,34 +134052,34 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { }; /* - * Attribute Lineup + * Attribute MeasurementMedium */ -class ReadChannelLineup : public ReadAttribute { +class ReadOzoneConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadChannelLineup() - : ReadAttribute("lineup") + ReadOzoneConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadChannelLineup() + ~ReadOzoneConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel Lineup read Error", error); + LogNSError("OzoneConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151519,25 +134088,25 @@ class ReadChannelLineup : public ReadAttribute { } }; -class SubscribeAttributeChannelLineup : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeChannelLineup() - : SubscribeAttribute("lineup") + SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeChannelLineup() + ~SubscribeAttributeOzoneConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151548,10 +134117,10 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineupWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151565,34 +134134,34 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { }; /* - * Attribute CurrentChannel + * Attribute LevelValue */ -class ReadChannelCurrentChannel : public ReadAttribute { +class ReadOzoneConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadChannelCurrentChannel() - : ReadAttribute("current-channel") + ReadOzoneConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadChannelCurrentChannel() + ~ReadOzoneConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel CurrentChannel read Error", error); + LogNSError("OzoneConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151601,25 +134170,25 @@ class ReadChannelCurrentChannel : public ReadAttribute { } }; -class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeChannelCurrentChannel() - : SubscribeAttribute("current-channel") + SubscribeAttributeOzoneConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeChannelCurrentChannel() + ~SubscribeAttributeOzoneConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151630,10 +134199,10 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentChannelWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OzoneConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151649,32 +134218,32 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadChannelGeneratedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadChannelGeneratedCommandList() + ReadOzoneConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadChannelGeneratedCommandList() + ~ReadOzoneConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel GeneratedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151683,25 +134252,25 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeChannelGeneratedCommandList() + SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeChannelGeneratedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151715,7 +134284,7 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151731,32 +134300,32 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute /* * Attribute AcceptedCommandList */ -class ReadChannelAcceptedCommandList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadChannelAcceptedCommandList() + ReadOzoneConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadChannelAcceptedCommandList() + ~ReadOzoneConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel AcceptedCommandList read Error", error); + LogNSError("OzoneConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151765,25 +134334,25 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeChannelAcceptedCommandList() + SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeChannelAcceptedCommandList() + ~SubscribeAttributeOzoneConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151797,7 +134366,7 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151815,32 +134384,32 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadChannelEventList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementEventList : public ReadAttribute { public: - ReadChannelEventList() + ReadOzoneConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadChannelEventList() + ~ReadOzoneConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.EventList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel EventList read Error", error); + LogNSError("OzoneConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151849,25 +134418,25 @@ class ReadChannelEventList : public ReadAttribute { } }; -class SubscribeAttributeChannelEventList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeChannelEventList() + SubscribeAttributeOzoneConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeChannelEventList() + ~SubscribeAttributeOzoneConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151881,7 +134450,7 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.EventList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151899,32 +134468,32 @@ class SubscribeAttributeChannelEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadChannelAttributeList : public ReadAttribute { +class ReadOzoneConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadChannelAttributeList() + ReadOzoneConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadChannelAttributeList() + ~ReadOzoneConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel AttributeList read Error", error); + LogNSError("OzoneConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -151933,25 +134502,25 @@ class ReadChannelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeChannelAttributeList() + SubscribeAttributeOzoneConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeChannelAttributeList() + ~SubscribeAttributeOzoneConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -151965,7 +134534,7 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -151981,32 +134550,32 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadChannelFeatureMap : public ReadAttribute { +class ReadOzoneConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadChannelFeatureMap() + ReadOzoneConcentrationMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadChannelFeatureMap() + ~ReadOzoneConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel FeatureMap read Error", error); + LogNSError("OzoneConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152015,25 +134584,25 @@ class ReadChannelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeChannelFeatureMap() + SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeChannelFeatureMap() + ~SubscribeAttributeOzoneConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152047,7 +134616,7 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152063,32 +134632,32 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadChannelClusterRevision : public ReadAttribute { +class ReadOzoneConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadChannelClusterRevision() + ReadOzoneConcentrationMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadChannelClusterRevision() + ~ReadOzoneConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Channel ClusterRevision read Error", error); + LogNSError("OzoneConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152097,25 +134666,25 @@ class ReadChannelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOzoneConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeChannelClusterRevision() + SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeChannelClusterRevision() + ~SubscribeAttributeOzoneConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OzoneConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OzoneConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOzoneConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152129,7 +134698,7 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision response %@", [value description]); + NSLog(@"OzoneConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152143,14 +134712,22 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster TargetNavigator | 0x0505 | +| Cluster Pm25ConcentrationMeasurement | 0x042A | |------------------------------------------------------------------------------| | Commands: | | -| * NavigateTarget | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * TargetList | 0x0000 | -| * CurrentTarget | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -152159,97 +134736,119 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * TargetUpdated | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command NavigateTarget + * Attribute MeasuredValue */ -class TargetNavigatorNavigateTarget : public ClusterCommand { +class ReadPm25ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - TargetNavigatorNavigateTarget() - : ClusterCommand("navigate-target") + ReadPm25ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") + { + } + + ~ReadPm25ConcentrationMeasurementMeasuredValue() { - AddArgument("Target", 0, UINT8_MAX, &mRequest.target); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePm25ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +public: + SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") + { + } + + ~SubscribeAttributePm25ConcentrationMeasurementMeasuredValue() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster navigateTargetWithParams:params completion: - ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMeasuredValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; /* - * Attribute TargetList + * Attribute MinMeasuredValue */ -class ReadTargetNavigatorTargetList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadTargetNavigatorTargetList() - : ReadAttribute("target-list") + ReadPm25ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadTargetNavigatorTargetList() + ~ReadPm25ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator TargetList read Error", error); + LogNSError("PM25ConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152258,25 +134857,25 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorTargetList() - : SubscribeAttribute("target-list") + SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeTargetNavigatorTargetList() + ~SubscribeAttributePm25ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152287,10 +134886,10 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152304,34 +134903,34 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { }; /* - * Attribute CurrentTarget + * Attribute MaxMeasuredValue */ -class ReadTargetNavigatorCurrentTarget : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadTargetNavigatorCurrentTarget() - : ReadAttribute("current-target") + ReadPm25ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadTargetNavigatorCurrentTarget() + ~ReadPm25ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator CurrentTarget read Error", error); + LogNSError("PM25ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152340,25 +134939,25 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorCurrentTarget() - : SubscribeAttribute("current-target") + SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeTargetNavigatorCurrentTarget() + ~SubscribeAttributePm25ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152369,10 +134968,10 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentTargetWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152386,34 +134985,34 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute }; /* - * Attribute GeneratedCommandList + * Attribute PeakMeasuredValue */ -class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadTargetNavigatorGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm25ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadTargetNavigatorGeneratedCommandList() + ~ReadPm25ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator GeneratedCommandList read Error", error); + LogNSError("PM25ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152422,25 +135021,25 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeTargetNavigatorGeneratedCommandList() + ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152451,10 +135050,10 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152468,34 +135067,34 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValueWindow */ -class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadTargetNavigatorAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadTargetNavigatorAcceptedCommandList() + ~ReadPm25ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator AcceptedCommandList read Error", error); + LogNSError("PM25ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152504,25 +135103,25 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeTargetNavigatorAcceptedCommandList() + ~SubscribeAttributePm25ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152533,10 +135132,10 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152549,37 +135148,35 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AverageMeasuredValue */ -class ReadTargetNavigatorEventList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadTargetNavigatorEventList() - : ReadAttribute("event-list") + ReadPm25ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadTargetNavigatorEventList() + ~ReadPm25ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator EventList read Error", error); + LogNSError("PM25ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152588,25 +135185,25 @@ class ReadTargetNavigatorEventList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeTargetNavigatorEventList() + ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152617,10 +135214,10 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152633,37 +135230,35 @@ class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute AverageMeasuredValueWindow */ -class ReadTargetNavigatorAttributeList : public ReadAttribute { +class ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadTargetNavigatorAttributeList() - : ReadAttribute("attribute-list") + ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadTargetNavigatorAttributeList() + ~ReadPm25ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator AttributeList read Error", error); + LogNSError("PM25ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152672,25 +135267,25 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeTargetNavigatorAttributeList() + ~SubscribeAttributePm25ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152701,10 +135296,10 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152718,34 +135313,34 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute Uncertainty */ -class ReadTargetNavigatorFeatureMap : public ReadAttribute { +class ReadPm25ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadTargetNavigatorFeatureMap() - : ReadAttribute("feature-map") + ReadPm25ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadTargetNavigatorFeatureMap() + ~ReadPm25ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator FeatureMap read Error", error); + LogNSError("PM25ConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152754,25 +135349,25 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm25ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeTargetNavigatorFeatureMap() + ~SubscribeAttributePm25ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152783,10 +135378,10 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152800,34 +135395,34 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MeasurementUnit */ -class ReadTargetNavigatorClusterRevision : public ReadAttribute { +class ReadPm25ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadTargetNavigatorClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm25ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadTargetNavigatorClusterRevision() + ~ReadPm25ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TargetNavigator ClusterRevision read Error", error); + LogNSError("PM25ConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -152836,25 +135431,25 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeTargetNavigatorClusterRevision() + ~SubscribeAttributePm25ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -152865,10 +135460,10 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + NSLog(@"PM25ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -152881,817 +135476,722 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu } }; -/*----------------------------------------------------------------------------*\ -| Cluster MediaPlayback | 0x0506 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Play | 0x00 | -| * Pause | 0x01 | -| * Stop | 0x02 | -| * StartOver | 0x03 | -| * Previous | 0x04 | -| * Next | 0x05 | -| * Rewind | 0x06 | -| * FastForward | 0x07 | -| * SkipForward | 0x08 | -| * SkipBackward | 0x09 | -| * Seek | 0x0B | -| * ActivateAudioTrack | 0x0C | -| * ActivateTextTrack | 0x0D | -| * DeactivateTextTrack | 0x0E | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentState | 0x0000 | -| * StartTime | 0x0001 | -| * Duration | 0x0002 | -| * SampledPosition | 0x0003 | -| * PlaybackSpeed | 0x0004 | -| * SeekRangeEnd | 0x0005 | -| * SeekRangeStart | 0x0006 | -| * ActiveAudioTrack | 0x0007 | -| * AvailableAudioTracks | 0x0008 | -| * ActiveTextTrack | 0x0009 | -| * AvailableTextTracks | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChanged | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Command Play + * Attribute MeasurementMedium */ -class MediaPlaybackPlay : public ClusterCommand { +class ReadPm25ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - MediaPlaybackPlay() - : ClusterCommand("play") + ReadPm25ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") + { + } + + ~ReadPm25ConcentrationMeasurementMeasurementMedium() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster playWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command Pause - */ -class MediaPlaybackPause : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - MediaPlaybackPause() - : ClusterCommand("pause") + SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementMeasurementMedium() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::MeasurementMedium::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster pauseWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMeasurementMediumWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Command Stop + * Attribute LevelValue */ -class MediaPlaybackStop : public ClusterCommand { +class ReadPm25ConcentrationMeasurementLevelValue : public ReadAttribute { public: - MediaPlaybackStop() - : ClusterCommand("stop") + ReadPm25ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") + { + } + + ~ReadPm25ConcentrationMeasurementLevelValue() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command StartOver - */ -class MediaPlaybackStartOver : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - MediaPlaybackStartOver() - : ClusterCommand("start-over") + SubscribeAttributePm25ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementLevelValue() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::LevelValue::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster startOverWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLevelValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Command Previous + * Attribute GeneratedCommandList */ -class MediaPlaybackPrevious : public ClusterCommand { +class ReadPm25ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - MediaPlaybackPrevious() - : ClusterCommand("previous") + ReadPm25ConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadPm25ConcentrationMeasurementGeneratedCommandList() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster previousWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributePm25ConcentrationMeasurementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadPm25ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { +public: + ReadPm25ConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } -private: + ~ReadPm25ConcentrationMeasurementAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -/* - * Command Next - */ -class MediaPlaybackNext : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - MediaPlaybackNext() - : ClusterCommand("next") + SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementAcceptedCommandList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterNextParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster nextWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; +#if MTR_ENABLE_PROVISIONAL + /* - * Command Rewind + * Attribute EventList */ -class MediaPlaybackRewind : public ClusterCommand { +class ReadPm25ConcentrationMeasurementEventList : public ReadAttribute { public: - MediaPlaybackRewind() - : ClusterCommand("rewind") + ReadPm25ConcentrationMeasurementEventList() + : ReadAttribute("event-list") + { + } + + ~ReadPm25ConcentrationMeasurementEventList() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.audioAdvanceUnmuted.HasValue()) { - params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; - } else { - params.audioAdvanceUnmuted = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster rewindWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; }; -/* - * Command FastForward - */ -class MediaPlaybackFastForward : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementEventList : public SubscribeAttribute { public: - MediaPlaybackFastForward() - : ClusterCommand("fast-forward") + SubscribeAttributePm25ConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementEventList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::EventList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.audioAdvanceUnmuted.HasValue()) { - params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; - } else { - params.audioAdvanceUnmuted = nil; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster fastForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Command SkipForward + * Attribute AttributeList */ -class MediaPlaybackSkipForward : public ClusterCommand { +class ReadPm25ConcentrationMeasurementAttributeList : public ReadAttribute { public: - MediaPlaybackSkipForward() - : ClusterCommand("skip-forward") + ReadPm25ConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadPm25ConcentrationMeasurementAttributeList() { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipForwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; -/* - * Command SkipBackward - */ -class MediaPlaybackSkipBackward : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - MediaPlaybackSkipBackward() - : ClusterCommand("skip-backward") + SubscribeAttributePm25ConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementAttributeList() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::AttributeList::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipBackwardWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; /* - * Command Seek + * Attribute FeatureMap */ -class MediaPlaybackSeek : public ClusterCommand { +class ReadPm25ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - MediaPlaybackSeek() - : ClusterCommand("seek") + ReadPm25ConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadPm25ConcentrationMeasurementFeatureMap() { - AddArgument("Position", 0, UINT64_MAX, &mRequest.position); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster seekWithParams:params completion: - ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL -/* - * Command ActivateAudioTrack - */ -class MediaPlaybackActivateAudioTrack : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - MediaPlaybackActivateAudioTrack() - : ClusterCommand("activate-audio-track") + SubscribeAttributePm25ConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TrackID", &mRequest.trackID); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("AudioOutputIndex", 0, UINT8_MAX, &mRequest.audioOutputIndex); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementFeatureMap() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::FeatureMap::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterActivateAudioTrackParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.audioOutputIndex]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster activateAudioTrackWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command ActivateTextTrack + * Attribute ClusterRevision */ -class MediaPlaybackActivateTextTrack : public ClusterCommand { +class ReadPm25ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - MediaPlaybackActivateTextTrack() - : ClusterCommand("activate-text-track") + ReadPm25ConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadPm25ConcentrationMeasurementClusterRevision() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TrackID", &mRequest.trackID); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterActivateTextTrackParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster activateTextTrackWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM25ConcentrationMeasurement ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command DeactivateTextTrack - */ -class MediaPlaybackDeactivateTextTrack : public ClusterCommand { +class SubscribeAttributePm25ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - MediaPlaybackDeactivateTextTrack() - : ClusterCommand("deactivate-text-track") + SubscribeAttributePm25ConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm25ConcentrationMeasurementClusterRevision() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm25ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm25ConcentrationMeasurement::Attributes::ClusterRevision::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster deactivateTextTrackWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM25ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM25ConcentrationMeasurement.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster FormaldehydeConcentrationMeasurement | 0x042B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute CurrentState + * Attribute MeasuredValue */ -class ReadMediaPlaybackCurrentState : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadMediaPlaybackCurrentState() - : ReadAttribute("current-state") + ReadFormaldehydeConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadMediaPlaybackCurrentState() + ~ReadFormaldehydeConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback CurrentState read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -153700,25 +136200,25 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackCurrentState() - : SubscribeAttribute("current-state") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeMediaPlaybackCurrentState() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -153729,10 +136229,10 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentStateWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -153746,34 +136246,34 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { }; /* - * Attribute StartTime + * Attribute MinMeasuredValue */ -class ReadMediaPlaybackStartTime : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadMediaPlaybackStartTime() - : ReadAttribute("start-time") + ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadMediaPlaybackStartTime() + ~ReadFormaldehydeConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback StartTime read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -153782,25 +136282,25 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackStartTime() - : SubscribeAttribute("start-time") + SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeMediaPlaybackStartTime() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -153811,10 +136311,10 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartTimeWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -153828,34 +136328,34 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { }; /* - * Attribute Duration + * Attribute MaxMeasuredValue */ -class ReadMediaPlaybackDuration : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadMediaPlaybackDuration() - : ReadAttribute("duration") + ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadMediaPlaybackDuration() + ~ReadFormaldehydeConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback Duration read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -153864,25 +136364,25 @@ class ReadMediaPlaybackDuration : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackDuration() - : SubscribeAttribute("duration") + SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeMediaPlaybackDuration() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -153893,10 +136393,10 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDurationWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -153910,34 +136410,34 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { }; /* - * Attribute SampledPosition + * Attribute PeakMeasuredValue */ -class ReadMediaPlaybackSampledPosition : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadMediaPlaybackSampledPosition() - : ReadAttribute("sampled-position") + ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadMediaPlaybackSampledPosition() + ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSampledPositionWithCompletion:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SampledPosition read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -153946,25 +136446,25 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSampledPosition() - : SubscribeAttribute("sampled-position") + SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeMediaPlaybackSampledPosition() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -153975,10 +136475,10 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSampledPositionWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -153992,34 +136492,34 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute }; /* - * Attribute PlaybackSpeed + * Attribute PeakMeasuredValueWindow */ -class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadMediaPlaybackPlaybackSpeed() - : ReadAttribute("playback-speed") + ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadMediaPlaybackPlaybackSpeed() + ~ReadFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback PlaybackSpeed read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154028,25 +136528,25 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackPlaybackSpeed() - : SubscribeAttribute("playback-speed") + SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeMediaPlaybackPlaybackSpeed() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154057,10 +136557,10 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePlaybackSpeedWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154074,34 +136574,34 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { }; /* - * Attribute SeekRangeEnd + * Attribute AverageMeasuredValue */ -class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeEnd() - : ReadAttribute("seek-range-end") + ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadMediaPlaybackSeekRangeEnd() + ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SeekRangeEnd read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154110,25 +136610,25 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeEnd() - : SubscribeAttribute("seek-range-end") + SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeMediaPlaybackSeekRangeEnd() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154139,10 +136639,10 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeEndWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154156,34 +136656,34 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { }; /* - * Attribute SeekRangeStart + * Attribute AverageMeasuredValueWindow */ -class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeStart() - : ReadAttribute("seek-range-start") + ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadMediaPlaybackSeekRangeStart() + ~ReadFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback SeekRangeStart read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154192,25 +136692,25 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeStart() - : SubscribeAttribute("seek-range-start") + SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeMediaPlaybackSeekRangeStart() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154221,10 +136721,10 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeStartWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154237,37 +136737,35 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ActiveAudioTrack + * Attribute Uncertainty */ -class ReadMediaPlaybackActiveAudioTrack : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadMediaPlaybackActiveAudioTrack() - : ReadAttribute("active-audio-track") + ReadFormaldehydeConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadMediaPlaybackActiveAudioTrack() + ~ReadFormaldehydeConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveAudioTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback ActiveAudioTrack read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154276,25 +136774,25 @@ class ReadMediaPlaybackActiveAudioTrack : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackActiveAudioTrack : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackActiveAudioTrack() - : SubscribeAttribute("active-audio-track") + SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeMediaPlaybackActiveAudioTrack() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154305,10 +136803,10 @@ class SubscribeAttributeMediaPlaybackActiveAudioTrack : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveAudioTrackWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154321,38 +136819,35 @@ class SubscribeAttributeMediaPlaybackActiveAudioTrack : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AvailableAudioTracks + * Attribute MeasurementUnit */ -class ReadMediaPlaybackAvailableAudioTracks : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadMediaPlaybackAvailableAudioTracks() - : ReadAttribute("available-audio-tracks") + ReadFormaldehydeConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadMediaPlaybackAvailableAudioTracks() + ~ReadFormaldehydeConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAvailableAudioTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AvailableAudioTracks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AvailableAudioTracks read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154361,25 +136856,25 @@ class ReadMediaPlaybackAvailableAudioTracks : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAvailableAudioTracks : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAvailableAudioTracks() - : SubscribeAttribute("available-audio-tracks") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeMediaPlaybackAvailableAudioTracks() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154390,10 +136885,10 @@ class SubscribeAttributeMediaPlaybackAvailableAudioTracks : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAvailableAudioTracksWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AvailableAudioTracks response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154406,38 +136901,35 @@ class SubscribeAttributeMediaPlaybackAvailableAudioTracks : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ActiveTextTrack + * Attribute MeasurementMedium */ -class ReadMediaPlaybackActiveTextTrack : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadMediaPlaybackActiveTextTrack() - : ReadAttribute("active-text-track") + ReadFormaldehydeConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadMediaPlaybackActiveTextTrack() + ~ReadFormaldehydeConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTextTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback ActiveTextTrack read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154446,25 +136938,25 @@ class ReadMediaPlaybackActiveTextTrack : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackActiveTextTrack : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackActiveTextTrack() - : SubscribeAttribute("active-text-track") + SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeMediaPlaybackActiveTextTrack() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154475,10 +136967,10 @@ class SubscribeAttributeMediaPlaybackActiveTextTrack : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveTextTrackWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154491,38 +136983,35 @@ class SubscribeAttributeMediaPlaybackActiveTextTrack : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AvailableTextTracks + * Attribute LevelValue */ -class ReadMediaPlaybackAvailableTextTracks : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadMediaPlaybackAvailableTextTracks() - : ReadAttribute("available-text-tracks") + ReadFormaldehydeConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadMediaPlaybackAvailableTextTracks() + ~ReadFormaldehydeConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAvailableTextTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AvailableTextTracks read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154531,25 +137020,25 @@ class ReadMediaPlaybackAvailableTextTracks : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAvailableTextTracks : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAvailableTextTracks() - : SubscribeAttribute("available-text-tracks") + SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeMediaPlaybackAvailableTextTracks() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154560,10 +137049,10 @@ class SubscribeAttributeMediaPlaybackAvailableTextTracks : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAvailableTextTracksWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FormaldehydeConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154576,37 +137065,35 @@ class SubscribeAttributeMediaPlaybackAvailableTextTracks : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadMediaPlaybackGeneratedCommandList() + ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadMediaPlaybackGeneratedCommandList() + ~ReadFormaldehydeConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback GeneratedCommandList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154615,25 +137102,25 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackGeneratedCommandList() + SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaPlaybackGeneratedCommandList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154647,7 +137134,7 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154663,32 +137150,32 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr /* * Attribute AcceptedCommandList */ -class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadMediaPlaybackAcceptedCommandList() + ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadMediaPlaybackAcceptedCommandList() + ~ReadFormaldehydeConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AcceptedCommandList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154697,25 +137184,25 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAcceptedCommandList() + SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaPlaybackAcceptedCommandList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154729,7 +137216,7 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154747,32 +137234,32 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri /* * Attribute EventList */ -class ReadMediaPlaybackEventList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementEventList : public ReadAttribute { public: - ReadMediaPlaybackEventList() + ReadFormaldehydeConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadMediaPlaybackEventList() + ~ReadFormaldehydeConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback EventList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154781,25 +137268,25 @@ class ReadMediaPlaybackEventList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackEventList() + SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaPlaybackEventList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154813,7 +137300,7 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.EventList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154831,32 +137318,32 @@ class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadMediaPlaybackAttributeList : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadMediaPlaybackAttributeList() + ReadFormaldehydeConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadMediaPlaybackAttributeList() + ~ReadFormaldehydeConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback AttributeList read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154865,25 +137352,25 @@ class ReadMediaPlaybackAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAttributeList() + SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaPlaybackAttributeList() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154897,7 +137384,7 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154913,32 +137400,32 @@ class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadMediaPlaybackFeatureMap : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadMediaPlaybackFeatureMap() + ReadFormaldehydeConcentrationMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadMediaPlaybackFeatureMap() + ~ReadFormaldehydeConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback FeatureMap read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -154947,25 +137434,25 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackFeatureMap() + SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaPlaybackFeatureMap() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -154979,7 +137466,7 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -154995,32 +137482,32 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadMediaPlaybackClusterRevision : public ReadAttribute { +class ReadFormaldehydeConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackClusterRevision() + ReadFormaldehydeConcentrationMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackClusterRevision() + ~ReadFormaldehydeConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaPlayback ClusterRevision read Error", error); + LogNSError("FormaldehydeConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155029,25 +137516,25 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackClusterRevision() + SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackClusterRevision() + ~SubscribeAttributeFormaldehydeConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::FormaldehydeConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFormaldehydeConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155061,7 +137548,7 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + NSLog(@"FormaldehydeConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155075,17 +137562,22 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute }; /*----------------------------------------------------------------------------*\ -| Cluster MediaInput | 0x0507 | +| Cluster Pm1ConcentrationMeasurement | 0x042C | |------------------------------------------------------------------------------| | Commands: | | -| * SelectInput | 0x00 | -| * ShowInputStatus | 0x01 | -| * HideInputStatus | 0x02 | -| * RenameInput | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * InputList | 0x0000 | -| * CurrentInput | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -155097,218 +137589,198 @@ class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute \*----------------------------------------------------------------------------*/ /* - * Command SelectInput + * Attribute MeasuredValue */ -class MediaInputSelectInput : public ClusterCommand { +class ReadPm1ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - MediaInputSelectInput() - : ClusterCommand("select-input") + ReadPm1ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") + { + } + + ~ReadPm1ConcentrationMeasurementMeasuredValue() { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectInputWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM1ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; }; -/* - * Command ShowInputStatus - */ -class MediaInputShowInputStatus : public ClusterCommand { +class SubscribeAttributePm1ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - MediaInputShowInputStatus() - : ClusterCommand("show-input-status") + SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm1ConcentrationMeasurementMeasuredValue() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasuredValue::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster showInputStatusWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Command HideInputStatus + * Attribute MinMeasuredValue */ -class MediaInputHideInputStatus : public ClusterCommand { +class ReadPm1ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - MediaInputHideInputStatus() - : ClusterCommand("hide-input-status") + ReadPm1ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") + { + } + + ~ReadPm1ConcentrationMeasurementMinMeasuredValue() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster hideInputStatusWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM1ConcentrationMeasurement MinMeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command RenameInput - */ -class MediaInputRenameInput : public ClusterCommand { +class SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - MediaInputRenameInput() - : ClusterCommand("rename-input") + SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributePm1ConcentrationMeasurementMinMeasuredValue() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster renameInputWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMinMeasuredValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; }; /* - * Attribute InputList + * Attribute MaxMeasuredValue */ -class ReadMediaInputInputList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadMediaInputInputList() - : ReadAttribute("input-list") + ReadPm1ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadMediaInputInputList() + ~ReadPm1ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput InputList read Error", error); + LogNSError("PM1ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155317,25 +137789,25 @@ class ReadMediaInputInputList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaInputInputList() - : SubscribeAttribute("input-list") + SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeMediaInputInputList() + ~SubscribeAttributePm1ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155346,10 +137818,10 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInputListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155363,34 +137835,34 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { }; /* - * Attribute CurrentInput + * Attribute PeakMeasuredValue */ -class ReadMediaInputCurrentInput : public ReadAttribute { +class ReadPm1ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadMediaInputCurrentInput() - : ReadAttribute("current-input") + ReadPm1ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadMediaInputCurrentInput() + ~ReadPm1ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput CurrentInput read Error", error); + LogNSError("PM1ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155399,25 +137871,25 @@ class ReadMediaInputCurrentInput : public ReadAttribute { } }; -class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaInputCurrentInput() - : SubscribeAttribute("current-input") + SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeMediaInputCurrentInput() + ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155428,10 +137900,10 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentInputWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155445,34 +137917,34 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute PeakMeasuredValueWindow */ -class ReadMediaInputGeneratedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadMediaInputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadMediaInputGeneratedCommandList() + ~ReadPm1ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput GeneratedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155481,25 +137953,25 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeMediaInputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeMediaInputGeneratedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155510,10 +137982,10 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155527,34 +137999,34 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute AverageMeasuredValue */ -class ReadMediaInputAcceptedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadMediaInputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm1ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadMediaInputAcceptedCommandList() + ~ReadPm1ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput AcceptedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155563,25 +138035,25 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeMediaInputAcceptedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155592,10 +138064,10 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155608,37 +138080,35 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AverageMeasuredValueWindow */ -class ReadMediaInputEventList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadMediaInputEventList() - : ReadAttribute("event-list") + ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadMediaInputEventList() + ~ReadPm1ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput EventList read Error", error); + LogNSError("PM1ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155647,25 +138117,25 @@ class ReadMediaInputEventList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeMediaInputEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeMediaInputEventList() + ~SubscribeAttributePm1ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155676,10 +138146,10 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155692,37 +138162,35 @@ class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute Uncertainty */ -class ReadMediaInputAttributeList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadMediaInputAttributeList() - : ReadAttribute("attribute-list") + ReadPm1ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadMediaInputAttributeList() + ~ReadPm1ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput AttributeList read Error", error); + LogNSError("PM1ConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155731,25 +138199,25 @@ class ReadMediaInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm1ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeMediaInputAttributeList() + ~SubscribeAttributePm1ConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155760,10 +138228,10 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155777,34 +138245,34 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute MeasurementUnit */ -class ReadMediaInputFeatureMap : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadMediaInputFeatureMap() - : ReadAttribute("feature-map") + ReadPm1ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadMediaInputFeatureMap() + ~ReadPm1ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput FeatureMap read Error", error); + LogNSError("PM1ConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155813,25 +138281,25 @@ class ReadMediaInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeMediaInputFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeMediaInputFeatureMap() + ~SubscribeAttributePm1ConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155842,10 +138310,10 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155859,34 +138327,34 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MeasurementMedium */ -class ReadMediaInputClusterRevision : public ReadAttribute { +class ReadPm1ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadMediaInputClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm1ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadMediaInputClusterRevision() + ~ReadPm1ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MediaInput ClusterRevision read Error", error); + LogNSError("PM1ConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -155895,25 +138363,25 @@ class ReadMediaInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeMediaInputClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeMediaInputClusterRevision() + ~SubscribeAttributePm1ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -155924,10 +138392,10 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -155940,96 +138408,117 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster LowPower | 0x0508 | -|------------------------------------------------------------------------------| -| Commands: | | -| * Sleep | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command Sleep + * Attribute LevelValue */ -class LowPowerSleep : public ClusterCommand { +class ReadPm1ConcentrationMeasurementLevelValue : public ReadAttribute { public: - LowPowerSleep() - : ClusterCommand("sleep") + ReadPm1ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") + { + } + + ~ReadPm1ConcentrationMeasurementLevelValue() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster sleepWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM1ConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: +class SubscribeAttributePm1ConcentrationMeasurementLevelValue : public SubscribeAttribute { +public: + SubscribeAttributePm1ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") + { + } + + ~SubscribeAttributePm1ConcentrationMeasurementLevelValue() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLevelValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM1ConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* * Attribute GeneratedCommandList */ -class ReadLowPowerGeneratedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadLowPowerGeneratedCommandList() + ReadPm1ConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLowPowerGeneratedCommandList() + ~ReadPm1ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower GeneratedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156038,25 +138527,25 @@ class ReadLowPowerGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerGeneratedCommandList() + SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLowPowerGeneratedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156070,7 +138559,7 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156086,32 +138575,32 @@ class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute /* * Attribute AcceptedCommandList */ -class ReadLowPowerAcceptedCommandList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadLowPowerAcceptedCommandList() + ReadPm1ConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLowPowerAcceptedCommandList() + ~ReadPm1ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower AcceptedCommandList read Error", error); + LogNSError("PM1ConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156120,25 +138609,25 @@ class ReadLowPowerAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerAcceptedCommandList() + SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLowPowerAcceptedCommandList() + ~SubscribeAttributePm1ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156152,7 +138641,7 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156170,32 +138659,32 @@ class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute /* * Attribute EventList */ -class ReadLowPowerEventList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementEventList : public ReadAttribute { public: - ReadLowPowerEventList() + ReadPm1ConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadLowPowerEventList() + ~ReadPm1ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower EventList read Error", error); + LogNSError("PM1ConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156204,25 +138693,25 @@ class ReadLowPowerEventList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerEventList() + SubscribeAttributePm1ConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLowPowerEventList() + ~SubscribeAttributePm1ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156236,7 +138725,7 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.EventList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156254,32 +138743,32 @@ class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadLowPowerAttributeList : public ReadAttribute { +class ReadPm1ConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadLowPowerAttributeList() + ReadPm1ConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLowPowerAttributeList() + ~ReadPm1ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower AttributeList read Error", error); + LogNSError("PM1ConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156288,25 +138777,25 @@ class ReadLowPowerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerAttributeList() + SubscribeAttributePm1ConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLowPowerAttributeList() + ~SubscribeAttributePm1ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156320,7 +138809,7 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156336,32 +138825,32 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadLowPowerFeatureMap : public ReadAttribute { +class ReadPm1ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadLowPowerFeatureMap() + ReadPm1ConcentrationMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLowPowerFeatureMap() + ~ReadPm1ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower FeatureMap read Error", error); + LogNSError("PM1ConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156370,25 +138859,25 @@ class ReadLowPowerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLowPowerFeatureMap() + SubscribeAttributePm1ConcentrationMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLowPowerFeatureMap() + ~SubscribeAttributePm1ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156402,7 +138891,7 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156418,32 +138907,32 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadLowPowerClusterRevision : public ReadAttribute { +class ReadPm1ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadLowPowerClusterRevision() + ReadPm1ConcentrationMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLowPowerClusterRevision() + ~ReadPm1ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LowPower ClusterRevision read Error", error); + LogNSError("PM1ConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156452,25 +138941,25 @@ class ReadLowPowerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm1ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLowPowerClusterRevision() + SubscribeAttributePm1ConcentrationMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLowPowerClusterRevision() + ~SubscribeAttributePm1ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm1ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm1ConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM1ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156484,7 +138973,7 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + NSLog(@"PM1ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156498,12 +138987,22 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster KeypadInput | 0x0509 | +| Cluster Pm10ConcentrationMeasurement | 0x042D | |------------------------------------------------------------------------------| | Commands: | | -| * SendKey | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -156515,87 +139014,116 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command SendKey + * Attribute MeasuredValue */ -class KeypadInputSendKey : public ClusterCommand { +class ReadPm10ConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - KeypadInputSendKey() - : ClusterCommand("send-key") + ReadPm10ConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") + { + } + + ~ReadPm10ConcentrationMeasurementMeasuredValue() { - AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster sendKeyWithParams:params completion: - ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PM10ConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; +class SubscribeAttributePm10ConcentrationMeasurementMeasuredValue : public SubscribeAttribute { +public: + SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") + { + } + + ~SubscribeAttributePm10ConcentrationMeasurementMeasuredValue() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasuredValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMeasuredValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* - * Attribute GeneratedCommandList + * Attribute MinMeasuredValue */ -class ReadKeypadInputGeneratedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadKeypadInputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPm10ConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadKeypadInputGeneratedCommandList() + ~ReadPm10ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput GeneratedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156604,25 +139132,25 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeKeypadInputGeneratedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156633,10 +139161,10 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156650,34 +139178,34 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib }; /* - * Attribute AcceptedCommandList + * Attribute MaxMeasuredValue */ -class ReadKeypadInputAcceptedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadKeypadInputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPm10ConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadKeypadInputAcceptedCommandList() + ~ReadPm10ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput AcceptedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156686,25 +139214,25 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeKeypadInputAcceptedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156715,10 +139243,10 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156731,37 +139259,35 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute PeakMeasuredValue */ -class ReadKeypadInputEventList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadKeypadInputEventList() - : ReadAttribute("event-list") + ReadPm10ConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadKeypadInputEventList() + ~ReadPm10ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput EventList read Error", error); + LogNSError("PM10ConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156770,25 +139296,25 @@ class ReadKeypadInputEventList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeKeypadInputEventList() + ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156799,10 +139325,10 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156815,37 +139341,35 @@ class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute PeakMeasuredValueWindow */ -class ReadKeypadInputAttributeList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadKeypadInputAttributeList() - : ReadAttribute("attribute-list") + ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadKeypadInputAttributeList() + ~ReadPm10ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput AttributeList read Error", error); + LogNSError("PM10ConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156854,25 +139378,25 @@ class ReadKeypadInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeKeypadInputAttributeList() + ~SubscribeAttributePm10ConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156883,10 +139407,10 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156900,34 +139424,34 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AverageMeasuredValue */ -class ReadKeypadInputFeatureMap : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadKeypadInputFeatureMap() - : ReadAttribute("feature-map") + ReadPm10ConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadKeypadInputFeatureMap() + ~ReadPm10ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput FeatureMap read Error", error); + LogNSError("PM10ConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -156936,25 +139460,25 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeKeypadInputFeatureMap() + ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -156965,10 +139489,10 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -156982,34 +139506,34 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute AverageMeasuredValueWindow */ -class ReadKeypadInputClusterRevision : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadKeypadInputClusterRevision() - : ReadAttribute("cluster-revision") + ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadKeypadInputClusterRevision() + ~ReadPm10ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("KeypadInput ClusterRevision read Error", error); + LogNSError("PM10ConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157018,25 +139542,25 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeKeypadInputClusterRevision() + ~SubscribeAttributePm10ConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157047,10 +139571,10 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157063,394 +139587,199 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ContentLauncher | 0x050A | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchContent | 0x00 | -| * LaunchURL | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * AcceptHeader | 0x0000 | -| * SupportedStreamingProtocols | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command LaunchContent + * Attribute Uncertainty */ -class ContentLauncherLaunchContent : public ClusterCommand { +class ReadPm10ConcentrationMeasurementUncertainty : public ReadAttribute { public: - ContentLauncherLaunchContent() - : ClusterCommand("launch-content") - , mComplex_Search(&mRequest.search) - , mComplex_PlaybackPreferences(&mRequest.playbackPreferences) + ReadPm10ConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") + { + } + + ~ReadPm10ConcentrationMeasurementUncertainty() { - AddArgument("Search", &mComplex_Search); - AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); - AddArgument("Data", &mRequest.data); -#if MTR_ENABLE_PROVISIONAL - AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("UseCurrentContext", 0, 1, &mRequest.useCurrentContext); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.search = [MTRContentLauncherClusterContentSearchStruct new]; - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.search.parameterList) { - MTRContentLauncherClusterParameterStruct * newElement_1; - newElement_1 = [MTRContentLauncherClusterParameterStruct new]; - newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; - newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; - if (entry_1.externalIDList.HasValue()) { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - for (auto & entry_4 : entry_1.externalIDList.Value()) { - MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; - newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; - newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() length:entry_4.name.size() encoding:NSUTF8StringEncoding]; - newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() length:entry_4.value.size() encoding:NSUTF8StringEncoding]; - [array_4 addObject:newElement_4]; - } - newElement_1.externalIDList = array_4; - } - } else { - newElement_1.externalIDList = nil; - } - [array_1 addObject:newElement_1]; - } - params.search.parameterList = array_1; - } - params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; - } -#if MTR_ENABLE_PROVISIONAL - if (mRequest.playbackPreferences.HasValue()) { - params.playbackPreferences = [MTRContentLauncherClusterPlaybackPreferencesStruct new]; - params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition]; - params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; - params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.languageCode.size() encoding:NSUTF8StringEncoding]; - if (mRequest.playbackPreferences.Value().textTrack.characteristics.HasValue()) { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - for (auto & entry_4 : mRequest.playbackPreferences.Value().textTrack.characteristics.Value()) { - NSNumber * newElement_4; - newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; - [array_4 addObject:newElement_4]; - } - params.playbackPreferences.textTrack.characteristics = array_4; - } - } else { - params.playbackPreferences.textTrack.characteristics = nil; - } - params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.audioOutputIndex]; - if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - for (auto & entry_3 : mRequest.playbackPreferences.Value().audioTracks.Value()) { - MTRContentLauncherClusterTrackPreferenceStruct * newElement_3; - newElement_3 = [MTRContentLauncherClusterTrackPreferenceStruct new]; - newElement_3.languageCode = [[NSString alloc] initWithBytes:entry_3.languageCode.data() length:entry_3.languageCode.size() encoding:NSUTF8StringEncoding]; - if (entry_3.characteristics.HasValue()) { - { // Scope for our temporary variables - auto * array_6 = [NSMutableArray new]; - for (auto & entry_6 : entry_3.characteristics.Value()) { - NSNumber * newElement_6; - newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; - [array_6 addObject:newElement_6]; - } - newElement_3.characteristics = array_6; - } - } else { - newElement_3.characteristics = nil; - } - newElement_3.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_3.audioOutputIndex]; - [array_3 addObject:newElement_3]; - } - params.playbackPreferences.audioTracks = array_3; - } + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - params.playbackPreferences.audioTracks = nil; + LogNSError("PM10ConcentrationMeasurement Uncertainty read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - } else { - params.playbackPreferences = nil; + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePm10ConcentrationMeasurementUncertainty : public SubscribeAttribute { +public: + SubscribeAttributePm10ConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") + { + } + + ~SubscribeAttributePm10ConcentrationMeasurementUncertainty() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::Uncertainty::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.useCurrentContext.HasValue()) { - params.useCurrentContext = [NSNumber numberWithBool:mRequest.useCurrentContext.Value()]; - } else { - params.useCurrentContext = nil; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchContentWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeUncertaintyWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.Uncertainty response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; - TypedComplexArgument mComplex_Search; - TypedComplexArgument> mComplex_PlaybackPreferences; }; /* - * Command LaunchURL + * Attribute MeasurementUnit */ -class ContentLauncherLaunchURL : public ClusterCommand { +class ReadPm10ConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ContentLauncherLaunchURL() - : ClusterCommand("launch-url") - , mComplex_BrandingInformation(&mRequest.brandingInformation) + ReadPm10ConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") + { + } + + ~ReadPm10ConcentrationMeasurementMeasurementUnit() { - AddArgument("ContentURL", &mRequest.contentURL); - AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() length:mRequest.contentURL.size() encoding:NSUTF8StringEncoding]; - if (mRequest.displayString.HasValue()) { - params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() length:mRequest.displayString.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.displayString = nil; - } - if (mRequest.brandingInformation.HasValue()) { - params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; - params.brandingInformation.providerName = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() length:mRequest.brandingInformation.Value().providerName.size() encoding:NSUTF8StringEncoding]; - if (mRequest.brandingInformation.Value().background.HasValue()) { - params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { - params.brandingInformation.background.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.imageURL = nil; - } - if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { - params.brandingInformation.background.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() length:mRequest.brandingInformation.Value().background.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.color = nil; - } - if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { - params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.background.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; - params.brandingInformation.background.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; - params.brandingInformation.background.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; - } else { - params.brandingInformation.background.size = nil; - } - } else { - params.brandingInformation.background = nil; - } - if (mRequest.brandingInformation.Value().logo.HasValue()) { - params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { - params.brandingInformation.logo.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.imageURL = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { - params.brandingInformation.logo.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.color = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { - params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.logo.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; - params.brandingInformation.logo.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; - params.brandingInformation.logo.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; - } else { - params.brandingInformation.logo.size = nil; - } - } else { - params.brandingInformation.logo = nil; - } - if (mRequest.brandingInformation.Value().progressBar.HasValue()) { - params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { - params.brandingInformation.progressBar.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.imageURL = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { - params.brandingInformation.progressBar.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.color = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { - params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.progressBar.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; - params.brandingInformation.progressBar.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; - params.brandingInformation.progressBar.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; - } else { - params.brandingInformation.progressBar.size = nil; - } - } else { - params.brandingInformation.progressBar = nil; - } - if (mRequest.brandingInformation.Value().splash.HasValue()) { - params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { - params.brandingInformation.splash.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.imageURL = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { - params.brandingInformation.splash.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.color = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { - params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.splash.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; - params.brandingInformation.splash.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; - params.brandingInformation.splash.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; - } else { - params.brandingInformation.splash.size = nil; - } - } else { - params.brandingInformation.splash = nil; - } - if (mRequest.brandingInformation.Value().waterMark.HasValue()) { - params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { - params.brandingInformation.waterMark.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.imageURL = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { - params.brandingInformation.waterMark.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.color = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { - params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.waterMark.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; - params.brandingInformation.waterMark.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; - params.brandingInformation.waterMark.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; - } else { - params.brandingInformation.waterMark.size = nil; - } + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - params.brandingInformation.waterMark = nil; + LogNSError("PM10ConcentrationMeasurement MeasurementUnit read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - } else { - params.brandingInformation = nil; + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { +public: + SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") + { + } + + ~SubscribeAttributePm10ConcentrationMeasurementMeasurementUnit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementUnit::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchURLWithParams:params completion: - ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMeasurementUnitWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementUnit response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; - TypedComplexArgument> mComplex_BrandingInformation; }; /* - * Attribute AcceptHeader + * Attribute MeasurementMedium */ -class ReadContentLauncherAcceptHeader : public ReadAttribute { +class ReadPm10ConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadContentLauncherAcceptHeader() - : ReadAttribute("accept-header") + ReadPm10ConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadContentLauncherAcceptHeader() + ~ReadPm10ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AcceptHeader read Error", error); + LogNSError("PM10ConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157459,25 +139788,25 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptHeader() - : SubscribeAttribute("accept-header") + SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeContentLauncherAcceptHeader() + ~SubscribeAttributePm10ConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157488,10 +139817,10 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptHeaderWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157505,34 +139834,34 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute }; /* - * Attribute SupportedStreamingProtocols + * Attribute LevelValue */ -class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { +class ReadPm10ConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadContentLauncherSupportedStreamingProtocols() - : ReadAttribute("supported-streaming-protocols") + ReadPm10ConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadContentLauncherSupportedStreamingProtocols() + ~ReadPm10ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + LogNSError("PM10ConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157541,25 +139870,25 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherSupportedStreamingProtocols() - : SubscribeAttribute("supported-streaming-protocols") + SubscribeAttributePm10ConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() + ~SubscribeAttributePm10ConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157570,10 +139899,10 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157589,32 +139918,32 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs /* * Attribute GeneratedCommandList */ -class ReadContentLauncherGeneratedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadContentLauncherGeneratedCommandList() + ReadPm10ConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadContentLauncherGeneratedCommandList() + ~ReadPm10ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher GeneratedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157623,25 +139952,25 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherGeneratedCommandList() + SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeContentLauncherGeneratedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157655,7 +139984,7 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157671,32 +140000,32 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt /* * Attribute AcceptedCommandList */ -class ReadContentLauncherAcceptedCommandList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadContentLauncherAcceptedCommandList() + ReadPm10ConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadContentLauncherAcceptedCommandList() + ~ReadPm10ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AcceptedCommandList read Error", error); + LogNSError("PM10ConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157705,25 +140034,25 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptedCommandList() + SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeContentLauncherAcceptedCommandList() + ~SubscribeAttributePm10ConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157737,7 +140066,7 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157755,32 +140084,32 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt /* * Attribute EventList */ -class ReadContentLauncherEventList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementEventList : public ReadAttribute { public: - ReadContentLauncherEventList() + ReadPm10ConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadContentLauncherEventList() + ~ReadPm10ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher EventList read Error", error); + LogNSError("PM10ConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157789,25 +140118,25 @@ class ReadContentLauncherEventList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherEventList() + SubscribeAttributePm10ConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeContentLauncherEventList() + ~SubscribeAttributePm10ConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157821,7 +140150,7 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.EventList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157839,32 +140168,32 @@ class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadContentLauncherAttributeList : public ReadAttribute { +class ReadPm10ConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadContentLauncherAttributeList() + ReadPm10ConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadContentLauncherAttributeList() + ~ReadPm10ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher AttributeList read Error", error); + LogNSError("PM10ConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157873,25 +140202,25 @@ class ReadContentLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAttributeList() + SubscribeAttributePm10ConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeContentLauncherAttributeList() + ~SubscribeAttributePm10ConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157905,7 +140234,7 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -157921,32 +140250,32 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadContentLauncherFeatureMap : public ReadAttribute { +class ReadPm10ConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadContentLauncherFeatureMap() + ReadPm10ConcentrationMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadContentLauncherFeatureMap() + ~ReadPm10ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher FeatureMap read Error", error); + LogNSError("PM10ConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -157955,25 +140284,25 @@ class ReadContentLauncherFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherFeatureMap() + SubscribeAttributePm10ConcentrationMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeContentLauncherFeatureMap() + ~SubscribeAttributePm10ConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -157987,7 +140316,7 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158003,32 +140332,32 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadContentLauncherClusterRevision : public ReadAttribute { +class ReadPm10ConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadContentLauncherClusterRevision() + ReadPm10ConcentrationMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadContentLauncherClusterRevision() + ~ReadPm10ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentLauncher ClusterRevision read Error", error); + LogNSError("PM10ConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158037,25 +140366,25 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { +class SubscribeAttributePm10ConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherClusterRevision() + SubscribeAttributePm10ConcentrationMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeContentLauncherClusterRevision() + ~SubscribeAttributePm10ConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Pm10ConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Pm10ConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPM10ConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158069,7 +140398,7 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + NSLog(@"PM10ConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158083,15 +140412,22 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu }; /*----------------------------------------------------------------------------*\ -| Cluster AudioOutput | 0x050B | +| Cluster TotalVolatileOrganicCompoundsConcentrationMeasurement | 0x042E | |------------------------------------------------------------------------------| | Commands: | | -| * SelectOutput | 0x00 | -| * RenameOutput | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * OutputList | 0x0000 | -| * CurrentOutput | 0x0001 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -158103,130 +140439,116 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu \*----------------------------------------------------------------------------*/ /* - * Command SelectOutput + * Attribute MeasuredValue */ -class AudioOutputSelectOutput : public ClusterCommand { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - AudioOutputSelectOutput() - : ClusterCommand("select-output") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") + { + } + + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectOutputWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasuredValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; }; -/* - * Command RenameOutput - */ -class AudioOutputRenameOutput : public ClusterCommand { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - AudioOutputRenameOutput() - : ClusterCommand("rename-output") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasuredValue() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasuredValue::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster renameOutputWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMeasuredValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasuredValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; /* - * Attribute OutputList + * Attribute MinMeasuredValue */ -class ReadAudioOutputOutputList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadAudioOutputOutputList() - : ReadAttribute("output-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadAudioOutputOutputList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput OutputList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158235,25 +140557,25 @@ class ReadAudioOutputOutputList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputOutputList() - : SubscribeAttribute("output-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeAudioOutputOutputList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158264,10 +140586,10 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutputListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158281,34 +140603,34 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { }; /* - * Attribute CurrentOutput + * Attribute MaxMeasuredValue */ -class ReadAudioOutputCurrentOutput : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadAudioOutputCurrentOutput() - : ReadAttribute("current-output") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadAudioOutputCurrentOutput() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput CurrentOutput read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158317,25 +140639,25 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputCurrentOutput() - : SubscribeAttribute("current-output") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeAudioOutputCurrentOutput() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158346,10 +140668,10 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentOutputWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158363,34 +140685,34 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute PeakMeasuredValue */ -class ReadAudioOutputGeneratedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadAudioOutputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadAudioOutputGeneratedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput GeneratedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158399,25 +140721,25 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeAudioOutputGeneratedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158428,10 +140750,10 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158445,34 +140767,34 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib }; /* - * Attribute AcceptedCommandList + * Attribute PeakMeasuredValueWindow */ -class ReadAudioOutputAcceptedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadAudioOutputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadAudioOutputAcceptedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput AcceptedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158481,25 +140803,25 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeAudioOutputAcceptedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158510,10 +140832,10 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158526,37 +140848,35 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AverageMeasuredValue */ -class ReadAudioOutputEventList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadAudioOutputEventList() - : ReadAttribute("event-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadAudioOutputEventList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput EventList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158565,25 +140885,25 @@ class ReadAudioOutputEventList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeAudioOutputEventList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158594,10 +140914,10 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158610,37 +140930,35 @@ class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute AverageMeasuredValueWindow */ -class ReadAudioOutputAttributeList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadAudioOutputAttributeList() - : ReadAttribute("attribute-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadAudioOutputAttributeList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput AttributeList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158649,25 +140967,25 @@ class ReadAudioOutputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeAudioOutputAttributeList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158678,10 +140996,10 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158695,34 +141013,34 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute Uncertainty */ -class ReadAudioOutputFeatureMap : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadAudioOutputFeatureMap() - : ReadAttribute("feature-map") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadAudioOutputFeatureMap() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput FeatureMap read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158731,25 +141049,25 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeAudioOutputFeatureMap() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158760,10 +141078,10 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158777,34 +141095,34 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute MeasurementUnit */ -class ReadAudioOutputClusterRevision : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadAudioOutputClusterRevision() - : ReadAttribute("cluster-revision") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadAudioOutputClusterRevision() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AudioOutput ClusterRevision read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -158813,25 +141131,25 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeAudioOutputClusterRevision() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -158842,10 +141160,10 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -158858,245 +141176,281 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationLauncher | 0x050C | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchApp | 0x00 | -| * StopApp | 0x01 | -| * HideApp | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CatalogList | 0x0000 | -| * CurrentApp | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command LaunchApp + * Attribute MeasurementMedium */ -class ApplicationLauncherLaunchApp : public ClusterCommand { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ApplicationLauncherLaunchApp() - : ClusterCommand("launch-app") - , mComplex_Application(&mRequest.application) + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") + { + } + + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() { - AddArgument("Application", &mComplex_Application); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement MeasurementMedium read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { +public: + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") + { + } + + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementMeasurementMedium() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::MeasurementMedium::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - if (mRequest.data.HasValue()) { - params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; - } else { - params.data = nil; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeMeasurementMediumWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.MeasurementMedium response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; - TypedComplexArgument> mComplex_Application; }; /* - * Command StopApp + * Attribute LevelValue */ -class ApplicationLauncherStopApp : public ClusterCommand { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public ReadAttribute { public: - ApplicationLauncherStopApp() - : ClusterCommand("stop-app") - , mComplex_Application(&mRequest.application) + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") + { + } + + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement LevelValue read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue : public SubscribeAttribute { +public: + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") + { + } + + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementLevelValue() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::LevelValue::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeLevelValueWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.LevelValue response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; - TypedComplexArgument> mComplex_Application; }; /* - * Command HideApp + * Attribute GeneratedCommandList */ -class ApplicationLauncherHideApp : public ClusterCommand { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ApplicationLauncherHideApp() - : ClusterCommand("hide-app") - , mComplex_Application(&mRequest.application) + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::GeneratedCommandList::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster hideAppWithParams:params completion: - ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; - TypedComplexArgument> mComplex_Application; }; /* - * Attribute CatalogList + * Attribute AcceptedCommandList */ -class ReadApplicationLauncherCatalogList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadApplicationLauncherCatalogList() - : ReadAttribute("catalog-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadApplicationLauncherCatalogList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher CatalogList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159105,25 +141459,25 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCatalogList() - : SubscribeAttribute("catalog-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationLauncherCatalogList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159134,10 +141488,10 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCatalogListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159150,35 +141504,37 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentApp + * Attribute EventList */ -class ReadApplicationLauncherCurrentApp : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public ReadAttribute { public: - ReadApplicationLauncherCurrentApp() - : ReadAttribute("current-app") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadApplicationLauncherCurrentApp() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentAppWithCompletion:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher CurrentApp read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159187,25 +141543,25 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCurrentApp() - : SubscribeAttribute("current-app") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationLauncherCurrentApp() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159216,10 +141572,10 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentAppWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159232,35 +141588,37 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadApplicationLauncherGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadApplicationLauncherGeneratedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159269,25 +141627,25 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationLauncherGeneratedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159298,10 +141656,10 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159315,34 +141673,34 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadApplicationLauncherAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadApplicationLauncherAcceptedCommandList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159351,25 +141709,25 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationLauncherAcceptedCommandList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159380,10 +141738,10 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159396,37 +141754,35 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadApplicationLauncherEventList : public ReadAttribute { +class ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadApplicationLauncherEventList() - : ReadAttribute("event-list") + ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadApplicationLauncherEventList() + ~ReadTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher EventList read Error", error); + LogNSError("TotalVolatileOrganicCompoundsConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159435,25 +141791,25 @@ class ReadApplicationLauncherEventList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { +class SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationLauncherEventList() + ~SubscribeAttributeTotalVolatileOrganicCompoundsConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTotalVolatileOrganicCompoundsConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159464,10 +141820,10 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TotalVolatileOrganicCompoundsConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159480,37 +141836,62 @@ class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster RadonConcentrationMeasurement | 0x042F | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * PeakMeasuredValue | 0x0003 | +| * PeakMeasuredValueWindow | 0x0004 | +| * AverageMeasuredValue | 0x0005 | +| * AverageMeasuredValueWindow | 0x0006 | +| * Uncertainty | 0x0007 | +| * MeasurementUnit | 0x0008 | +| * MeasurementMedium | 0x0009 | +| * LevelValue | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Attribute MeasuredValue */ -class ReadApplicationLauncherAttributeList : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasuredValue : public ReadAttribute { public: - ReadApplicationLauncherAttributeList() - : ReadAttribute("attribute-list") + ReadRadonConcentrationMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadApplicationLauncherAttributeList() + ~ReadRadonConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher AttributeList read Error", error); + LogNSError("RadonConcentrationMeasurement MeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159519,25 +141900,25 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeApplicationLauncherAttributeList() + ~SubscribeAttributeRadonConcentrationMeasurementMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159548,10 +141929,10 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159565,34 +141946,34 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute MinMeasuredValue */ -class ReadApplicationLauncherFeatureMap : public ReadAttribute { +class ReadRadonConcentrationMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadApplicationLauncherFeatureMap() - : ReadAttribute("feature-map") + ReadRadonConcentrationMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadApplicationLauncherFeatureMap() + ~ReadRadonConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher FeatureMap read Error", error); + LogNSError("RadonConcentrationMeasurement MinMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159601,25 +141982,25 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeApplicationLauncherFeatureMap() + ~SubscribeAttributeRadonConcentrationMeasurementMinMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MinMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159630,10 +142011,10 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MinMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159647,34 +142028,34 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute MaxMeasuredValue */ -class ReadApplicationLauncherClusterRevision : public ReadAttribute { +class ReadRadonConcentrationMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadApplicationLauncherClusterRevision() - : ReadAttribute("cluster-revision") + ReadRadonConcentrationMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadApplicationLauncherClusterRevision() + ~ReadRadonConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationLauncher ClusterRevision read Error", error); + LogNSError("RadonConcentrationMeasurement MaxMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159683,25 +142064,25 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeApplicationLauncherClusterRevision() + ~SubscribeAttributeRadonConcentrationMeasurementMaxMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MaxMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159712,10 +142093,10 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MaxMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159728,59 +142109,35 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationBasic | 0x050D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * VendorName | 0x0000 | -| * VendorID | 0x0001 | -| * ApplicationName | 0x0002 | -| * ProductID | 0x0003 | -| * Application | 0x0004 | -| * Status | 0x0005 | -| * ApplicationVersion | 0x0006 | -| * AllowedVendorList | 0x0007 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute VendorName + * Attribute PeakMeasuredValue */ -class ReadApplicationBasicVendorName : public ReadAttribute { +class ReadRadonConcentrationMeasurementPeakMeasuredValue : public ReadAttribute { public: - ReadApplicationBasicVendorName() - : ReadAttribute("vendor-name") + ReadRadonConcentrationMeasurementPeakMeasuredValue() + : ReadAttribute("peak-measured-value") { } - ~ReadApplicationBasicVendorName() + ~ReadRadonConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic VendorName read Error", error); + LogNSError("RadonConcentrationMeasurement PeakMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159789,25 +142146,25 @@ class ReadApplicationBasicVendorName : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() + : SubscribeAttribute("peak-measured-value") { } - ~SubscribeAttributeApplicationBasicVendorName() + ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159818,10 +142175,10 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributePeakMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159835,34 +142192,34 @@ class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { }; /* - * Attribute VendorID + * Attribute PeakMeasuredValueWindow */ -class ReadApplicationBasicVendorID : public ReadAttribute { +class ReadRadonConcentrationMeasurementPeakMeasuredValueWindow : public ReadAttribute { public: - ReadApplicationBasicVendorID() - : ReadAttribute("vendor-id") + ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() + : ReadAttribute("peak-measured-value-window") { } - ~ReadApplicationBasicVendorID() + ~ReadRadonConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePeakMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic VendorID read Error", error); + LogNSError("RadonConcentrationMeasurement PeakMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159871,25 +142228,25 @@ class ReadApplicationBasicVendorID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() + : SubscribeAttribute("peak-measured-value-window") { } - ~SubscribeAttributeApplicationBasicVendorID() + ~SubscribeAttributeRadonConcentrationMeasurementPeakMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::PeakMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159900,10 +142257,10 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributePeakMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.PeakMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159917,34 +142274,34 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { }; /* - * Attribute ApplicationName + * Attribute AverageMeasuredValue */ -class ReadApplicationBasicApplicationName : public ReadAttribute { +class ReadRadonConcentrationMeasurementAverageMeasuredValue : public ReadAttribute { public: - ReadApplicationBasicApplicationName() - : ReadAttribute("application-name") + ReadRadonConcentrationMeasurementAverageMeasuredValue() + : ReadAttribute("average-measured-value") { } - ~ReadApplicationBasicApplicationName() + ~ReadRadonConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ApplicationName read Error", error); + LogNSError("RadonConcentrationMeasurement AverageMeasuredValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -159953,25 +142310,25 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationName() - : SubscribeAttribute("application-name") + SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() + : SubscribeAttribute("average-measured-value") { } - ~SubscribeAttributeApplicationBasicApplicationName() + ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -159982,10 +142339,10 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationNameWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -159999,34 +142356,34 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib }; /* - * Attribute ProductID + * Attribute AverageMeasuredValueWindow */ -class ReadApplicationBasicProductID : public ReadAttribute { +class ReadRadonConcentrationMeasurementAverageMeasuredValueWindow : public ReadAttribute { public: - ReadApplicationBasicProductID() - : ReadAttribute("product-id") + ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() + : ReadAttribute("average-measured-value-window") { } - ~ReadApplicationBasicProductID() + ~ReadRadonConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAverageMeasuredValueWindowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ProductID read Error", error); + LogNSError("RadonConcentrationMeasurement AverageMeasuredValueWindow read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160035,25 +142392,25 @@ class ReadApplicationBasicProductID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() + : SubscribeAttribute("average-measured-value-window") { } - ~SubscribeAttributeApplicationBasicProductID() + ~SubscribeAttributeRadonConcentrationMeasurementAverageMeasuredValueWindow() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AverageMeasuredValueWindow::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160064,10 +142421,10 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeAverageMeasuredValueWindowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AverageMeasuredValueWindow response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160081,34 +142438,34 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { }; /* - * Attribute Application + * Attribute Uncertainty */ -class ReadApplicationBasicApplication : public ReadAttribute { +class ReadRadonConcentrationMeasurementUncertainty : public ReadAttribute { public: - ReadApplicationBasicApplication() - : ReadAttribute("application") + ReadRadonConcentrationMeasurementUncertainty() + : ReadAttribute("uncertainty") { } - ~ReadApplicationBasicApplication() + ~ReadRadonConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationWithCompletion:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUncertaintyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic Application read Error", error); + LogNSError("RadonConcentrationMeasurement Uncertainty read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160117,25 +142474,25 @@ class ReadApplicationBasicApplication : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementUncertainty : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplication() - : SubscribeAttribute("application") + SubscribeAttributeRadonConcentrationMeasurementUncertainty() + : SubscribeAttribute("uncertainty") { } - ~SubscribeAttributeApplicationBasicApplication() + ~SubscribeAttributeRadonConcentrationMeasurementUncertainty() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::Uncertainty::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160146,10 +142503,10 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationWithParams:params + [cluster subscribeAttributeUncertaintyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.Uncertainty response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160163,34 +142520,34 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute }; /* - * Attribute Status + * Attribute MeasurementUnit */ -class ReadApplicationBasicStatus : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasurementUnit : public ReadAttribute { public: - ReadApplicationBasicStatus() - : ReadAttribute("status") + ReadRadonConcentrationMeasurementMeasurementUnit() + : ReadAttribute("measurement-unit") { } - ~ReadApplicationBasicStatus() + ~ReadRadonConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic Status read Error", error); + LogNSError("RadonConcentrationMeasurement MeasurementUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160199,25 +142556,25 @@ class ReadApplicationBasicStatus : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicStatus() - : SubscribeAttribute("status") + SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() + : SubscribeAttribute("measurement-unit") { } - ~SubscribeAttributeApplicationBasicStatus() + ~SubscribeAttributeRadonConcentrationMeasurementMeasurementUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160228,10 +142585,10 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusWithParams:params + [cluster subscribeAttributeMeasurementUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.MeasurementUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160245,34 +142602,34 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { }; /* - * Attribute ApplicationVersion + * Attribute MeasurementMedium */ -class ReadApplicationBasicApplicationVersion : public ReadAttribute { +class ReadRadonConcentrationMeasurementMeasurementMedium : public ReadAttribute { public: - ReadApplicationBasicApplicationVersion() - : ReadAttribute("application-version") + ReadRadonConcentrationMeasurementMeasurementMedium() + : ReadAttribute("measurement-medium") { } - ~ReadApplicationBasicApplicationVersion() + ~ReadRadonConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeasurementMediumWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ApplicationVersion read Error", error); + LogNSError("RadonConcentrationMeasurement MeasurementMedium read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160281,25 +142638,25 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationVersion() - : SubscribeAttribute("application-version") + SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() + : SubscribeAttribute("measurement-medium") { } - ~SubscribeAttributeApplicationBasicApplicationVersion() + ~SubscribeAttributeRadonConcentrationMeasurementMeasurementMedium() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::MeasurementMedium::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160310,10 +142667,10 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationVersionWithParams:params + [cluster subscribeAttributeMeasurementMediumWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.MeasurementMedium response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160327,34 +142684,34 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt }; /* - * Attribute AllowedVendorList + * Attribute LevelValue */ -class ReadApplicationBasicAllowedVendorList : public ReadAttribute { +class ReadRadonConcentrationMeasurementLevelValue : public ReadAttribute { public: - ReadApplicationBasicAllowedVendorList() - : ReadAttribute("allowed-vendor-list") + ReadRadonConcentrationMeasurementLevelValue() + : ReadAttribute("level-value") { } - ~ReadApplicationBasicAllowedVendorList() + ~ReadRadonConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLevelValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AllowedVendorList read Error", error); + LogNSError("RadonConcentrationMeasurement LevelValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160363,25 +142720,25 @@ class ReadApplicationBasicAllowedVendorList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementLevelValue : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAllowedVendorList() - : SubscribeAttribute("allowed-vendor-list") + SubscribeAttributeRadonConcentrationMeasurementLevelValue() + : SubscribeAttribute("level-value") { } - ~SubscribeAttributeApplicationBasicAllowedVendorList() + ~SubscribeAttributeRadonConcentrationMeasurementLevelValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::LevelValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160392,10 +142749,10 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAllowedVendorListWithParams:params + [cluster subscribeAttributeLevelValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RadonConcentrationMeasurement.LevelValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160411,32 +142768,32 @@ class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttr /* * Attribute GeneratedCommandList */ -class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { +class ReadRadonConcentrationMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadApplicationBasicGeneratedCommandList() + ReadRadonConcentrationMeasurementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadApplicationBasicGeneratedCommandList() + ~ReadRadonConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + LogNSError("RadonConcentrationMeasurement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160445,25 +142802,25 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicGeneratedCommandList() + SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeApplicationBasicGeneratedCommandList() + ~SubscribeAttributeRadonConcentrationMeasurementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160477,7 +142834,7 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160493,32 +142850,32 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA /* * Attribute AcceptedCommandList */ -class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { +class ReadRadonConcentrationMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadApplicationBasicAcceptedCommandList() + ReadRadonConcentrationMeasurementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadApplicationBasicAcceptedCommandList() + ~ReadRadonConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AcceptedCommandList read Error", error); + LogNSError("RadonConcentrationMeasurement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160527,25 +142884,25 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAcceptedCommandList() + SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationBasicAcceptedCommandList() + ~SubscribeAttributeRadonConcentrationMeasurementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160559,7 +142916,7 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160577,32 +142934,32 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt /* * Attribute EventList */ -class ReadApplicationBasicEventList : public ReadAttribute { +class ReadRadonConcentrationMeasurementEventList : public ReadAttribute { public: - ReadApplicationBasicEventList() + ReadRadonConcentrationMeasurementEventList() : ReadAttribute("event-list") { } - ~ReadApplicationBasicEventList() + ~ReadRadonConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic EventList read Error", error); + LogNSError("RadonConcentrationMeasurement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160611,25 +142968,25 @@ class ReadApplicationBasicEventList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicEventList() + SubscribeAttributeRadonConcentrationMeasurementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationBasicEventList() + ~SubscribeAttributeRadonConcentrationMeasurementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160643,7 +143000,7 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.EventList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160661,32 +143018,32 @@ class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadApplicationBasicAttributeList : public ReadAttribute { +class ReadRadonConcentrationMeasurementAttributeList : public ReadAttribute { public: - ReadApplicationBasicAttributeList() + ReadRadonConcentrationMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadApplicationBasicAttributeList() + ~ReadRadonConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic AttributeList read Error", error); + LogNSError("RadonConcentrationMeasurement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160695,25 +143052,25 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAttributeList() + SubscribeAttributeRadonConcentrationMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationBasicAttributeList() + ~SubscribeAttributeRadonConcentrationMeasurementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160727,7 +143084,7 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160743,32 +143100,32 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut /* * Attribute FeatureMap */ -class ReadApplicationBasicFeatureMap : public ReadAttribute { +class ReadRadonConcentrationMeasurementFeatureMap : public ReadAttribute { public: - ReadApplicationBasicFeatureMap() + ReadRadonConcentrationMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadApplicationBasicFeatureMap() + ~ReadRadonConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic FeatureMap read Error", error); + LogNSError("RadonConcentrationMeasurement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160777,25 +143134,25 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicFeatureMap() + SubscribeAttributeRadonConcentrationMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationBasicFeatureMap() + ~SubscribeAttributeRadonConcentrationMeasurementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160809,7 +143166,7 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160825,32 +143182,32 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadApplicationBasicClusterRevision : public ReadAttribute { +class ReadRadonConcentrationMeasurementClusterRevision : public ReadAttribute { public: - ReadApplicationBasicClusterRevision() + ReadRadonConcentrationMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadApplicationBasicClusterRevision() + ~ReadRadonConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ApplicationBasic ClusterRevision read Error", error); + LogNSError("RadonConcentrationMeasurement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -160859,25 +143216,25 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRadonConcentrationMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicClusterRevision() + SubscribeAttributeRadonConcentrationMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationBasicClusterRevision() + ~SubscribeAttributeRadonConcentrationMeasurementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::RadonConcentrationMeasurement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::RadonConcentrationMeasurement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRadonConcentrationMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -160891,7 +143248,7 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + NSLog(@"RadonConcentrationMeasurement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -160904,15 +143261,16 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster AccountLogin | 0x050E | +| Cluster WiFiNetworkManagement | 0x0451 | |------------------------------------------------------------------------------| | Commands: | | -| * GetSetupPIN | 0x00 | -| * Login | 0x02 | -| * Logout | 0x03 | +| * NetworkPassphraseRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | +| * Ssid | 0x0000 | +| * PassphraseSurrogate | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -160921,205 +143279,262 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * LoggedOut | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command GetSetupPIN + * Command NetworkPassphraseRequest */ -class AccountLoginGetSetupPIN : public ClusterCommand { +class WiFiNetworkManagementNetworkPassphraseRequest : public ClusterCommand { public: - AccountLoginGetSetupPIN() - : ClusterCommand("get-setup-pin") + WiFiNetworkManagementNetworkPassphraseRequest() + : ClusterCommand("network-passphrase-request") { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWiFiNetworkManagementClusterNetworkPassphraseRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getSetupPINWithParams:params completion: - ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster networkPassphraseRequestWithParams:params completion: + ^(MTRWiFiNetworkManagementClusterNetworkPassphraseResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::WiFiNetworkManagement::Commands::NetworkPassphraseResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute Ssid + */ +class ReadWiFiNetworkManagementSsid : public ReadAttribute { +public: + ReadWiFiNetworkManagementSsid() + : ReadAttribute("ssid") + { + } + + ~ReadWiFiNetworkManagementSsid() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::Ssid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkManagement.SSID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WiFiNetworkManagement SSID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWiFiNetworkManagementSsid : public SubscribeAttribute { +public: + SubscribeAttributeWiFiNetworkManagementSsid() + : SubscribeAttribute("ssid") + { + } + + ~SubscribeAttributeWiFiNetworkManagementSsid() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::Ssid::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSSIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkManagement.SSID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Command Login + * Attribute PassphraseSurrogate */ -class AccountLoginLogin : public ClusterCommand { +class ReadWiFiNetworkManagementPassphraseSurrogate : public ReadAttribute { public: - AccountLoginLogin() - : ClusterCommand("login") + ReadWiFiNetworkManagementPassphraseSurrogate() + : ReadAttribute("passphrase-surrogate") + { + } + + ~ReadWiFiNetworkManagementPassphraseSurrogate() { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - AddArgument("SetupPIN", &mRequest.setupPIN); -#if MTR_ENABLE_PROVISIONAL - AddArgument("Node", 0, UINT64_MAX, &mRequest.node); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::PassphraseSurrogate::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; - params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() length:mRequest.setupPIN.size() encoding:NSUTF8StringEncoding]; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.node.HasValue()) { - params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; - } else { - params.node = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster loginWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePassphraseSurrogateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkManagement.PassphraseSurrogate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("WiFiNetworkManagement PassphraseSurrogate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; }; -/* - * Command Logout - */ -class AccountLoginLogout : public ClusterCommand { +class SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate : public SubscribeAttribute { public: - AccountLoginLogout() - : ClusterCommand("logout") + SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate() + : SubscribeAttribute("passphrase-surrogate") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Node", 0, UINT64_MAX, &mRequest.node); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeWiFiNetworkManagementPassphraseSurrogate() { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; + } - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::PassphraseSurrogate::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.node.HasValue()) { - params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; - } else { - params.node = nil; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster logoutWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePassphraseSurrogateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkManagement.PassphraseSurrogate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadAccountLoginGeneratedCommandList : public ReadAttribute { +class ReadWiFiNetworkManagementGeneratedCommandList : public ReadAttribute { public: - ReadAccountLoginGeneratedCommandList() + ReadWiFiNetworkManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAccountLoginGeneratedCommandList() + ~ReadWiFiNetworkManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin GeneratedCommandList read Error", error); + LogNSError("WiFiNetworkManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161128,25 +143543,25 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginGeneratedCommandList() + SubscribeAttributeWiFiNetworkManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAccountLoginGeneratedCommandList() + ~SubscribeAttributeWiFiNetworkManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161160,7 +143575,7 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161173,35 +143588,38 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadAccountLoginAcceptedCommandList : public ReadAttribute { +class ReadWiFiNetworkManagementAcceptedCommandList : public ReadAttribute { public: - ReadAccountLoginAcceptedCommandList() + ReadWiFiNetworkManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAccountLoginAcceptedCommandList() + ~ReadWiFiNetworkManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin AcceptedCommandList read Error", error); + LogNSError("WiFiNetworkManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161210,25 +143628,25 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAcceptedCommandList() + SubscribeAttributeWiFiNetworkManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAccountLoginAcceptedCommandList() + ~SubscribeAttributeWiFiNetworkManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161242,7 +143660,7 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161255,37 +143673,38 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadAccountLoginEventList : public ReadAttribute { +class ReadWiFiNetworkManagementEventList : public ReadAttribute { public: - ReadAccountLoginEventList() + ReadWiFiNetworkManagementEventList() : ReadAttribute("event-list") { } - ~ReadAccountLoginEventList() + ~ReadWiFiNetworkManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.EventList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin EventList read Error", error); + LogNSError("WiFiNetworkManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161294,25 +143713,25 @@ class ReadAccountLoginEventList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginEventList() + SubscribeAttributeWiFiNetworkManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAccountLoginEventList() + ~SubscribeAttributeWiFiNetworkManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161326,7 +143745,7 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.EventList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161340,36 +143759,37 @@ class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadAccountLoginAttributeList : public ReadAttribute { +class ReadWiFiNetworkManagementAttributeList : public ReadAttribute { public: - ReadAccountLoginAttributeList() + ReadWiFiNetworkManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAccountLoginAttributeList() + ~ReadWiFiNetworkManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin AttributeList read Error", error); + LogNSError("WiFiNetworkManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161378,25 +143798,25 @@ class ReadAccountLoginAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAttributeList() + SubscribeAttributeWiFiNetworkManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAccountLoginAttributeList() + ~SubscribeAttributeWiFiNetworkManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161410,7 +143830,7 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + NSLog(@"WiFiNetworkManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161423,35 +143843,38 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadAccountLoginFeatureMap : public ReadAttribute { +class ReadWiFiNetworkManagementFeatureMap : public ReadAttribute { public: - ReadAccountLoginFeatureMap() + ReadWiFiNetworkManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAccountLoginFeatureMap() + ~ReadWiFiNetworkManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + NSLog(@"WiFiNetworkManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin FeatureMap read Error", error); + LogNSError("WiFiNetworkManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161460,25 +143883,25 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginFeatureMap() + SubscribeAttributeWiFiNetworkManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAccountLoginFeatureMap() + ~SubscribeAttributeWiFiNetworkManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161492,7 +143915,7 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + NSLog(@"WiFiNetworkManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161505,35 +143928,38 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadAccountLoginClusterRevision : public ReadAttribute { +class ReadWiFiNetworkManagementClusterRevision : public ReadAttribute { public: - ReadAccountLoginClusterRevision() + ReadWiFiNetworkManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAccountLoginClusterRevision() + ~ReadWiFiNetworkManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + NSLog(@"WiFiNetworkManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AccountLogin ClusterRevision read Error", error); + LogNSError("WiFiNetworkManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -161542,25 +143968,25 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginClusterRevision() + SubscribeAttributeWiFiNetworkManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAccountLoginClusterRevision() + ~SubscribeAttributeWiFiNetworkManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -161574,7 +144000,7 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + NSLog(@"WiFiNetworkManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -161587,31 +144013,25 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ContentControl | 0x050F | +| Cluster ThreadBorderRouterManagement | 0x0452 | |------------------------------------------------------------------------------| | Commands: | | -| * UpdatePIN | 0x00 | -| * ResetPIN | 0x01 | -| * Enable | 0x03 | -| * Disable | 0x04 | -| * AddBonusTime | 0x05 | -| * SetScreenDailyTime | 0x06 | -| * BlockUnratedContent | 0x07 | -| * UnblockUnratedContent | 0x08 | -| * SetOnDemandRatingThreshold | 0x09 | -| * SetScheduledContentRatingThreshold | 0x0A | +| * GetActiveDatasetRequest | 0x00 | +| * GetPendingDatasetRequest | 0x01 | +| * SetActiveDatasetRequest | 0x03 | +| * SetPendingDatasetRequest | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * Enabled | 0x0000 | -| * OnDemandRatings | 0x0001 | -| * OnDemandRatingThreshold | 0x0002 | -| * ScheduledContentRatings | 0x0003 | -| * ScheduledContentRatingThreshold | 0x0004 | -| * ScreenDailyTime | 0x0005 | -| * RemainingScreenTime | 0x0006 | -| * BlockUnrated | 0x0007 | +| * BorderRouterName | 0x0000 | +| * BorderAgentID | 0x0001 | +| * ThreadVersion | 0x0002 | +| * InterfaceEnabled | 0x0003 | +| * ActiveDatasetTimestamp | 0x0004 | +| * PendingDatasetTimestamp | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -161620,162 +144040,52 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * RemainingScreenTimeExpired | 0x0000 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL /* - * Command UpdatePIN - */ -class ContentControlUpdatePIN : public ClusterCommand { -public: - ContentControlUpdatePIN() - : ClusterCommand("update-pin") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("OldPIN", &mRequest.oldPIN); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("NewPIN", &mRequest.newPIN); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UpdatePIN::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterUpdatePINParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.oldPIN.HasValue()) { - params.oldPIN = [[NSString alloc] initWithBytes:mRequest.oldPIN.Value().data() length:mRequest.oldPIN.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.oldPIN = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.newPIN = [[NSString alloc] initWithBytes:mRequest.newPIN.data() length:mRequest.newPIN.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updatePINWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ContentControl::Commands::UpdatePIN::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command ResetPIN - */ -class ContentControlResetPIN : public ClusterCommand { -public: - ContentControlResetPIN() - : ClusterCommand("reset-pin") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::ResetPIN::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterResetPINParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster resetPINWithParams:params completion: - ^(MTRContentControlClusterResetPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command Enable + * Command GetActiveDatasetRequest */ -class ContentControlEnable : public ClusterCommand { +class ThreadBorderRouterManagementGetActiveDatasetRequest : public ClusterCommand { public: - ContentControlEnable() - : ClusterCommand("enable") + ThreadBorderRouterManagementGetActiveDatasetRequest() + : ClusterCommand("get-active-dataset-request") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Enable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetActiveDatasetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterEnableParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadBorderRouterManagementClusterGetActiveDatasetRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster enableWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getActiveDatasetRequestWithParams:params completion: + ^(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -161786,42 +144096,48 @@ class ContentControlEnable : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command Disable + * Command GetPendingDatasetRequest */ -class ContentControlDisable : public ClusterCommand { +class ThreadBorderRouterManagementGetPendingDatasetRequest : public ClusterCommand { public: - ContentControlDisable() - : ClusterCommand("disable") + ThreadBorderRouterManagementGetPendingDatasetRequest() + : ClusterCommand("get-pending-dataset-request") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Disable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::GetPendingDatasetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterDisableParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadBorderRouterManagementClusterGetPendingDatasetRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster disableWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getPendingDatasetRequestWithParams:params completion: + ^(MTRThreadBorderRouterManagementClusterDatasetResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::DatasetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -161832,354 +144148,237 @@ class ContentControlDisable : public ClusterCommand { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command AddBonusTime + * Command SetActiveDatasetRequest */ -class ContentControlAddBonusTime : public ClusterCommand { +class ThreadBorderRouterManagementSetActiveDatasetRequest : public ClusterCommand { public: - ContentControlAddBonusTime() - : ClusterCommand("add-bonus-time") + ThreadBorderRouterManagementSetActiveDatasetRequest() + : ClusterCommand("set-active-dataset-request") { #if MTR_ENABLE_PROVISIONAL - AddArgument("PINCode", &mRequest.PINCode); + AddArgument("ActiveDataset", &mRequest.activeDataset); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("BonusTime", 0, UINT32_MAX, &mRequest.bonusTime); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBonusTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterAddBonusTimeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadBorderRouterManagementClusterSetActiveDatasetRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.PINCode.HasValue()) { - params.pinCode = [[NSString alloc] initWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.pinCode = nil; - } + params.activeDataset = [NSData dataWithBytes:mRequest.activeDataset.data() length:mRequest.activeDataset.size()]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - if (mRequest.bonusTime.HasValue()) { - params.bonusTime = [NSNumber numberWithUnsignedInt:mRequest.bonusTime.Value()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; } else { - params.bonusTime = nil; + params.breadcrumb = nil; } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster addBonusTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setActiveDatasetRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ContentControl::Commands::AddBonusTime::Type mRequest; + chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetActiveDatasetRequest::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command SetScreenDailyTime + * Command SetPendingDatasetRequest */ -class ContentControlSetScreenDailyTime : public ClusterCommand { +class ThreadBorderRouterManagementSetPendingDatasetRequest : public ClusterCommand { public: - ContentControlSetScreenDailyTime() - : ClusterCommand("set-screen-daily-time") + ThreadBorderRouterManagementSetPendingDatasetRequest() + : ClusterCommand("set-pending-dataset-request") { #if MTR_ENABLE_PROVISIONAL - AddArgument("ScreenTime", 0, UINT32_MAX, &mRequest.screenTime); + AddArgument("PendingDataset", &mRequest.pendingDataset); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterSetScreenDailyTimeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadBorderRouterManagementClusterSetPendingDatasetRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.screenTime = [NSNumber numberWithUnsignedInt:mRequest.screenTime]; + params.pendingDataset = [NSData dataWithBytes:mRequest.pendingDataset.data() length:mRequest.pendingDataset.size()]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setScreenDailyTimeWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setPendingDatasetRequestWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Type mRequest; + chip::app::Clusters::ThreadBorderRouterManagement::Commands::SetPendingDatasetRequest::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL + /* - * Command BlockUnratedContent + * Attribute BorderRouterName */ -class ContentControlBlockUnratedContent : public ClusterCommand { +class ReadThreadBorderRouterManagementBorderRouterName : public ReadAttribute { public: - ContentControlBlockUnratedContent() - : ClusterCommand("block-unrated-content") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadThreadBorderRouterManagementBorderRouterName() + : ReadAttribute("border-router-name") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterBlockUnratedContentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster blockUnratedContentWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command UnblockUnratedContent - */ -class ContentControlUnblockUnratedContent : public ClusterCommand { -public: - ContentControlUnblockUnratedContent() - : ClusterCommand("unblock-unrated-content") + ~ReadThreadBorderRouterManagementBorderRouterName() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderRouterName::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterUnblockUnratedContentParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unblockUnratedContentWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBorderRouterNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.BorderRouterName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ThreadBorderRouterManagement BorderRouterName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetOnDemandRatingThreshold - */ -class ContentControlSetOnDemandRatingThreshold : public ClusterCommand { +class SubscribeAttributeThreadBorderRouterManagementBorderRouterName : public SubscribeAttribute { public: - ContentControlSetOnDemandRatingThreshold() - : ClusterCommand("set-on-demand-rating-threshold") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Rating", &mRequest.rating); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeThreadBorderRouterManagementBorderRouterName() + : SubscribeAttribute("border-router-name") { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setOnDemandRatingThresholdWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetScheduledContentRatingThreshold - */ -class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand { -public: - ContentControlSetScheduledContentRatingThreshold() - : ClusterCommand("set-scheduled-content-rating-threshold") + ~SubscribeAttributeThreadBorderRouterManagementBorderRouterName() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Rating", &mRequest.rating); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderRouterName::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setScheduledContentRatingThresholdWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeBorderRouterNameWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.BorderRouterName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute Enabled + * Attribute BorderAgentID */ -class ReadContentControlEnabled : public ReadAttribute { +class ReadThreadBorderRouterManagementBorderAgentID : public ReadAttribute { public: - ReadContentControlEnabled() - : ReadAttribute("enabled") + ReadThreadBorderRouterManagementBorderAgentID() + : ReadAttribute("border-agent-id") { } - ~ReadContentControlEnabled() + ~ReadThreadBorderRouterManagementBorderAgentID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderAgentID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.Enabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBorderAgentIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.BorderAgentID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl Enabled read Error", error); + LogNSError("ThreadBorderRouterManagement BorderAgentID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162188,25 +144387,25 @@ class ReadContentControlEnabled : public ReadAttribute { } }; -class SubscribeAttributeContentControlEnabled : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementBorderAgentID : public SubscribeAttribute { public: - SubscribeAttributeContentControlEnabled() - : SubscribeAttribute("enabled") + SubscribeAttributeThreadBorderRouterManagementBorderAgentID() + : SubscribeAttribute("border-agent-id") { } - ~SubscribeAttributeContentControlEnabled() + ~SubscribeAttributeThreadBorderRouterManagementBorderAgentID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::BorderAgentID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162217,10 +144416,10 @@ class SubscribeAttributeContentControlEnabled : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnabledWithParams:params + [cluster subscribeAttributeBorderAgentIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.Enabled response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.BorderAgentID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162237,34 +144436,34 @@ class SubscribeAttributeContentControlEnabled : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnDemandRatings + * Attribute ThreadVersion */ -class ReadContentControlOnDemandRatings : public ReadAttribute { +class ReadThreadBorderRouterManagementThreadVersion : public ReadAttribute { public: - ReadContentControlOnDemandRatings() - : ReadAttribute("on-demand-ratings") + ReadThreadBorderRouterManagementThreadVersion() + : ReadAttribute("thread-version") { } - ~ReadContentControlOnDemandRatings() + ~ReadThreadBorderRouterManagementThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnDemandRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl OnDemandRatings read Error", error); + LogNSError("ThreadBorderRouterManagement ThreadVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162273,25 +144472,25 @@ class ReadContentControlOnDemandRatings : public ReadAttribute { } }; -class SubscribeAttributeContentControlOnDemandRatings : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementThreadVersion : public SubscribeAttribute { public: - SubscribeAttributeContentControlOnDemandRatings() - : SubscribeAttribute("on-demand-ratings") + SubscribeAttributeThreadBorderRouterManagementThreadVersion() + : SubscribeAttribute("thread-version") { } - ~SubscribeAttributeContentControlOnDemandRatings() + ~SubscribeAttributeThreadBorderRouterManagementThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162302,10 +144501,10 @@ class SubscribeAttributeContentControlOnDemandRatings : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnDemandRatingsWithParams:params + [cluster subscribeAttributeThreadVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162322,34 +144521,34 @@ class SubscribeAttributeContentControlOnDemandRatings : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnDemandRatingThreshold + * Attribute InterfaceEnabled */ -class ReadContentControlOnDemandRatingThreshold : public ReadAttribute { +class ReadThreadBorderRouterManagementInterfaceEnabled : public ReadAttribute { public: - ReadContentControlOnDemandRatingThreshold() - : ReadAttribute("on-demand-rating-threshold") + ReadThreadBorderRouterManagementInterfaceEnabled() + : ReadAttribute("interface-enabled") { } - ~ReadContentControlOnDemandRatingThreshold() + ~ReadThreadBorderRouterManagementInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnDemandRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl OnDemandRatingThreshold read Error", error); + LogNSError("ThreadBorderRouterManagement InterfaceEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162358,25 +144557,25 @@ class ReadContentControlOnDemandRatingThreshold : public ReadAttribute { } }; -class SubscribeAttributeContentControlOnDemandRatingThreshold : public SubscribeAttribute { -public: - SubscribeAttributeContentControlOnDemandRatingThreshold() - : SubscribeAttribute("on-demand-rating-threshold") +class SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled : public SubscribeAttribute { +public: + SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled() + : SubscribeAttribute("interface-enabled") { } - ~SubscribeAttributeContentControlOnDemandRatingThreshold() + ~SubscribeAttributeThreadBorderRouterManagementInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162387,10 +144586,10 @@ class SubscribeAttributeContentControlOnDemandRatingThreshold : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnDemandRatingThresholdWithParams:params + [cluster subscribeAttributeInterfaceEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162407,34 +144606,34 @@ class SubscribeAttributeContentControlOnDemandRatingThreshold : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute ScheduledContentRatings + * Attribute ActiveDatasetTimestamp */ -class ReadContentControlScheduledContentRatings : public ReadAttribute { +class ReadThreadBorderRouterManagementActiveDatasetTimestamp : public ReadAttribute { public: - ReadContentControlScheduledContentRatings() - : ReadAttribute("scheduled-content-ratings") + ReadThreadBorderRouterManagementActiveDatasetTimestamp() + : ReadAttribute("active-dataset-timestamp") { } - ~ReadContentControlScheduledContentRatings() + ~ReadThreadBorderRouterManagementActiveDatasetTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduledContentRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveDatasetTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ActiveDatasetTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl ScheduledContentRatings read Error", error); + LogNSError("ThreadBorderRouterManagement ActiveDatasetTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162443,25 +144642,25 @@ class ReadContentControlScheduledContentRatings : public ReadAttribute { } }; -class SubscribeAttributeContentControlScheduledContentRatings : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp : public SubscribeAttribute { public: - SubscribeAttributeContentControlScheduledContentRatings() - : SubscribeAttribute("scheduled-content-ratings") + SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp() + : SubscribeAttribute("active-dataset-timestamp") { } - ~SubscribeAttributeContentControlScheduledContentRatings() + ~SubscribeAttributeThreadBorderRouterManagementActiveDatasetTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ActiveDatasetTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162472,10 +144671,10 @@ class SubscribeAttributeContentControlScheduledContentRatings : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScheduledContentRatingsWithParams:params + [cluster subscribeAttributeActiveDatasetTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ActiveDatasetTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162492,34 +144691,34 @@ class SubscribeAttributeContentControlScheduledContentRatings : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute ScheduledContentRatingThreshold + * Attribute PendingDatasetTimestamp */ -class ReadContentControlScheduledContentRatingThreshold : public ReadAttribute { +class ReadThreadBorderRouterManagementPendingDatasetTimestamp : public ReadAttribute { public: - ReadContentControlScheduledContentRatingThreshold() - : ReadAttribute("scheduled-content-rating-threshold") + ReadThreadBorderRouterManagementPendingDatasetTimestamp() + : ReadAttribute("pending-dataset-timestamp") { } - ~ReadContentControlScheduledContentRatingThreshold() + ~ReadThreadBorderRouterManagementPendingDatasetTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScheduledContentRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePendingDatasetTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.PendingDatasetTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl ScheduledContentRatingThreshold read Error", error); + LogNSError("ThreadBorderRouterManagement PendingDatasetTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162528,25 +144727,25 @@ class ReadContentControlScheduledContentRatingThreshold : public ReadAttribute { } }; -class SubscribeAttributeContentControlScheduledContentRatingThreshold : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp : public SubscribeAttribute { public: - SubscribeAttributeContentControlScheduledContentRatingThreshold() - : SubscribeAttribute("scheduled-content-rating-threshold") + SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp() + : SubscribeAttribute("pending-dataset-timestamp") { } - ~SubscribeAttributeContentControlScheduledContentRatingThreshold() + ~SubscribeAttributeThreadBorderRouterManagementPendingDatasetTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::PendingDatasetTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162557,10 +144756,10 @@ class SubscribeAttributeContentControlScheduledContentRatingThreshold : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScheduledContentRatingThresholdWithParams:params + [cluster subscribeAttributePendingDatasetTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.PendingDatasetTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162577,34 +144776,34 @@ class SubscribeAttributeContentControlScheduledContentRatingThreshold : public S #if MTR_ENABLE_PROVISIONAL /* - * Attribute ScreenDailyTime + * Attribute GeneratedCommandList */ -class ReadContentControlScreenDailyTime : public ReadAttribute { +class ReadThreadBorderRouterManagementGeneratedCommandList : public ReadAttribute { public: - ReadContentControlScreenDailyTime() - : ReadAttribute("screen-daily-time") + ReadThreadBorderRouterManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadContentControlScreenDailyTime() + ~ReadThreadBorderRouterManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScreenDailyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl ScreenDailyTime read Error", error); + LogNSError("ThreadBorderRouterManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162613,25 +144812,25 @@ class ReadContentControlScreenDailyTime : public ReadAttribute { } }; -class SubscribeAttributeContentControlScreenDailyTime : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentControlScreenDailyTime() - : SubscribeAttribute("screen-daily-time") + SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeContentControlScreenDailyTime() + ~SubscribeAttributeThreadBorderRouterManagementGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162642,10 +144841,10 @@ class SubscribeAttributeContentControlScreenDailyTime : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScreenDailyTimeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162662,34 +144861,34 @@ class SubscribeAttributeContentControlScreenDailyTime : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute RemainingScreenTime + * Attribute AcceptedCommandList */ -class ReadContentControlRemainingScreenTime : public ReadAttribute { +class ReadThreadBorderRouterManagementAcceptedCommandList : public ReadAttribute { public: - ReadContentControlRemainingScreenTime() - : ReadAttribute("remaining-screen-time") + ReadThreadBorderRouterManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadContentControlRemainingScreenTime() + ~ReadThreadBorderRouterManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingScreenTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl RemainingScreenTime read Error", error); + LogNSError("ThreadBorderRouterManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162698,25 +144897,25 @@ class ReadContentControlRemainingScreenTime : public ReadAttribute { } }; -class SubscribeAttributeContentControlRemainingScreenTime : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentControlRemainingScreenTime() - : SubscribeAttribute("remaining-screen-time") + SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeContentControlRemainingScreenTime() + ~SubscribeAttributeThreadBorderRouterManagementAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162727,10 +144926,10 @@ class SubscribeAttributeContentControlRemainingScreenTime : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingScreenTimeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162747,34 +144946,34 @@ class SubscribeAttributeContentControlRemainingScreenTime : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute BlockUnrated + * Attribute EventList */ -class ReadContentControlBlockUnrated : public ReadAttribute { +class ReadThreadBorderRouterManagementEventList : public ReadAttribute { public: - ReadContentControlBlockUnrated() - : ReadAttribute("block-unrated") + ReadThreadBorderRouterManagementEventList() + : ReadAttribute("event-list") { } - ~ReadContentControlBlockUnrated() + ~ReadThreadBorderRouterManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBlockUnratedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.BlockUnrated response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl BlockUnrated read Error", error); + LogNSError("ThreadBorderRouterManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162783,25 +144982,25 @@ class ReadContentControlBlockUnrated : public ReadAttribute { } }; -class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeContentControlBlockUnrated() - : SubscribeAttribute("block-unrated") + SubscribeAttributeThreadBorderRouterManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeContentControlBlockUnrated() + ~SubscribeAttributeThreadBorderRouterManagementEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162812,10 +145011,10 @@ class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBlockUnratedWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.BlockUnrated response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162832,34 +145031,34 @@ class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadContentControlGeneratedCommandList : public ReadAttribute { +class ReadThreadBorderRouterManagementAttributeList : public ReadAttribute { public: - ReadContentControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThreadBorderRouterManagementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadContentControlGeneratedCommandList() + ~ReadThreadBorderRouterManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl GeneratedCommandList read Error", error); + LogNSError("ThreadBorderRouterManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162868,25 +145067,25 @@ class ReadContentControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeContentControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadBorderRouterManagementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeContentControlGeneratedCommandList() + ~SubscribeAttributeThreadBorderRouterManagementAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162897,10 +145096,10 @@ class SubscribeAttributeContentControlGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); + NSLog(@"ThreadBorderRouterManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -162917,34 +145116,34 @@ class SubscribeAttributeContentControlGeneratedCommandList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadContentControlAcceptedCommandList : public ReadAttribute { +class ReadThreadBorderRouterManagementFeatureMap : public ReadAttribute { public: - ReadContentControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadBorderRouterManagementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadContentControlAcceptedCommandList() + ~ReadThreadBorderRouterManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl AcceptedCommandList read Error", error); + LogNSError("ThreadBorderRouterManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -162953,25 +145152,25 @@ class ReadContentControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeContentControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadBorderRouterManagementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeContentControlAcceptedCommandList() + ~SubscribeAttributeThreadBorderRouterManagementFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -162982,10 +145181,10 @@ class SubscribeAttributeContentControlAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163002,34 +145201,34 @@ class SubscribeAttributeContentControlAcceptedCommandList : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadContentControlEventList : public ReadAttribute { +class ReadThreadBorderRouterManagementClusterRevision : public ReadAttribute { public: - ReadContentControlEventList() - : ReadAttribute("event-list") + ReadThreadBorderRouterManagementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadContentControlEventList() + ~ReadThreadBorderRouterManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl EventList read Error", error); + LogNSError("ThreadBorderRouterManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163038,25 +145237,25 @@ class ReadContentControlEventList : public ReadAttribute { } }; -class SubscribeAttributeContentControlEventList : public SubscribeAttribute { +class SubscribeAttributeThreadBorderRouterManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeContentControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadBorderRouterManagementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeContentControlEventList() + ~SubscribeAttributeThreadBorderRouterManagementClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadBorderRouterManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadBorderRouterManagement::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadBorderRouterManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163067,10 +145266,10 @@ class SubscribeAttributeContentControlEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadBorderRouterManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163083,38 +145282,228 @@ class SubscribeAttributeContentControlEventList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ThreadNetworkDirectory | 0x0453 | +|------------------------------------------------------------------------------| +| Commands: | | +| * AddNetwork | 0x00 | +| * RemoveNetwork | 0x01 | +| * GetOperationalDataset | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PreferredExtendedPanID | 0x0000 | +| * ThreadNetworks | 0x0001 | +| * ThreadNetworkTableSize | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Command AddNetwork */ -class ReadContentControlAttributeList : public ReadAttribute { +class ThreadNetworkDirectoryAddNetwork : public ClusterCommand { public: - ReadContentControlAttributeList() - : ReadAttribute("attribute-list") + ThreadNetworkDirectoryAddNetwork() + : ClusterCommand("add-network") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("OperationalDataset", &mRequest.operationalDataset); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::AddNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadNetworkDirectoryClusterAddNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addNetworkWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadContentControlAttributeList() +private: + chip::app::Clusters::ThreadNetworkDirectory::Commands::AddNetwork::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveNetwork + */ +class ThreadNetworkDirectoryRemoveNetwork : public ClusterCommand { +public: + ThreadNetworkDirectoryRemoveNetwork() + : ClusterCommand("remove-network") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExtendedPanID", &mRequest.extendedPanID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::RemoveNetwork::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadNetworkDirectoryClusterRemoveNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.extendedPanID = [NSData dataWithBytes:mRequest.extendedPanID.data() length:mRequest.extendedPanID.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeNetworkWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ThreadNetworkDirectory::Commands::RemoveNetwork::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetOperationalDataset + */ +class ThreadNetworkDirectoryGetOperationalDataset : public ClusterCommand { +public: + ThreadNetworkDirectoryGetOperationalDataset() + : ClusterCommand("get-operational-dataset") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExtendedPanID", &mRequest.extendedPanID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDirectory::Commands::GetOperationalDataset::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadNetworkDirectoryClusterGetOperationalDatasetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.extendedPanID = [NSData dataWithBytes:mRequest.extendedPanID.data() length:mRequest.extendedPanID.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getOperationalDatasetWithParams:params completion: + ^(MTRThreadNetworkDirectoryClusterOperationalDatasetResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadNetworkDirectory::Commands::OperationalDatasetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ThreadNetworkDirectory::Commands::OperationalDatasetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ThreadNetworkDirectory::Commands::GetOperationalDataset::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute PreferredExtendedPanID + */ +class ReadThreadNetworkDirectoryPreferredExtendedPanID : public ReadAttribute { +public: + ReadThreadNetworkDirectoryPreferredExtendedPanID() + : ReadAttribute("preferred-extended-pan-id") + { + } + + ~ReadThreadNetworkDirectoryPreferredExtendedPanID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePreferredExtendedPanIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDirectory.PreferredExtendedPanID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl AttributeList read Error", error); + LogNSError("ThreadNetworkDirectory PreferredExtendedPanID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163123,25 +145512,69 @@ class ReadContentControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeContentControlAttributeList : public SubscribeAttribute { +class WriteThreadNetworkDirectoryPreferredExtendedPanID : public WriteAttribute { public: - SubscribeAttributeContentControlAttributeList() - : SubscribeAttribute("attribute-list") + WriteThreadNetworkDirectoryPreferredExtendedPanID() + : WriteAttribute("preferred-extended-pan-id") { + AddArgument("attr-name", "preferred-extended-pan-id"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeContentControlAttributeList() + ~WriteThreadNetworkDirectoryPreferredExtendedPanID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSData * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [[NSData alloc] initWithBytes:mValue.Value().data() length:mValue.Value().size()]; + } + + [cluster writeAttributePreferredExtendedPanIDWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThreadNetworkDirectory PreferredExtendedPanID write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID : public SubscribeAttribute { +public: + SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID() + : SubscribeAttribute("preferred-extended-pan-id") + { + } + + ~SubscribeAttributeThreadNetworkDirectoryPreferredExtendedPanID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::PreferredExtendedPanID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163152,10 +145585,10 @@ class SubscribeAttributeContentControlAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePreferredExtendedPanIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.AttributeList response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDirectory.PreferredExtendedPanID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163172,34 +145605,34 @@ class SubscribeAttributeContentControlAttributeList : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute ThreadNetworks */ -class ReadContentControlFeatureMap : public ReadAttribute { +class ReadThreadNetworkDirectoryThreadNetworks : public ReadAttribute { public: - ReadContentControlFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDirectoryThreadNetworks() + : ReadAttribute("thread-networks") { } - ~ReadContentControlFeatureMap() + ~ReadThreadNetworkDirectoryThreadNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDirectory.ThreadNetworks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl FeatureMap read Error", error); + LogNSError("ThreadNetworkDirectory ThreadNetworks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163208,25 +145641,25 @@ class ReadContentControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeContentControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryThreadNetworks : public SubscribeAttribute { public: - SubscribeAttributeContentControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDirectoryThreadNetworks() + : SubscribeAttribute("thread-networks") { } - ~SubscribeAttributeContentControlFeatureMap() + ~SubscribeAttributeThreadNetworkDirectoryThreadNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163237,10 +145670,10 @@ class SubscribeAttributeContentControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeThreadNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDirectory.ThreadNetworks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163257,34 +145690,34 @@ class SubscribeAttributeContentControlFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute ThreadNetworkTableSize */ -class ReadContentControlClusterRevision : public ReadAttribute { +class ReadThreadNetworkDirectoryThreadNetworkTableSize : public ReadAttribute { public: - ReadContentControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDirectoryThreadNetworkTableSize() + : ReadAttribute("thread-network-table-size") { } - ~ReadContentControlClusterRevision() + ~ReadThreadNetworkDirectoryThreadNetworkTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadNetworkTableSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDirectory.ThreadNetworkTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentControl ClusterRevision read Error", error); + LogNSError("ThreadNetworkDirectory ThreadNetworkTableSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163293,25 +145726,25 @@ class ReadContentControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeContentControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize : public SubscribeAttribute { public: - SubscribeAttributeContentControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize() + : SubscribeAttribute("thread-network-table-size") { } - ~SubscribeAttributeContentControlClusterRevision() + ~SubscribeAttributeThreadNetworkDirectoryThreadNetworkTableSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ThreadNetworkTableSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163322,10 +145755,10 @@ class SubscribeAttributeContentControlClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeThreadNetworkTableSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentControl.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.ThreadNetworkTableSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163339,126 +145772,37 @@ class SubscribeAttributeContentControlClusterRevision : public SubscribeAttribut }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster ContentAppObserver | 0x0510 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ContentAppMessage | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command ContentAppMessage - */ -class ContentAppObserverContentAppMessage : public ClusterCommand { -public: - ContentAppObserverContentAppMessage() - : ClusterCommand("content-app-message") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("Data", &mRequest.data); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("EncodingHint", &mRequest.encodingHint); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - params.encodingHint = [[NSString alloc] initWithBytes:mRequest.encodingHint.data() length:mRequest.encodingHint.size() encoding:NSUTF8StringEncoding]; -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster contentAppMessageWithParams:params completion: - ^(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadContentAppObserverGeneratedCommandList : public ReadAttribute { +class ReadThreadNetworkDirectoryGeneratedCommandList : public ReadAttribute { public: - ReadContentAppObserverGeneratedCommandList() + ReadThreadNetworkDirectoryGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadContentAppObserverGeneratedCommandList() + ~ReadThreadNetworkDirectoryGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDirectory GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163467,25 +145811,25 @@ class ReadContentAppObserverGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverGeneratedCommandList() + SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeContentAppObserverGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDirectoryGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163499,7 +145843,7 @@ class SubscribeAttributeContentAppObserverGeneratedCommandList : public Subscrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163518,32 +145862,32 @@ class SubscribeAttributeContentAppObserverGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadContentAppObserverAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDirectoryAcceptedCommandList : public ReadAttribute { public: - ReadContentAppObserverAcceptedCommandList() + ReadThreadNetworkDirectoryAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadContentAppObserverAcceptedCommandList() + ~ReadThreadNetworkDirectoryAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDirectory AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163552,25 +145896,25 @@ class ReadContentAppObserverAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverAcceptedCommandList() + SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeContentAppObserverAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDirectoryAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163584,7 +145928,7 @@ class SubscribeAttributeContentAppObserverAcceptedCommandList : public Subscribe [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163603,32 +145947,32 @@ class SubscribeAttributeContentAppObserverAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadContentAppObserverEventList : public ReadAttribute { +class ReadThreadNetworkDirectoryEventList : public ReadAttribute { public: - ReadContentAppObserverEventList() + ReadThreadNetworkDirectoryEventList() : ReadAttribute("event-list") { } - ~ReadContentAppObserverEventList() + ~ReadThreadNetworkDirectoryEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.EventList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver EventList read Error", error); + LogNSError("ThreadNetworkDirectory EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163637,25 +145981,25 @@ class ReadContentAppObserverEventList : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryEventList : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverEventList() + SubscribeAttributeThreadNetworkDirectoryEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeContentAppObserverEventList() + ~SubscribeAttributeThreadNetworkDirectoryEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163669,7 +146013,7 @@ class SubscribeAttributeContentAppObserverEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.EventList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163688,32 +146032,32 @@ class SubscribeAttributeContentAppObserverEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadContentAppObserverAttributeList : public ReadAttribute { +class ReadThreadNetworkDirectoryAttributeList : public ReadAttribute { public: - ReadContentAppObserverAttributeList() + ReadThreadNetworkDirectoryAttributeList() : ReadAttribute("attribute-list") { } - ~ReadContentAppObserverAttributeList() + ~ReadThreadNetworkDirectoryAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver AttributeList read Error", error); + LogNSError("ThreadNetworkDirectory AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163722,25 +146066,25 @@ class ReadContentAppObserverAttributeList : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryAttributeList : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverAttributeList() + SubscribeAttributeThreadNetworkDirectoryAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeContentAppObserverAttributeList() + ~SubscribeAttributeThreadNetworkDirectoryAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163754,7 +146098,7 @@ class SubscribeAttributeContentAppObserverAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163773,32 +146117,32 @@ class SubscribeAttributeContentAppObserverAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadContentAppObserverFeatureMap : public ReadAttribute { +class ReadThreadNetworkDirectoryFeatureMap : public ReadAttribute { public: - ReadContentAppObserverFeatureMap() + ReadThreadNetworkDirectoryFeatureMap() : ReadAttribute("feature-map") { } - ~ReadContentAppObserverFeatureMap() + ~ReadThreadNetworkDirectoryFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver FeatureMap read Error", error); + LogNSError("ThreadNetworkDirectory FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163807,25 +146151,25 @@ class ReadContentAppObserverFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverFeatureMap() + SubscribeAttributeThreadNetworkDirectoryFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeContentAppObserverFeatureMap() + ~SubscribeAttributeThreadNetworkDirectoryFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163839,7 +146183,7 @@ class SubscribeAttributeContentAppObserverFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163858,32 +146202,32 @@ class SubscribeAttributeContentAppObserverFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadContentAppObserverClusterRevision : public ReadAttribute { +class ReadThreadNetworkDirectoryClusterRevision : public ReadAttribute { public: - ReadContentAppObserverClusterRevision() + ReadThreadNetworkDirectoryClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadContentAppObserverClusterRevision() + ~ReadThreadNetworkDirectoryClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ContentAppObserver ClusterRevision read Error", error); + LogNSError("ThreadNetworkDirectory ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -163892,25 +146236,25 @@ class ReadContentAppObserverClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDirectoryClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeContentAppObserverClusterRevision() + SubscribeAttributeThreadNetworkDirectoryClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeContentAppObserverClusterRevision() + ~SubscribeAttributeThreadNetworkDirectoryClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDirectory::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDirectory::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDirectory alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -163924,7 +146268,7 @@ class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDirectory.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -163939,15 +146283,14 @@ class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttr #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster EcosystemInformation | 0x0750 | +| Cluster WakeOnLan | 0x0503 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * DeviceDirectory | 0x0000 | -| * LocationDirectory | 0x0001 | +| * MACAddress | 0x0000 | +| * LinkLocalAddress | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -163958,41 +146301,35 @@ class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttr | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute DeviceDirectory + * Attribute MACAddress */ -class ReadEcosystemInformationDeviceDirectory : public ReadAttribute { +class ReadWakeOnLanMACAddress : public ReadAttribute { public: - ReadEcosystemInformationDeviceDirectory() - : ReadAttribute("device-directory") + ReadWakeOnLanMACAddress() + : ReadAttribute("macaddress") { } - ~ReadEcosystemInformationDeviceDirectory() + ~ReadWakeOnLanMACAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::DeviceDirectory::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeDeviceDirectoryWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.DeviceDirectory response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation DeviceDirectory read Error", error); + LogNSError("WakeOnLAN MACAddress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164001,25 +146338,25 @@ class ReadEcosystemInformationDeviceDirectory : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationDeviceDirectory : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationDeviceDirectory() - : SubscribeAttribute("device-directory") + SubscribeAttributeWakeOnLanMACAddress() + : SubscribeAttribute("macaddress") { } - ~SubscribeAttributeEcosystemInformationDeviceDirectory() + ~SubscribeAttributeWakeOnLanMACAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::DeviceDirectory::Id; + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::MACAddress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164030,10 +146367,10 @@ class SubscribeAttributeEcosystemInformationDeviceDirectory : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceDirectoryWithParams:params + [cluster subscribeAttributeMACAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.DeviceDirectory response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164046,42 +146383,37 @@ class SubscribeAttributeEcosystemInformationDeviceDirectory : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute LocationDirectory + * Attribute LinkLocalAddress */ -class ReadEcosystemInformationLocationDirectory : public ReadAttribute { +class ReadWakeOnLanLinkLocalAddress : public ReadAttribute { public: - ReadEcosystemInformationLocationDirectory() - : ReadAttribute("location-directory") + ReadWakeOnLanLinkLocalAddress() + : ReadAttribute("link-local-address") { } - ~ReadEcosystemInformationLocationDirectory() + ~ReadWakeOnLanLinkLocalAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::LocationDirectory::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeLocationDirectoryWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.LocationDirectory response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLinkLocalAddressWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation LocationDirectory read Error", error); + LogNSError("WakeOnLAN LinkLocalAddress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164090,25 +146422,25 @@ class ReadEcosystemInformationLocationDirectory : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationLocationDirectory : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanLinkLocalAddress : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationLocationDirectory() - : SubscribeAttribute("location-directory") + SubscribeAttributeWakeOnLanLinkLocalAddress() + : SubscribeAttribute("link-local-address") { } - ~SubscribeAttributeEcosystemInformationLocationDirectory() + ~SubscribeAttributeWakeOnLanLinkLocalAddress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::LocationDirectory::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::LinkLocalAddress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164119,10 +146451,10 @@ class SubscribeAttributeEcosystemInformationLocationDirectory : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocationDirectoryWithParams:params + [cluster subscribeAttributeLinkLocalAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.LocationDirectory response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.LinkLocalAddress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164136,37 +146468,36 @@ class SubscribeAttributeEcosystemInformationLocationDirectory : public Subscribe }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadEcosystemInformationGeneratedCommandList : public ReadAttribute { +class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { public: - ReadEcosystemInformationGeneratedCommandList() + ReadWakeOnLanGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadEcosystemInformationGeneratedCommandList() + ~ReadWakeOnLanGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation GeneratedCommandList read Error", error); + LogNSError("WakeOnLAN GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164175,25 +146506,25 @@ class ReadEcosystemInformationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationGeneratedCommandList() + SubscribeAttributeWakeOnLanGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeEcosystemInformationGeneratedCommandList() + ~SubscribeAttributeWakeOnLanGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164207,7 +146538,7 @@ class SubscribeAttributeEcosystemInformationGeneratedCommandList : public Subscr [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164220,38 +146551,35 @@ class SubscribeAttributeEcosystemInformationGeneratedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadEcosystemInformationAcceptedCommandList : public ReadAttribute { +class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { public: - ReadEcosystemInformationAcceptedCommandList() + ReadWakeOnLanAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadEcosystemInformationAcceptedCommandList() + ~ReadWakeOnLanAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation AcceptedCommandList read Error", error); + LogNSError("WakeOnLAN AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164260,25 +146588,25 @@ class ReadEcosystemInformationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationAcceptedCommandList() + SubscribeAttributeWakeOnLanAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeEcosystemInformationAcceptedCommandList() + ~SubscribeAttributeWakeOnLanAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164292,7 +146620,7 @@ class SubscribeAttributeEcosystemInformationAcceptedCommandList : public Subscri [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164305,38 +146633,37 @@ class SubscribeAttributeEcosystemInformationAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadEcosystemInformationEventList : public ReadAttribute { +class ReadWakeOnLanEventList : public ReadAttribute { public: - ReadEcosystemInformationEventList() + ReadWakeOnLanEventList() : ReadAttribute("event-list") { } - ~ReadEcosystemInformationEventList() + ~ReadWakeOnLanEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.EventList response %@", [value description]); + NSLog(@"WakeOnLAN.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation EventList read Error", error); + LogNSError("WakeOnLAN EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164345,25 +146672,25 @@ class ReadEcosystemInformationEventList : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationEventList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationEventList() + SubscribeAttributeWakeOnLanEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeEcosystemInformationEventList() + ~SubscribeAttributeWakeOnLanEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164377,7 +146704,7 @@ class SubscribeAttributeEcosystemInformationEventList : public SubscribeAttribut [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.EventList response %@", [value description]); + NSLog(@"WakeOnLAN.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164391,37 +146718,36 @@ class SubscribeAttributeEcosystemInformationEventList : public SubscribeAttribut }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadEcosystemInformationAttributeList : public ReadAttribute { +class ReadWakeOnLanAttributeList : public ReadAttribute { public: - ReadEcosystemInformationAttributeList() + ReadWakeOnLanAttributeList() : ReadAttribute("attribute-list") { } - ~ReadEcosystemInformationAttributeList() + ~ReadWakeOnLanAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.AttributeList response %@", [value description]); + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation AttributeList read Error", error); + LogNSError("WakeOnLAN AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164430,25 +146756,25 @@ class ReadEcosystemInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationAttributeList() + SubscribeAttributeWakeOnLanAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeEcosystemInformationAttributeList() + ~SubscribeAttributeWakeOnLanAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164462,7 +146788,7 @@ class SubscribeAttributeEcosystemInformationAttributeList : public SubscribeAttr [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.AttributeList response %@", [value description]); + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164475,38 +146801,35 @@ class SubscribeAttributeEcosystemInformationAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadEcosystemInformationFeatureMap : public ReadAttribute { +class ReadWakeOnLanFeatureMap : public ReadAttribute { public: - ReadEcosystemInformationFeatureMap() + ReadWakeOnLanFeatureMap() : ReadAttribute("feature-map") { } - ~ReadEcosystemInformationFeatureMap() + ~ReadWakeOnLanFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.FeatureMap response %@", [value description]); + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation FeatureMap read Error", error); + LogNSError("WakeOnLAN FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164515,25 +146838,25 @@ class ReadEcosystemInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationFeatureMap() + SubscribeAttributeWakeOnLanFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeEcosystemInformationFeatureMap() + ~SubscribeAttributeWakeOnLanFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164547,7 +146870,7 @@ class SubscribeAttributeEcosystemInformationFeatureMap : public SubscribeAttribu [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.FeatureMap response %@", [value description]); + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164560,38 +146883,35 @@ class SubscribeAttributeEcosystemInformationFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadEcosystemInformationClusterRevision : public ReadAttribute { +class ReadWakeOnLanClusterRevision : public ReadAttribute { public: - ReadEcosystemInformationClusterRevision() + ReadWakeOnLanClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadEcosystemInformationClusterRevision() + ~ReadWakeOnLanClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.ClusterRevision response %@", [value description]); + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EcosystemInformation ClusterRevision read Error", error); + LogNSError("WakeOnLAN ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164600,25 +146920,25 @@ class ReadEcosystemInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeEcosystemInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeEcosystemInformationClusterRevision() + SubscribeAttributeWakeOnLanClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeEcosystemInformationClusterRevision() + ~SubscribeAttributeWakeOnLanClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WakeOnLan::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WakeOnLan::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164632,7 +146952,7 @@ class SubscribeAttributeEcosystemInformationClusterRevision : public SubscribeAt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.ClusterRevision response %@", [value description]); + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164645,18 +146965,21 @@ class SubscribeAttributeEcosystemInformationClusterRevision : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster CommissionerControl | 0x0751 | +| Cluster Channel | 0x0504 | |------------------------------------------------------------------------------| | Commands: | | -| * RequestCommissioningApproval | 0x00 | -| * CommissionNode | 0x01 | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x02 | +| * SkipChannel | 0x03 | +| * GetProgramGuide | 0x04 | +| * RecordProgram | 0x06 | +| * CancelRecordProgram | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDeviceCategories | 0x0000 | +| * ChannelList | 0x0000 | +| * Lineup | 0x0001 | +| * CurrentChannel | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -164665,181 +146988,542 @@ class SubscribeAttributeEcosystemInformationClusterRevision : public SubscribeAt | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * CommissioningRequestResult | 0x0000 | \*----------------------------------------------------------------------------*/ +/* + * Command ChangeChannel + */ +class ChannelChangeChannel : public ClusterCommand { +public: + ChannelChangeChannel() + : ClusterCommand("change-channel") + { + AddArgument("Match", &mRequest.match); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.match = [[NSString alloc] initWithBytes:mRequest.match.data() length:mRequest.match.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelWithParams:params completion: + ^(MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ChangeChannelResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; +}; + +/* + * Command ChangeChannelByNumber + */ +class ChannelChangeChannelByNumber : public ClusterCommand { +public: + ChannelChangeChannelByNumber() + : ClusterCommand("change-channel-by-number") + { + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; + params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelByNumberWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; +}; + +/* + * Command SkipChannel + */ +class ChannelSkipChannel : public ClusterCommand { +public: + ChannelSkipChannel() + : ClusterCommand("skip-channel") + { + AddArgument("Count", INT16_MIN, INT16_MAX, &mRequest.count); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::SkipChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.count = [NSNumber numberWithShort:mRequest.count]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipChannelWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Channel::Commands::SkipChannel::Type mRequest; +}; + #if MTR_ENABLE_PROVISIONAL /* - * Command RequestCommissioningApproval + * Command GetProgramGuide */ -class CommissionerControlRequestCommissioningApproval : public ClusterCommand { +class ChannelGetProgramGuide : public ClusterCommand { public: - CommissionerControlRequestCommissioningApproval() - : ClusterCommand("request-commissioning-approval") + ChannelGetProgramGuide() + : ClusterCommand("get-program-guide") + , mComplex_ChannelList(&mRequest.channelList) + , mComplex_PageToken(&mRequest.pageToken) + , mComplex_ExternalIDList(&mRequest.externalIDList) { #if MTR_ENABLE_PROVISIONAL - AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("EndTime", 0, UINT32_MAX, &mRequest.endTime); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); + AddArgument("ChannelList", &mComplex_ChannelList); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("Label", &mRequest.label); + AddArgument("PageToken", &mComplex_PageToken); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("RecordingFlag", 0, UINT32_MAX, &mRequest.recordingFlag); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::GetProgramGuide::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterGetProgramGuideParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; + if (mRequest.startTime.HasValue()) { + params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime.Value()]; + } else { + params.startTime = nil; + } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + if (mRequest.endTime.HasValue()) { + params.endTime = [NSNumber numberWithUnsignedInt:mRequest.endTime.Value()]; + } else { + params.endTime = nil; + } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; + if (mRequest.channelList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.channelList.Value()) { + MTRChannelClusterChannelInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterChannelInfoStruct new]; + newElement_1.majorNumber = [NSNumber numberWithUnsignedShort:entry_1.majorNumber]; + newElement_1.minorNumber = [NSNumber numberWithUnsignedShort:entry_1.minorNumber]; + if (entry_1.name.HasValue()) { + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.Value().data() length:entry_1.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.name = nil; + } + if (entry_1.callSign.HasValue()) { + newElement_1.callSign = [[NSString alloc] initWithBytes:entry_1.callSign.Value().data() length:entry_1.callSign.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.callSign = nil; + } + if (entry_1.affiliateCallSign.HasValue()) { + newElement_1.affiliateCallSign = [[NSString alloc] initWithBytes:entry_1.affiliateCallSign.Value().data() length:entry_1.affiliateCallSign.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.affiliateCallSign = nil; + } + if (entry_1.identifier.HasValue()) { + newElement_1.identifier = [[NSString alloc] initWithBytes:entry_1.identifier.Value().data() length:entry_1.identifier.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_1.identifier = nil; + } + if (entry_1.type.HasValue()) { + newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type.Value())]; + } else { + newElement_1.type = nil; + } + [array_1 addObject:newElement_1]; + } + params.channelList = array_1; + } + } else { + params.channelList = nil; + } #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - if (mRequest.label.HasValue()) { - params.label = [[NSString alloc] initWithBytes:mRequest.label.Value().data() length:mRequest.label.Value().size() encoding:NSUTF8StringEncoding]; + if (mRequest.pageToken.HasValue()) { + params.pageToken = [MTRChannelClusterPageTokenStruct new]; + if (mRequest.pageToken.Value().limit.HasValue()) { + params.pageToken.limit = [NSNumber numberWithUnsignedShort:mRequest.pageToken.Value().limit.Value()]; + } else { + params.pageToken.limit = nil; + } + if (mRequest.pageToken.Value().after.HasValue()) { + params.pageToken.after = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().after.Value().data() length:mRequest.pageToken.Value().after.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.after = nil; + } + if (mRequest.pageToken.Value().before.HasValue()) { + params.pageToken.before = [[NSString alloc] initWithBytes:mRequest.pageToken.Value().before.Value().data() length:mRequest.pageToken.Value().before.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pageToken.before = nil; + } } else { - params.label = nil; + params.pageToken = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.recordingFlag.HasValue()) { + params.recordingFlag = [NSNumber numberWithUnsignedInt:mRequest.recordingFlag.Value().Raw()]; + } else { + params.recordingFlag = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.externalIDList.Value()) { + MTRChannelClusterAdditionalInfoStruct * newElement_1; + newElement_1 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_1.name = [[NSString alloc] initWithBytes:entry_1.name.data() length:entry_1.name.size() encoding:NSUTF8StringEncoding]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + [array_1 addObject:newElement_1]; + } + params.externalIDList = array_1; + } + } else { + params.externalIDList = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster requestCommissioningApprovalWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getProgramGuideWithParams:params completion: + ^(MTRChannelClusterProgramGuideResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Channel::Commands::ProgramGuideResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Type mRequest; + chip::app::Clusters::Channel::Commands::GetProgramGuide::Type mRequest; + TypedComplexArgument>> mComplex_ChannelList; + TypedComplexArgument> mComplex_PageToken; + TypedComplexArgument>> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command CommissionNode + * Command RecordProgram */ -class CommissionerControlCommissionNode : public ClusterCommand { +class ChannelRecordProgram : public ClusterCommand { public: - CommissionerControlCommissionNode() - : ClusterCommand("commission-node") + ChannelRecordProgram() + : ClusterCommand("record-program") + , mComplex_ExternalIDList(&mRequest.externalIDList) { #if MTR_ENABLE_PROVISIONAL - AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("ResponseTimeoutSeconds", 0, UINT16_MAX, &mRequest.responseTimeoutSeconds); + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::RecordProgram::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRCommissionerControlClusterCommissionNodeParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterRecordProgramParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; + params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.responseTimeoutSeconds = [NSNumber numberWithUnsignedShort:mRequest.responseTimeoutSeconds]; + params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.externalIDList) { + MTRChannelClusterAdditionalInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + params.externalIDList = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster commissionNodeWithParams:params completion: - ^(MTRCommissionerControlClusterReverseOpenCommissioningWindowParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster recordProgramWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Type mRequest; + chip::app::Clusters::Channel::Commands::RecordProgram::Type mRequest; + TypedComplexArgument> mComplex_ExternalIDList; }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelRecordProgram + */ +class ChannelCancelRecordProgram : public ClusterCommand { +public: + ChannelCancelRecordProgram() + : ClusterCommand("cancel-record-program") + , mComplex_ExternalIDList(&mRequest.externalIDList) + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ProgramIdentifier", &mRequest.programIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ShouldRecordSeries", 0, 1, &mRequest.shouldRecordSeries); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ExternalIDList", &mComplex_ExternalIDList); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Channel::Commands::CancelRecordProgram::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterCancelRecordProgramParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.programIdentifier = [[NSString alloc] initWithBytes:mRequest.programIdentifier.data() length:mRequest.programIdentifier.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.shouldRecordSeries = [NSNumber numberWithBool:mRequest.shouldRecordSeries]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.externalIDList) { + MTRChannelClusterAdditionalInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterAdditionalInfoStruct new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() length:entry_0.name.size() encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() length:entry_0.value.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + params.externalIDList = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL + params.data = [NSData dataWithBytes:mRequest.data.data() length:mRequest.data.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster cancelRecordProgramWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Channel::Commands::CancelRecordProgram::Type mRequest; + TypedComplexArgument> mComplex_ExternalIDList; +}; + +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedDeviceCategories + * Attribute ChannelList */ -class ReadCommissionerControlSupportedDeviceCategories : public ReadAttribute { +class ReadChannelChannelList : public ReadAttribute { public: - ReadCommissionerControlSupportedDeviceCategories() - : ReadAttribute("supported-device-categories") + ReadChannelChannelList() + : ReadAttribute("channel-list") { } - ~ReadCommissionerControlSupportedDeviceCategories() + ~ReadChannelChannelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedDeviceCategoriesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.SupportedDeviceCategories response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl SupportedDeviceCategories read Error", error); + LogNSError("Channel ChannelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164848,25 +147532,25 @@ class ReadCommissionerControlSupportedDeviceCategories : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlSupportedDeviceCategories : public SubscribeAttribute { +class SubscribeAttributeChannelChannelList : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlSupportedDeviceCategories() - : SubscribeAttribute("supported-device-categories") + SubscribeAttributeChannelChannelList() + : SubscribeAttribute("channel-list") { } - ~SubscribeAttributeCommissionerControlSupportedDeviceCategories() + ~SubscribeAttributeChannelChannelList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ChannelList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164877,10 +147561,10 @@ class SubscribeAttributeCommissionerControlSupportedDeviceCategories : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedDeviceCategoriesWithParams:params + [cluster subscribeAttributeChannelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.SupportedDeviceCategories response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164893,38 +147577,199 @@ class SubscribeAttributeCommissionerControlSupportedDeviceCategories : public Su } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/* + * Attribute Lineup + */ +class ReadChannelLineup : public ReadAttribute { +public: + ReadChannelLineup() + : ReadAttribute("lineup") + { + } + + ~ReadChannelLineup() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Channel Lineup read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeChannelLineup : public SubscribeAttribute { +public: + SubscribeAttributeChannelLineup() + : SubscribeAttribute("lineup") + { + } + + ~SubscribeAttributeChannelLineup() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::Lineup::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLineupWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute CurrentChannel + */ +class ReadChannelCurrentChannel : public ReadAttribute { +public: + ReadChannelCurrentChannel() + : ReadAttribute("current-channel") + { + } + + ~ReadChannelCurrentChannel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentChannelWithCompletion:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Channel CurrentChannel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { +public: + SubscribeAttributeChannelCurrentChannel() + : SubscribeAttribute("current-channel") + { + } + + ~SubscribeAttributeChannelCurrentChannel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::CurrentChannel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCurrentChannelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; /* * Attribute GeneratedCommandList */ -class ReadCommissionerControlGeneratedCommandList : public ReadAttribute { +class ReadChannelGeneratedCommandList : public ReadAttribute { public: - ReadCommissionerControlGeneratedCommandList() + ReadChannelGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadCommissionerControlGeneratedCommandList() + ~ReadChannelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.GeneratedCommandList response %@", [value description]); + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl GeneratedCommandList read Error", error); + LogNSError("Channel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -164933,25 +147778,25 @@ class ReadCommissionerControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlGeneratedCommandList() + SubscribeAttributeChannelGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeCommissionerControlGeneratedCommandList() + ~SubscribeAttributeChannelGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -164965,7 +147810,7 @@ class SubscribeAttributeCommissionerControlGeneratedCommandList : public Subscri [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.GeneratedCommandList response %@", [value description]); + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -164978,38 +147823,35 @@ class SubscribeAttributeCommissionerControlGeneratedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadCommissionerControlAcceptedCommandList : public ReadAttribute { +class ReadChannelAcceptedCommandList : public ReadAttribute { public: - ReadCommissionerControlAcceptedCommandList() + ReadChannelAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadCommissionerControlAcceptedCommandList() + ~ReadChannelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.AcceptedCommandList response %@", [value description]); + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl AcceptedCommandList read Error", error); + LogNSError("Channel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165018,25 +147860,25 @@ class ReadCommissionerControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlAcceptedCommandList() + SubscribeAttributeChannelAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeCommissionerControlAcceptedCommandList() + ~SubscribeAttributeChannelAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165050,7 +147892,7 @@ class SubscribeAttributeCommissionerControlAcceptedCommandList : public Subscrib [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.AcceptedCommandList response %@", [value description]); + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165063,38 +147905,37 @@ class SubscribeAttributeCommissionerControlAcceptedCommandList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadCommissionerControlEventList : public ReadAttribute { +class ReadChannelEventList : public ReadAttribute { public: - ReadCommissionerControlEventList() + ReadChannelEventList() : ReadAttribute("event-list") { } - ~ReadCommissionerControlEventList() + ~ReadChannelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.EventList response %@", [value description]); + NSLog(@"Channel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl EventList read Error", error); + LogNSError("Channel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165103,25 +147944,25 @@ class ReadCommissionerControlEventList : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlEventList : public SubscribeAttribute { +class SubscribeAttributeChannelEventList : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlEventList() + SubscribeAttributeChannelEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeCommissionerControlEventList() + ~SubscribeAttributeChannelEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165135,7 +147976,7 @@ class SubscribeAttributeCommissionerControlEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.EventList response %@", [value description]); + NSLog(@"Channel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165149,37 +147990,36 @@ class SubscribeAttributeCommissionerControlEventList : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadCommissionerControlAttributeList : public ReadAttribute { +class ReadChannelAttributeList : public ReadAttribute { public: - ReadCommissionerControlAttributeList() + ReadChannelAttributeList() : ReadAttribute("attribute-list") { } - ~ReadCommissionerControlAttributeList() + ~ReadChannelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.AttributeList response %@", [value description]); + NSLog(@"Channel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl AttributeList read Error", error); + LogNSError("Channel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165188,25 +148028,25 @@ class ReadCommissionerControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlAttributeList() + SubscribeAttributeChannelAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeCommissionerControlAttributeList() + ~SubscribeAttributeChannelAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165220,7 +148060,7 @@ class SubscribeAttributeCommissionerControlAttributeList : public SubscribeAttri [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.AttributeList response %@", [value description]); + NSLog(@"Channel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165233,38 +148073,35 @@ class SubscribeAttributeCommissionerControlAttributeList : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadCommissionerControlFeatureMap : public ReadAttribute { +class ReadChannelFeatureMap : public ReadAttribute { public: - ReadCommissionerControlFeatureMap() + ReadChannelFeatureMap() : ReadAttribute("feature-map") { } - ~ReadCommissionerControlFeatureMap() + ~ReadChannelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.FeatureMap response %@", [value description]); + NSLog(@"Channel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl FeatureMap read Error", error); + LogNSError("Channel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165273,25 +148110,25 @@ class ReadCommissionerControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlFeatureMap() + SubscribeAttributeChannelFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeCommissionerControlFeatureMap() + ~SubscribeAttributeChannelFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165305,7 +148142,7 @@ class SubscribeAttributeCommissionerControlFeatureMap : public SubscribeAttribut [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.FeatureMap response %@", [value description]); + NSLog(@"Channel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165318,38 +148155,35 @@ class SubscribeAttributeCommissionerControlFeatureMap : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadCommissionerControlClusterRevision : public ReadAttribute { +class ReadChannelClusterRevision : public ReadAttribute { public: - ReadCommissionerControlClusterRevision() + ReadChannelClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadCommissionerControlClusterRevision() + ~ReadChannelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.ClusterRevision response %@", [value description]); + NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("CommissionerControl ClusterRevision read Error", error); + LogNSError("Channel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165358,25 +148192,25 @@ class ReadCommissionerControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeCommissionerControlClusterRevision() + SubscribeAttributeChannelClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeCommissionerControlClusterRevision() + ~SubscribeAttributeChannelClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Channel::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165390,7 +148224,7 @@ class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAtt [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"CommissionerControl.ClusterRevision response %@", [value description]); + NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165403,144 +148237,15 @@ class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ElectricalMeasurement | 0x0B04 | +| Cluster TargetNavigator | 0x0505 | |------------------------------------------------------------------------------| | Commands: | | -| * GetProfileInfoCommand | 0x00 | -| * GetMeasurementProfileCommand | 0x01 | +| * NavigateTarget | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasurementType | 0x0000 | -| * DcVoltage | 0x0100 | -| * DcVoltageMin | 0x0101 | -| * DcVoltageMax | 0x0102 | -| * DcCurrent | 0x0103 | -| * DcCurrentMin | 0x0104 | -| * DcCurrentMax | 0x0105 | -| * DcPower | 0x0106 | -| * DcPowerMin | 0x0107 | -| * DcPowerMax | 0x0108 | -| * DcVoltageMultiplier | 0x0200 | -| * DcVoltageDivisor | 0x0201 | -| * DcCurrentMultiplier | 0x0202 | -| * DcCurrentDivisor | 0x0203 | -| * DcPowerMultiplier | 0x0204 | -| * DcPowerDivisor | 0x0205 | -| * AcFrequency | 0x0300 | -| * AcFrequencyMin | 0x0301 | -| * AcFrequencyMax | 0x0302 | -| * NeutralCurrent | 0x0303 | -| * TotalActivePower | 0x0304 | -| * TotalReactivePower | 0x0305 | -| * TotalApparentPower | 0x0306 | -| * Measured1stHarmonicCurrent | 0x0307 | -| * Measured3rdHarmonicCurrent | 0x0308 | -| * Measured5thHarmonicCurrent | 0x0309 | -| * Measured7thHarmonicCurrent | 0x030A | -| * Measured9thHarmonicCurrent | 0x030B | -| * Measured11thHarmonicCurrent | 0x030C | -| * MeasuredPhase1stHarmonicCurrent | 0x030D | -| * MeasuredPhase3rdHarmonicCurrent | 0x030E | -| * MeasuredPhase5thHarmonicCurrent | 0x030F | -| * MeasuredPhase7thHarmonicCurrent | 0x0310 | -| * MeasuredPhase9thHarmonicCurrent | 0x0311 | -| * MeasuredPhase11thHarmonicCurrent | 0x0312 | -| * AcFrequencyMultiplier | 0x0400 | -| * AcFrequencyDivisor | 0x0401 | -| * PowerMultiplier | 0x0402 | -| * PowerDivisor | 0x0403 | -| * HarmonicCurrentMultiplier | 0x0404 | -| * PhaseHarmonicCurrentMultiplier | 0x0405 | -| * InstantaneousVoltage | 0x0500 | -| * InstantaneousLineCurrent | 0x0501 | -| * InstantaneousActiveCurrent | 0x0502 | -| * InstantaneousReactiveCurrent | 0x0503 | -| * InstantaneousPower | 0x0504 | -| * RmsVoltage | 0x0505 | -| * RmsVoltageMin | 0x0506 | -| * RmsVoltageMax | 0x0507 | -| * RmsCurrent | 0x0508 | -| * RmsCurrentMin | 0x0509 | -| * RmsCurrentMax | 0x050A | -| * ActivePower | 0x050B | -| * ActivePowerMin | 0x050C | -| * ActivePowerMax | 0x050D | -| * ReactivePower | 0x050E | -| * ApparentPower | 0x050F | -| * PowerFactor | 0x0510 | -| * AverageRmsVoltageMeasurementPeriod | 0x0511 | -| * AverageRmsUnderVoltageCounter | 0x0513 | -| * RmsExtremeOverVoltagePeriod | 0x0514 | -| * RmsExtremeUnderVoltagePeriod | 0x0515 | -| * RmsVoltageSagPeriod | 0x0516 | -| * RmsVoltageSwellPeriod | 0x0517 | -| * AcVoltageMultiplier | 0x0600 | -| * AcVoltageDivisor | 0x0601 | -| * AcCurrentMultiplier | 0x0602 | -| * AcCurrentDivisor | 0x0603 | -| * AcPowerMultiplier | 0x0604 | -| * AcPowerDivisor | 0x0605 | -| * OverloadAlarmsMask | 0x0700 | -| * VoltageOverload | 0x0701 | -| * CurrentOverload | 0x0702 | -| * AcOverloadAlarmsMask | 0x0800 | -| * AcVoltageOverload | 0x0801 | -| * AcCurrentOverload | 0x0802 | -| * AcActivePowerOverload | 0x0803 | -| * AcReactivePowerOverload | 0x0804 | -| * AverageRmsOverVoltage | 0x0805 | -| * AverageRmsUnderVoltage | 0x0806 | -| * RmsExtremeOverVoltage | 0x0807 | -| * RmsExtremeUnderVoltage | 0x0808 | -| * RmsVoltageSag | 0x0809 | -| * RmsVoltageSwell | 0x080A | -| * LineCurrentPhaseB | 0x0901 | -| * ActiveCurrentPhaseB | 0x0902 | -| * ReactiveCurrentPhaseB | 0x0903 | -| * RmsVoltagePhaseB | 0x0905 | -| * RmsVoltageMinPhaseB | 0x0906 | -| * RmsVoltageMaxPhaseB | 0x0907 | -| * RmsCurrentPhaseB | 0x0908 | -| * RmsCurrentMinPhaseB | 0x0909 | -| * RmsCurrentMaxPhaseB | 0x090A | -| * ActivePowerPhaseB | 0x090B | -| * ActivePowerMinPhaseB | 0x090C | -| * ActivePowerMaxPhaseB | 0x090D | -| * ReactivePowerPhaseB | 0x090E | -| * ApparentPowerPhaseB | 0x090F | -| * PowerFactorPhaseB | 0x0910 | -| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | -| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | -| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | -| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | -| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | -| * RmsVoltageSagPeriodPhaseB | 0x0916 | -| * RmsVoltageSwellPeriodPhaseB | 0x0917 | -| * LineCurrentPhaseC | 0x0A01 | -| * ActiveCurrentPhaseC | 0x0A02 | -| * ReactiveCurrentPhaseC | 0x0A03 | -| * RmsVoltagePhaseC | 0x0A05 | -| * RmsVoltageMinPhaseC | 0x0A06 | -| * RmsVoltageMaxPhaseC | 0x0A07 | -| * RmsCurrentPhaseC | 0x0A08 | -| * RmsCurrentMinPhaseC | 0x0A09 | -| * RmsCurrentMaxPhaseC | 0x0A0A | -| * ActivePowerPhaseC | 0x0A0B | -| * ActivePowerMinPhaseC | 0x0A0C | -| * ActivePowerMaxPhaseC | 0x0A0D | -| * ReactivePowerPhaseC | 0x0A0E | -| * ApparentPowerPhaseC | 0x0A0F | -| * PowerFactorPhaseC | 0x0A10 | -| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | -| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | -| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | -| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | -| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | -| * RmsVoltageSagPeriodPhaseC | 0x0A16 | -| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | +| * TargetList | 0x0000 | +| * CurrentTarget | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -165549,132 +148254,97 @@ class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAtt | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * TargetUpdated | 0x0000 | \*----------------------------------------------------------------------------*/ /* - * Command GetProfileInfoCommand + * Command NavigateTarget */ -class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { +class TargetNavigatorNavigateTarget : public ClusterCommand { public: - ElectricalMeasurementGetProfileInfoCommand() - : ClusterCommand("get-profile-info-command") + TargetNavigatorNavigateTarget() + : ClusterCommand("navigate-target") { + AddArgument("Target", 0, UINT8_MAX, &mRequest.target); + AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getProfileInfoCommandWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command GetMeasurementProfileCommand - */ -class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand { -public: - ElectricalMeasurementGetMeasurementProfileCommand() - : ClusterCommand("get-measurement-profile-command") - { - AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); - AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.attributeId = [NSNumber numberWithUnsignedShort:mRequest.attributeId]; - params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime]; - params.numberOfIntervals = [NSNumber numberWithUnsignedChar:mRequest.numberOfIntervals]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getMeasurementProfileCommandWithParams:params completion: - ^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster navigateTargetWithParams:params completion: + ^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; /* - * Attribute MeasurementType + * Attribute TargetList */ -class ReadElectricalMeasurementMeasurementType : public ReadAttribute { +class ReadTargetNavigatorTargetList : public ReadAttribute { public: - ReadElectricalMeasurementMeasurementType() - : ReadAttribute("measurement-type") + ReadTargetNavigatorTargetList() + : ReadAttribute("target-list") { } - ~ReadElectricalMeasurementMeasurementType() + ~ReadTargetNavigatorTargetList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasurementType read Error", error); + LogNSError("TargetNavigator TargetList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165683,25 +148353,25 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasurementType() - : SubscribeAttribute("measurement-type") + SubscribeAttributeTargetNavigatorTargetList() + : SubscribeAttribute("target-list") { } - ~SubscribeAttributeElectricalMeasurementMeasurementType() + ~SubscribeAttributeTargetNavigatorTargetList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::TargetList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165712,10 +148382,10 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementTypeWithParams:params + [cluster subscribeAttributeTargetListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.TargetList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165729,34 +148399,34 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA }; /* - * Attribute DcVoltage + * Attribute CurrentTarget */ -class ReadElectricalMeasurementDcVoltage : public ReadAttribute { +class ReadTargetNavigatorCurrentTarget : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltage() - : ReadAttribute("dc-voltage") + ReadTargetNavigatorCurrentTarget() + : ReadAttribute("current-target") { } - ~ReadElectricalMeasurementDcVoltage() + ~ReadTargetNavigatorCurrentTarget() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcVoltage read Error", error); + LogNSError("TargetNavigator CurrentTarget read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165765,25 +148435,25 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltage() - : SubscribeAttribute("dc-voltage") + SubscribeAttributeTargetNavigatorCurrentTarget() + : SubscribeAttribute("current-target") { } - ~SubscribeAttributeElectricalMeasurementDcVoltage() + ~SubscribeAttributeTargetNavigatorCurrentTarget() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::CurrentTarget::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165794,10 +148464,10 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageWithParams:params + [cluster subscribeAttributeCurrentTargetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165811,34 +148481,34 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu }; /* - * Attribute DcVoltageMin + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { +class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMin() - : ReadAttribute("dc-voltage-min") + ReadTargetNavigatorGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementDcVoltageMin() + ~ReadTargetNavigatorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); + LogNSError("TargetNavigator GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165847,25 +148517,25 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMin() - : SubscribeAttribute("dc-voltage-min") + SubscribeAttributeTargetNavigatorGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMin() + ~SubscribeAttributeTargetNavigatorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165876,10 +148546,10 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMinWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165893,34 +148563,34 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr }; /* - * Attribute DcVoltageMax + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { +class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMax() - : ReadAttribute("dc-voltage-max") + ReadTargetNavigatorAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementDcVoltageMax() + ~ReadTargetNavigatorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); + LogNSError("TargetNavigator AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -165929,25 +148599,25 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMax() - : SubscribeAttribute("dc-voltage-max") + SubscribeAttributeTargetNavigatorAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMax() + ~SubscribeAttributeTargetNavigatorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -165958,10 +148628,10 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMaxWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -165974,35 +148644,37 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute DcCurrent + * Attribute EventList */ -class ReadElectricalMeasurementDcCurrent : public ReadAttribute { +class ReadTargetNavigatorEventList : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrent() - : ReadAttribute("dc-current") + ReadTargetNavigatorEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementDcCurrent() + ~ReadTargetNavigatorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcCurrent read Error", error); + LogNSError("TargetNavigator EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166011,25 +148683,25 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrent() - : SubscribeAttribute("dc-current") + SubscribeAttributeTargetNavigatorEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementDcCurrent() + ~SubscribeAttributeTargetNavigatorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166040,10 +148712,10 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166056,35 +148728,37 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute DcCurrentMin + * Attribute AttributeList */ -class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { +class ReadTargetNavigatorAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMin() - : ReadAttribute("dc-current-min") + ReadTargetNavigatorAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementDcCurrentMin() + ~ReadTargetNavigatorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); + LogNSError("TargetNavigator AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166093,25 +148767,25 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMin() - : SubscribeAttribute("dc-current-min") + SubscribeAttributeTargetNavigatorAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMin() + ~SubscribeAttributeTargetNavigatorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166122,10 +148796,10 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMinWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166139,34 +148813,34 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr }; /* - * Attribute DcCurrentMax + * Attribute FeatureMap */ -class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { +class ReadTargetNavigatorFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMax() - : ReadAttribute("dc-current-max") + ReadTargetNavigatorFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementDcCurrentMax() + ~ReadTargetNavigatorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); + LogNSError("TargetNavigator FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166175,25 +148849,25 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMax() - : SubscribeAttribute("dc-current-max") + SubscribeAttributeTargetNavigatorFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMax() + ~SubscribeAttributeTargetNavigatorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166204,10 +148878,10 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMaxWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166221,34 +148895,34 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr }; /* - * Attribute DcPower + * Attribute ClusterRevision */ -class ReadElectricalMeasurementDcPower : public ReadAttribute { +class ReadTargetNavigatorClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementDcPower() - : ReadAttribute("dc-power") + ReadTargetNavigatorClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementDcPower() + ~ReadTargetNavigatorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcPower read Error", error); + LogNSError("TargetNavigator ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166257,25 +148931,25 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPower() - : SubscribeAttribute("dc-power") + SubscribeAttributeTargetNavigatorClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementDcPower() + ~SubscribeAttributeTargetNavigatorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TargetNavigator::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TargetNavigator::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166286,10 +148960,10 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166302,199 +148976,817 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| Cluster MediaPlayback | 0x0506 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Play | 0x00 | +| * Pause | 0x01 | +| * Stop | 0x02 | +| * StartOver | 0x03 | +| * Previous | 0x04 | +| * Next | 0x05 | +| * Rewind | 0x06 | +| * FastForward | 0x07 | +| * SkipForward | 0x08 | +| * SkipBackward | 0x09 | +| * Seek | 0x0B | +| * ActivateAudioTrack | 0x0C | +| * ActivateTextTrack | 0x0D | +| * DeactivateTextTrack | 0x0E | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentState | 0x0000 | +| * StartTime | 0x0001 | +| * Duration | 0x0002 | +| * SampledPosition | 0x0003 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | +| * ActiveAudioTrack | 0x0007 | +| * AvailableAudioTracks | 0x0008 | +| * ActiveTextTrack | 0x0009 | +| * AvailableTextTracks | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChanged | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute DcPowerMin + * Command Play */ -class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { +class MediaPlaybackPlay : public ClusterCommand { public: - ReadElectricalMeasurementDcPowerMin() - : ReadAttribute("dc-power-min") + MediaPlaybackPlay() + : ClusterCommand("play") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Play::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster playWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadElectricalMeasurementDcPowerMin() +private: +}; + +/* + * Command Pause + */ +class MediaPlaybackPause : public ClusterCommand { +public: + MediaPlaybackPause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Pause::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement DcPowerMin read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster pauseWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttribute { +/* + * Command Stop + */ +class MediaPlaybackStop : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementDcPowerMin() - : SubscribeAttribute("dc-power-min") + MediaPlaybackStop() + : ClusterCommand("stop") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Stop::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~SubscribeAttributeElectricalMeasurementDcPowerMin() +private: +}; + +/* + * Command StartOver + */ +class MediaPlaybackStartOver : public ClusterCommand { +public: + MediaPlaybackStartOver() + : ClusterCommand("start-over") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::StartOver::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startOverWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Previous + */ +class MediaPlaybackPrevious : public ClusterCommand { +public: + MediaPlaybackPrevious() + : ClusterCommand("previous") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Previous::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster previousWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Next + */ +class MediaPlaybackNext : public ClusterCommand { +public: + MediaPlaybackNext() + : ClusterCommand("next") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Next::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterNextParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster nextWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeDcPowerMinWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Rewind + */ +class MediaPlaybackRewind : public ClusterCommand { +public: + MediaPlaybackRewind() + : ClusterCommand("rewind") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Rewind::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.audioAdvanceUnmuted.HasValue()) { + params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; + } else { + params.audioAdvanceUnmuted = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster rewindWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::MediaPlayback::Commands::Rewind::Type mRequest; +}; + +/* + * Command FastForward + */ +class MediaPlaybackFastForward : public ClusterCommand { +public: + MediaPlaybackFastForward() + : ClusterCommand("fast-forward") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioAdvanceUnmuted", 0, 1, &mRequest.audioAdvanceUnmuted); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::FastForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.audioAdvanceUnmuted.HasValue()) { + params.audioAdvanceUnmuted = [NSNumber numberWithBool:mRequest.audioAdvanceUnmuted.Value()]; + } else { + params.audioAdvanceUnmuted = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster fastForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::MediaPlayback::Commands::FastForward::Type mRequest; +}; + +/* + * Command SkipForward + */ +class MediaPlaybackSkipForward : public ClusterCommand { +public: + MediaPlaybackSkipForward() + : ClusterCommand("skip-forward") + { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipForward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipForwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; +}; + +/* + * Command SkipBackward + */ +class MediaPlaybackSkipBackward : public ClusterCommand { +public: + MediaPlaybackSkipBackward() + : ClusterCommand("skip-backward") + { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipBackwardWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; +}; + +/* + * Command Seek + */ +class MediaPlaybackSeek : public ClusterCommand { +public: + MediaPlaybackSeek() + : ClusterCommand("seek") + { + AddArgument("Position", 0, UINT64_MAX, &mRequest.position); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::Seek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster seekWithParams:params completion: + ^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command ActivateAudioTrack + */ +class MediaPlaybackActivateAudioTrack : public ClusterCommand { +public: + MediaPlaybackActivateAudioTrack() + : ClusterCommand("activate-audio-track") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrackID", &mRequest.trackID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("AudioOutputIndex", 0, UINT8_MAX, &mRequest.audioOutputIndex); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterActivateAudioTrackParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.audioOutputIndex]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster activateAudioTrackWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::ActivateAudioTrack::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute DcPowerMax + * Command ActivateTextTrack */ -class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { +class MediaPlaybackActivateTextTrack : public ClusterCommand { public: - ReadElectricalMeasurementDcPowerMax() - : ReadAttribute("dc-power-max") - { - } - - ~ReadElectricalMeasurementDcPowerMax() + MediaPlaybackActivateTextTrack() + : ClusterCommand("activate-text-track") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrackID", &mRequest.trackID); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement DcPowerMax read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterActivateTextTrackParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.trackID = [[NSString alloc] initWithBytes:mRequest.trackID.data() length:mRequest.trackID.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster activateTextTrackWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::ActivateTextTrack::Type mRequest; }; -class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command DeactivateTextTrack + */ +class MediaPlaybackDeactivateTextTrack : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementDcPowerMax() - : SubscribeAttribute("dc-power-max") - { - } - - ~SubscribeAttributeElectricalMeasurementDcPowerMax() + MediaPlaybackDeactivateTextTrack() + : ClusterCommand("deactivate-text-track") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaPlayback::Commands::DeactivateTextTrack::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterDeactivateTextTrackParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster deactivateTextTrackWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeDcPowerMaxWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute DcVoltageMultiplier + * Attribute CurrentState */ -class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { +class ReadMediaPlaybackCurrentState : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMultiplier() - : ReadAttribute("dc-voltage-multiplier") + ReadMediaPlaybackCurrentState() + : ReadAttribute("current-state") { } - ~ReadElectricalMeasurementDcVoltageMultiplier() + ~ReadMediaPlaybackCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); + LogNSError("MediaPlayback CurrentState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166503,25 +149795,25 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() - : SubscribeAttribute("dc-voltage-multiplier") + SubscribeAttributeMediaPlaybackCurrentState() + : SubscribeAttribute("current-state") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() + ~SubscribeAttributeMediaPlaybackCurrentState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::CurrentState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166532,10 +149824,10 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMultiplierWithParams:params + [cluster subscribeAttributeCurrentStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166549,34 +149841,34 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr }; /* - * Attribute DcVoltageDivisor + * Attribute StartTime */ -class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { +class ReadMediaPlaybackStartTime : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageDivisor() - : ReadAttribute("dc-voltage-divisor") + ReadMediaPlaybackStartTime() + : ReadAttribute("start-time") { } - ~ReadElectricalMeasurementDcVoltageDivisor() + ~ReadMediaPlaybackStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); + LogNSError("MediaPlayback StartTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166585,25 +149877,25 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageDivisor() - : SubscribeAttribute("dc-voltage-divisor") + SubscribeAttributeMediaPlaybackStartTime() + : SubscribeAttribute("start-time") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageDivisor() + ~SubscribeAttributeMediaPlaybackStartTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::StartTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166614,10 +149906,10 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageDivisorWithParams:params + [cluster subscribeAttributeStartTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166631,34 +149923,34 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe }; /* - * Attribute DcCurrentMultiplier + * Attribute Duration */ -class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { +class ReadMediaPlaybackDuration : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMultiplier() - : ReadAttribute("dc-current-multiplier") + ReadMediaPlaybackDuration() + : ReadAttribute("duration") { } - ~ReadElectricalMeasurementDcCurrentMultiplier() + ~ReadMediaPlaybackDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); + LogNSError("MediaPlayback Duration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166667,25 +149959,25 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() - : SubscribeAttribute("dc-current-multiplier") + SubscribeAttributeMediaPlaybackDuration() + : SubscribeAttribute("duration") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() + ~SubscribeAttributeMediaPlaybackDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::Duration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166696,10 +149988,10 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMultiplierWithParams:params + [cluster subscribeAttributeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166713,34 +150005,34 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr }; /* - * Attribute DcCurrentDivisor + * Attribute SampledPosition */ -class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { +class ReadMediaPlaybackSampledPosition : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentDivisor() - : ReadAttribute("dc-current-divisor") + ReadMediaPlaybackSampledPosition() + : ReadAttribute("sampled-position") { } - ~ReadElectricalMeasurementDcCurrentDivisor() + ~ReadMediaPlaybackSampledPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSampledPositionWithCompletion:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); + LogNSError("MediaPlayback SampledPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166749,25 +150041,25 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentDivisor() - : SubscribeAttribute("dc-current-divisor") + SubscribeAttributeMediaPlaybackSampledPosition() + : SubscribeAttribute("sampled-position") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentDivisor() + ~SubscribeAttributeMediaPlaybackSampledPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SampledPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166778,10 +150070,10 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentDivisorWithParams:params + [cluster subscribeAttributeSampledPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166795,34 +150087,34 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe }; /* - * Attribute DcPowerMultiplier + * Attribute PlaybackSpeed */ -class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { +class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerMultiplier() - : ReadAttribute("dc-power-multiplier") + ReadMediaPlaybackPlaybackSpeed() + : ReadAttribute("playback-speed") { } - ~ReadElectricalMeasurementDcPowerMultiplier() + ~ReadMediaPlaybackPlaybackSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); + LogNSError("MediaPlayback PlaybackSpeed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166831,25 +150123,25 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerMultiplier() - : SubscribeAttribute("dc-power-multiplier") + SubscribeAttributeMediaPlaybackPlaybackSpeed() + : SubscribeAttribute("playback-speed") { } - ~SubscribeAttributeElectricalMeasurementDcPowerMultiplier() + ~SubscribeAttributeMediaPlaybackPlaybackSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::PlaybackSpeed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166860,10 +150152,10 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerMultiplierWithParams:params + [cluster subscribeAttributePlaybackSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166877,34 +150169,34 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib }; /* - * Attribute DcPowerDivisor + * Attribute SeekRangeEnd */ -class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { +class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerDivisor() - : ReadAttribute("dc-power-divisor") + ReadMediaPlaybackSeekRangeEnd() + : ReadAttribute("seek-range-end") { } - ~ReadElectricalMeasurementDcPowerDivisor() + ~ReadMediaPlaybackSeekRangeEnd() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); + LogNSError("MediaPlayback SeekRangeEnd read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166913,25 +150205,25 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerDivisor() - : SubscribeAttribute("dc-power-divisor") + SubscribeAttributeMediaPlaybackSeekRangeEnd() + : SubscribeAttribute("seek-range-end") { } - ~SubscribeAttributeElectricalMeasurementDcPowerDivisor() + ~SubscribeAttributeMediaPlaybackSeekRangeEnd() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeEnd::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -166942,10 +150234,10 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerDivisorWithParams:params + [cluster subscribeAttributeSeekRangeEndWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -166959,34 +150251,34 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt }; /* - * Attribute AcFrequency + * Attribute SeekRangeStart */ -class ReadElectricalMeasurementAcFrequency : public ReadAttribute { +class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequency() - : ReadAttribute("ac-frequency") + ReadMediaPlaybackSeekRangeStart() + : ReadAttribute("seek-range-start") { } - ~ReadElectricalMeasurementAcFrequency() + ~ReadMediaPlaybackSeekRangeStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcFrequency read Error", error); + LogNSError("MediaPlayback SeekRangeStart read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -166995,25 +150287,25 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequency() - : SubscribeAttribute("ac-frequency") + SubscribeAttributeMediaPlaybackSeekRangeStart() + : SubscribeAttribute("seek-range-start") { } - ~SubscribeAttributeElectricalMeasurementAcFrequency() + ~SubscribeAttributeMediaPlaybackSeekRangeStart() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::SeekRangeStart::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167024,10 +150316,10 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyWithParams:params + [cluster subscribeAttributeSeekRangeStartWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167040,35 +150332,37 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcFrequencyMin + * Attribute ActiveAudioTrack */ -class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { +class ReadMediaPlaybackActiveAudioTrack : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMin() - : ReadAttribute("ac-frequency-min") + ReadMediaPlaybackActiveAudioTrack() + : ReadAttribute("active-audio-track") { } - ~ReadElectricalMeasurementAcFrequencyMin() + ~ReadMediaPlaybackActiveAudioTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveAudioTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); + LogNSError("MediaPlayback ActiveAudioTrack read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167077,25 +150371,25 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackActiveAudioTrack : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMin() - : SubscribeAttribute("ac-frequency-min") + SubscribeAttributeMediaPlaybackActiveAudioTrack() + : SubscribeAttribute("active-audio-track") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMin() + ~SubscribeAttributeMediaPlaybackActiveAudioTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveAudioTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167106,10 +150400,10 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMinWithParams:params + [cluster subscribeAttributeActiveAudioTrackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveAudioTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167122,35 +150416,38 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcFrequencyMax + * Attribute AvailableAudioTracks */ -class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { +class ReadMediaPlaybackAvailableAudioTracks : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMax() - : ReadAttribute("ac-frequency-max") + ReadMediaPlaybackAvailableAudioTracks() + : ReadAttribute("available-audio-tracks") { } - ~ReadElectricalMeasurementAcFrequencyMax() + ~ReadMediaPlaybackAvailableAudioTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAvailableAudioTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableAudioTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); + LogNSError("MediaPlayback AvailableAudioTracks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167159,25 +150456,25 @@ class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAvailableAudioTracks : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMax() - : SubscribeAttribute("ac-frequency-max") + SubscribeAttributeMediaPlaybackAvailableAudioTracks() + : SubscribeAttribute("available-audio-tracks") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMax() + ~SubscribeAttributeMediaPlaybackAvailableAudioTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableAudioTracks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167188,10 +150485,10 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMaxWithParams:params + [cluster subscribeAttributeAvailableAudioTracksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableAudioTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167204,35 +150501,38 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute NeutralCurrent + * Attribute ActiveTextTrack */ -class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { +class ReadMediaPlaybackActiveTextTrack : public ReadAttribute { public: - ReadElectricalMeasurementNeutralCurrent() - : ReadAttribute("neutral-current") + ReadMediaPlaybackActiveTextTrack() + : ReadAttribute("active-text-track") { } - ~ReadElectricalMeasurementNeutralCurrent() + ~ReadMediaPlaybackActiveTextTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveTextTrackWithCompletion:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); + LogNSError("MediaPlayback ActiveTextTrack read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167241,25 +150541,25 @@ class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackActiveTextTrack : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementNeutralCurrent() - : SubscribeAttribute("neutral-current") + SubscribeAttributeMediaPlaybackActiveTextTrack() + : SubscribeAttribute("active-text-track") { } - ~SubscribeAttributeElectricalMeasurementNeutralCurrent() + ~SubscribeAttributeMediaPlaybackActiveTextTrack() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ActiveTextTrack::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167270,10 +150570,10 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNeutralCurrentWithParams:params + [cluster subscribeAttributeActiveTextTrackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterTrackStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ActiveTextTrack response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167286,35 +150586,38 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TotalActivePower + * Attribute AvailableTextTracks */ -class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { +class ReadMediaPlaybackAvailableTextTracks : public ReadAttribute { public: - ReadElectricalMeasurementTotalActivePower() - : ReadAttribute("total-active-power") + ReadMediaPlaybackAvailableTextTracks() + : ReadAttribute("available-text-tracks") { } - ~ReadElectricalMeasurementTotalActivePower() + ~ReadMediaPlaybackAvailableTextTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAvailableTextTracksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement TotalActivePower read Error", error); + LogNSError("MediaPlayback AvailableTextTracks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167323,25 +150626,25 @@ class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementTotalActivePower : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAvailableTextTracks : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalActivePower() - : SubscribeAttribute("total-active-power") + SubscribeAttributeMediaPlaybackAvailableTextTracks() + : SubscribeAttribute("available-text-tracks") { } - ~SubscribeAttributeElectricalMeasurementTotalActivePower() + ~SubscribeAttributeMediaPlaybackAvailableTextTracks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AvailableTextTracks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167352,10 +150655,10 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalActivePowerWithParams:params + [cluster subscribeAttributeAvailableTextTracksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AvailableTextTracks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167368,35 +150671,37 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute TotalReactivePower + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { +class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementTotalReactivePower() - : ReadAttribute("total-reactive-power") + ReadMediaPlaybackGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementTotalReactivePower() + ~ReadMediaPlaybackGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); + LogNSError("MediaPlayback GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167405,25 +150710,25 @@ class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementTotalReactivePower : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalReactivePower() - : SubscribeAttribute("total-reactive-power") + SubscribeAttributeMediaPlaybackGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementTotalReactivePower() + ~SubscribeAttributeMediaPlaybackGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167434,10 +150739,10 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalReactivePowerWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167451,34 +150756,34 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri }; /* - * Attribute TotalApparentPower + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { +class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementTotalApparentPower() - : ReadAttribute("total-apparent-power") + ReadMediaPlaybackAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementTotalApparentPower() + ~ReadMediaPlaybackAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); + LogNSError("MediaPlayback AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167487,25 +150792,25 @@ class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementTotalApparentPower : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalApparentPower() - : SubscribeAttribute("total-apparent-power") + SubscribeAttributeMediaPlaybackAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementTotalApparentPower() + ~SubscribeAttributeMediaPlaybackAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167516,10 +150821,10 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalApparentPowerWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167532,35 +150837,37 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Measured1stHarmonicCurrent + * Attribute EventList */ -class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute { +class ReadMediaPlaybackEventList : public ReadAttribute { public: - ReadElectricalMeasurementMeasured1stHarmonicCurrent() - : ReadAttribute("measured1st-harmonic-current") + ReadMediaPlaybackEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementMeasured1stHarmonicCurrent() + ~ReadMediaPlaybackEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); + LogNSError("MediaPlayback EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167569,25 +150876,25 @@ class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() - : SubscribeAttribute("measured1st-harmonic-current") + SubscribeAttributeMediaPlaybackEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() + ~SubscribeAttributeMediaPlaybackEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167598,10 +150905,10 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured1stHarmonicCurrentWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167614,35 +150921,37 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute Measured3rdHarmonicCurrent + * Attribute AttributeList */ -class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute { +class ReadMediaPlaybackAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementMeasured3rdHarmonicCurrent() - : ReadAttribute("measured3rd-harmonic-current") + ReadMediaPlaybackAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementMeasured3rdHarmonicCurrent() + ~ReadMediaPlaybackAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); + LogNSError("MediaPlayback AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167651,25 +150960,25 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() - : SubscribeAttribute("measured3rd-harmonic-current") + SubscribeAttributeMediaPlaybackAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() + ~SubscribeAttributeMediaPlaybackAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167680,10 +150989,10 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167697,34 +151006,34 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public }; /* - * Attribute Measured5thHarmonicCurrent + * Attribute FeatureMap */ -class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute { +class ReadMediaPlaybackFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementMeasured5thHarmonicCurrent() - : ReadAttribute("measured5th-harmonic-current") + ReadMediaPlaybackFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementMeasured5thHarmonicCurrent() + ~ReadMediaPlaybackFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); + LogNSError("MediaPlayback FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167733,25 +151042,25 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() - : SubscribeAttribute("measured5th-harmonic-current") + SubscribeAttributeMediaPlaybackFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() + ~SubscribeAttributeMediaPlaybackFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167762,10 +151071,10 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured5thHarmonicCurrentWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167779,34 +151088,34 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public }; /* - * Attribute Measured7thHarmonicCurrent + * Attribute ClusterRevision */ -class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute { +class ReadMediaPlaybackClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementMeasured7thHarmonicCurrent() - : ReadAttribute("measured7th-harmonic-current") + ReadMediaPlaybackClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementMeasured7thHarmonicCurrent() + ~ReadMediaPlaybackClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); + LogNSError("MediaPlayback ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -167815,25 +151124,25 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() - : SubscribeAttribute("measured7th-harmonic-current") + SubscribeAttributeMediaPlaybackClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() + ~SubscribeAttributeMediaPlaybackClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaPlayback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaPlayback::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -167844,10 +151153,10 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured7thHarmonicCurrentWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -167860,199 +151169,241 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster MediaInput | 0x0507 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectInput | 0x00 | +| * ShowInputStatus | 0x01 | +| * HideInputStatus | 0x02 | +| * RenameInput | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * InputList | 0x0000 | +| * CurrentInput | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute Measured9thHarmonicCurrent + * Command SelectInput */ -class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute { +class MediaInputSelectInput : public ClusterCommand { public: - ReadElectricalMeasurementMeasured9thHarmonicCurrent() - : ReadAttribute("measured9th-harmonic-current") - { - } - - ~ReadElectricalMeasurementMeasured9thHarmonicCurrent() + MediaInputSelectInput() + : ClusterCommand("select-input") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::SelectInput::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster selectInputWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaInput::Commands::SelectInput::Type mRequest; }; -class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public SubscribeAttribute { +/* + * Command ShowInputStatus + */ +class MediaInputShowInputStatus : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() - : SubscribeAttribute("measured9th-harmonic-current") - { - } - - ~SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() + MediaInputShowInputStatus() + : ClusterCommand("show-input-status") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster showInputStatusWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMeasured9thHarmonicCurrentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute Measured11thHarmonicCurrent + * Command HideInputStatus */ -class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribute { +class MediaInputHideInputStatus : public ClusterCommand { public: - ReadElectricalMeasurementMeasured11thHarmonicCurrent() - : ReadAttribute("measured11th-harmonic-current") - { - } - - ~ReadElectricalMeasurementMeasured11thHarmonicCurrent() + MediaInputHideInputStatus() + : ClusterCommand("hide-input-status") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster hideInputStatusWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : public SubscribeAttribute { +/* + * Command RenameInput + */ +class MediaInputRenameInput : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() - : SubscribeAttribute("measured11th-harmonic-current") - { - } - - ~SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() + MediaInputRenameInput() + : ClusterCommand("rename-input") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::MediaInput::Commands::RenameInput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster renameInputWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMeasured11thHarmonicCurrentWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; }; /* - * Attribute MeasuredPhase1stHarmonicCurrent + * Attribute InputList */ -class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttribute { +class ReadMediaInputInputList : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() - : ReadAttribute("measured-phase1st-harmonic-current") + ReadMediaInputInputList() + : ReadAttribute("input-list") { } - ~ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() + ~ReadMediaInputInputList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.InputList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + LogNSError("MediaInput InputList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168061,25 +151412,25 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() - : SubscribeAttribute("measured-phase1st-harmonic-current") + SubscribeAttributeMediaInputInputList() + : SubscribeAttribute("input-list") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() + ~SubscribeAttributeMediaInputInputList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::InputList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168090,10 +151441,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:params + [cluster subscribeAttributeInputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.InputList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168107,34 +151458,34 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p }; /* - * Attribute MeasuredPhase3rdHarmonicCurrent + * Attribute CurrentInput */ -class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttribute { +class ReadMediaInputCurrentInput : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() - : ReadAttribute("measured-phase3rd-harmonic-current") + ReadMediaInputCurrentInput() + : ReadAttribute("current-input") { } - ~ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() + ~ReadMediaInputCurrentInput() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.CurrentInput response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); + LogNSError("MediaInput CurrentInput read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168143,25 +151494,25 @@ class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() - : SubscribeAttribute("measured-phase3rd-harmonic-current") + SubscribeAttributeMediaInputCurrentInput() + : SubscribeAttribute("current-input") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() + ~SubscribeAttributeMediaInputCurrentInput() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::CurrentInput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168172,10 +151523,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:params + [cluster subscribeAttributeCurrentInputWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + NSLog(@"MediaInput.CurrentInput response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168189,34 +151540,34 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p }; /* - * Attribute MeasuredPhase5thHarmonicCurrent + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttribute { +class ReadMediaInputGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() - : ReadAttribute("measured-phase5th-harmonic-current") + ReadMediaInputGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() + ~ReadMediaInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); + LogNSError("MediaInput GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168225,25 +151576,25 @@ class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() - : SubscribeAttribute("measured-phase5th-harmonic-current") + SubscribeAttributeMediaInputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() + ~SubscribeAttributeMediaInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168254,10 +151605,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168271,34 +151622,34 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p }; /* - * Attribute MeasuredPhase7thHarmonicCurrent + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttribute { +class ReadMediaInputAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() - : ReadAttribute("measured-phase7th-harmonic-current") + ReadMediaInputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() + ~ReadMediaInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); + LogNSError("MediaInput AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168307,25 +151658,25 @@ class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() - : SubscribeAttribute("measured-phase7th-harmonic-current") + SubscribeAttributeMediaInputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() + ~SubscribeAttributeMediaInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168336,10 +151687,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168352,35 +151703,37 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MeasuredPhase9thHarmonicCurrent + * Attribute EventList */ -class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttribute { +class ReadMediaInputEventList : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() - : ReadAttribute("measured-phase9th-harmonic-current") + ReadMediaInputEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() + ~ReadMediaInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); + LogNSError("MediaInput EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168389,25 +151742,25 @@ class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() - : SubscribeAttribute("measured-phase9th-harmonic-current") + SubscribeAttributeMediaInputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() + ~SubscribeAttributeMediaInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168418,10 +151771,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168434,35 +151787,37 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute MeasuredPhase11thHarmonicCurrent + * Attribute AttributeList */ -class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAttribute { +class ReadMediaInputAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() - : ReadAttribute("measured-phase11th-harmonic-current") + ReadMediaInputAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() + ~ReadMediaInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); + LogNSError("MediaInput AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168471,25 +151826,25 @@ class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAtt } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() - : SubscribeAttribute("measured-phase11th-harmonic-current") + SubscribeAttributeMediaInputAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() + ~SubscribeAttributeMediaInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168500,10 +151855,10 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168517,34 +151872,34 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : }; /* - * Attribute AcFrequencyMultiplier + * Attribute FeatureMap */ -class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { +class ReadMediaInputFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMultiplier() - : ReadAttribute("ac-frequency-multiplier") + ReadMediaInputFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementAcFrequencyMultiplier() + ~ReadMediaInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); + LogNSError("MediaInput FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168553,25 +151908,25 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public SubscribeAttribute { +class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() - : SubscribeAttribute("ac-frequency-multiplier") + SubscribeAttributeMediaInputFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() + ~SubscribeAttributeMediaInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168582,10 +151937,10 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMultiplierWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + NSLog(@"MediaInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168599,34 +151954,34 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs }; /* - * Attribute AcFrequencyDivisor + * Attribute ClusterRevision */ -class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { +class ReadMediaInputClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyDivisor() - : ReadAttribute("ac-frequency-divisor") + ReadMediaInputClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementAcFrequencyDivisor() + ~ReadMediaInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); + LogNSError("MediaInput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168635,25 +151990,25 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public SubscribeAttribute { +class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() - : SubscribeAttribute("ac-frequency-divisor") + SubscribeAttributeMediaInputClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() + ~SubscribeAttributeMediaInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::MediaInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MediaInput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168664,10 +152019,10 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyDivisorWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168680,117 +152035,96 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri } }; +/*----------------------------------------------------------------------------*\ +| Cluster LowPower | 0x0508 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Sleep | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute PowerMultiplier + * Command Sleep */ -class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { +class LowPowerSleep : public ClusterCommand { public: - ReadElectricalMeasurementPowerMultiplier() - : ReadAttribute("power-multiplier") - { - } - - ~ReadElectricalMeasurementPowerMultiplier() + LowPowerSleep() + : ClusterCommand("sleep") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeAttribute { -public: - SubscribeAttributeElectricalMeasurementPowerMultiplier() - : SubscribeAttribute("power-multiplier") - { - } - - ~SubscribeAttributeElectricalMeasurementPowerMultiplier() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LowPower::Commands::Sleep::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster sleepWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributePowerMultiplierWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute PowerDivisor + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { +class ReadLowPowerGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementPowerDivisor() - : ReadAttribute("power-divisor") + ReadLowPowerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementPowerDivisor() + ~ReadLowPowerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement PowerDivisor read Error", error); + LogNSError("LowPower GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168799,25 +152133,25 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerDivisor() - : SubscribeAttribute("power-divisor") + SubscribeAttributeLowPowerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementPowerDivisor() + ~SubscribeAttributeLowPowerGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168828,10 +152162,10 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerDivisorWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168845,34 +152179,34 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr }; /* - * Attribute HarmonicCurrentMultiplier + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute { +class ReadLowPowerAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementHarmonicCurrentMultiplier() - : ReadAttribute("harmonic-current-multiplier") + ReadLowPowerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementHarmonicCurrentMultiplier() + ~ReadLowPowerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); + LogNSError("LowPower AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168881,25 +152215,25 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() - : SubscribeAttribute("harmonic-current-multiplier") + SubscribeAttributeLowPowerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() + ~SubscribeAttributeLowPowerAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168910,10 +152244,10 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHarmonicCurrentMultiplierWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -168926,35 +152260,37 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PhaseHarmonicCurrentMultiplier + * Attribute EventList */ -class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttribute { +class ReadLowPowerEventList : public ReadAttribute { public: - ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() - : ReadAttribute("phase-harmonic-current-multiplier") + ReadLowPowerEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() + ~ReadLowPowerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); + LogNSError("LowPower EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -168963,25 +152299,25 @@ class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttri } }; -class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() - : SubscribeAttribute("phase-harmonic-current-multiplier") + SubscribeAttributeLowPowerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() + ~SubscribeAttributeLowPowerEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -168992,10 +152328,10 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169008,35 +152344,37 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute InstantaneousVoltage + * Attribute AttributeList */ -class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { +class ReadLowPowerAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousVoltage() - : ReadAttribute("instantaneous-voltage") + ReadLowPowerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementInstantaneousVoltage() + ~ReadLowPowerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); + LogNSError("LowPower AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169045,25 +152383,25 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public SubscribeAttribute { +class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousVoltage() - : SubscribeAttribute("instantaneous-voltage") + SubscribeAttributeLowPowerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousVoltage() + ~SubscribeAttributeLowPowerAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169074,10 +152412,10 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousVoltageWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169091,34 +152429,34 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc }; /* - * Attribute InstantaneousLineCurrent + * Attribute FeatureMap */ -class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { +class ReadLowPowerFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousLineCurrent() - : ReadAttribute("instantaneous-line-current") + ReadLowPowerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementInstantaneousLineCurrent() + ~ReadLowPowerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + LogNSError("LowPower FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169127,25 +152465,25 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public SubscribeAttribute { +class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() - : SubscribeAttribute("instantaneous-line-current") + SubscribeAttributeLowPowerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() + ~SubscribeAttributeLowPowerFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169156,10 +152494,10 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousLineCurrentWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169173,34 +152511,34 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S }; /* - * Attribute InstantaneousActiveCurrent + * Attribute ClusterRevision */ -class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute { +class ReadLowPowerClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousActiveCurrent() - : ReadAttribute("instantaneous-active-current") + ReadLowPowerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementInstantaneousActiveCurrent() + ~ReadLowPowerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + LogNSError("LowPower ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169209,25 +152547,25 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public SubscribeAttribute { +class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() - : SubscribeAttribute("instantaneous-active-current") + SubscribeAttributeLowPowerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() + ~SubscribeAttributeLowPowerClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LowPower::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LowPower::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169238,10 +152576,10 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousActiveCurrentWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169254,35 +152592,105 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster KeypadInput | 0x0509 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SendKey | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command SendKey + */ +class KeypadInputSendKey : public ClusterCommand { +public: + KeypadInputSendKey() + : ClusterCommand("send-key") + { + AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::KeypadInput::Commands::SendKey::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster sendKeyWithParams:params completion: + ^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; +}; + /* - * Attribute InstantaneousReactiveCurrent + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribute { +class ReadKeypadInputGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousReactiveCurrent() - : ReadAttribute("instantaneous-reactive-current") + ReadKeypadInputGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementInstantaneousReactiveCurrent() + ~ReadKeypadInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); + LogNSError("KeypadInput GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169291,25 +152699,25 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu } }; -class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : public SubscribeAttribute { +class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() - : SubscribeAttribute("instantaneous-reactive-current") + SubscribeAttributeKeypadInputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() + ~SubscribeAttributeKeypadInputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169320,10 +152728,10 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousReactiveCurrentWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169337,34 +152745,34 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ }; /* - * Attribute InstantaneousPower + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { +class ReadKeypadInputAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousPower() - : ReadAttribute("instantaneous-power") + ReadKeypadInputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementInstantaneousPower() + ~ReadKeypadInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); + LogNSError("KeypadInput AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169373,25 +152781,25 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousPower : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousPower() - : SubscribeAttribute("instantaneous-power") + SubscribeAttributeKeypadInputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousPower() + ~SubscribeAttributeKeypadInputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169402,10 +152810,10 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousPowerWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169418,35 +152826,37 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltage + * Attribute EventList */ -class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { +class ReadKeypadInputEventList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltage() - : ReadAttribute("rms-voltage") + ReadKeypadInputEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementRmsVoltage() + ~ReadKeypadInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltage read Error", error); + LogNSError("KeypadInput EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169455,25 +152865,25 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttribute { +class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltage() - : SubscribeAttribute("rms-voltage") + SubscribeAttributeKeypadInputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltage() + ~SubscribeAttributeKeypadInputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169484,10 +152894,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169500,35 +152910,37 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageMin + * Attribute AttributeList */ -class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { +class ReadKeypadInputAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMin() - : ReadAttribute("rms-voltage-min") + ReadKeypadInputAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementRmsVoltageMin() + ~ReadKeypadInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); + LogNSError("KeypadInput AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169537,25 +152949,25 @@ class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMin() - : SubscribeAttribute("rms-voltage-min") + SubscribeAttributeKeypadInputAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMin() + ~SubscribeAttributeKeypadInputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169566,10 +152978,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169583,34 +152995,34 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt }; /* - * Attribute RmsVoltageMax + * Attribute FeatureMap */ -class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { +class ReadKeypadInputFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMax() - : ReadAttribute("rms-voltage-max") + ReadKeypadInputFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementRmsVoltageMax() + ~ReadKeypadInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); + LogNSError("KeypadInput FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169619,25 +153031,25 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAttribute { +class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMax() - : SubscribeAttribute("rms-voltage-max") + SubscribeAttributeKeypadInputFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMax() + ~SubscribeAttributeKeypadInputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169648,10 +153060,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMaxWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169665,34 +153077,34 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt }; /* - * Attribute RmsCurrent + * Attribute ClusterRevision */ -class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { +class ReadKeypadInputClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrent() - : ReadAttribute("rms-current") + ReadKeypadInputClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementRmsCurrent() + ~ReadKeypadInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrent read Error", error); + LogNSError("KeypadInput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169701,25 +153113,25 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttribute { +class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrent() - : SubscribeAttribute("rms-current") + SubscribeAttributeKeypadInputClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrent() + ~SubscribeAttributeKeypadInputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::KeypadInput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::KeypadInput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169730,10 +153142,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169746,117 +153158,394 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster ContentLauncher | 0x050A | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchContent | 0x00 | +| * LaunchURL | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AcceptHeader | 0x0000 | +| * SupportedStreamingProtocols | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute RmsCurrentMin + * Command LaunchContent */ -class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { +class ContentLauncherLaunchContent : public ClusterCommand { public: - ReadElectricalMeasurementRmsCurrentMin() - : ReadAttribute("rms-current-min") - { - } - - ~ReadElectricalMeasurementRmsCurrentMin() + ContentLauncherLaunchContent() + : ClusterCommand("launch-content") + , mComplex_Search(&mRequest.search) + , mComplex_PlaybackPreferences(&mRequest.playbackPreferences) { + AddArgument("Search", &mComplex_Search); + AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Data", &mRequest.data); +#if MTR_ENABLE_PROVISIONAL + AddArgument("PlaybackPreferences", &mComplex_PlaybackPreferences); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("UseCurrentContext", 0, 1, &mRequest.useCurrentContext); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.search = [MTRContentLauncherClusterContentSearchStruct new]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.search.parameterList) { + MTRContentLauncherClusterParameterStruct * newElement_1; + newElement_1 = [MTRContentLauncherClusterParameterStruct new]; + newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() length:entry_1.value.size() encoding:NSUTF8StringEncoding]; + if (entry_1.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : entry_1.externalIDList.Value()) { + MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; + newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; + newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() length:entry_4.name.size() encoding:NSUTF8StringEncoding]; + newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() length:entry_4.value.size() encoding:NSUTF8StringEncoding]; + [array_4 addObject:newElement_4]; + } + newElement_1.externalIDList = array_4; + } + } else { + newElement_1.externalIDList = nil; + } + [array_1 addObject:newElement_1]; + } + params.search.parameterList = array_1; + } + params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; + } +#if MTR_ENABLE_PROVISIONAL + if (mRequest.playbackPreferences.HasValue()) { + params.playbackPreferences = [MTRContentLauncherClusterPlaybackPreferencesStruct new]; + params.playbackPreferences.playbackPosition = [NSNumber numberWithUnsignedLongLong:mRequest.playbackPreferences.Value().playbackPosition]; + params.playbackPreferences.textTrack = [MTRContentLauncherClusterTrackPreferenceStruct new]; + params.playbackPreferences.textTrack.languageCode = [[NSString alloc] initWithBytes:mRequest.playbackPreferences.Value().textTrack.languageCode.data() length:mRequest.playbackPreferences.Value().textTrack.languageCode.size() encoding:NSUTF8StringEncoding]; + if (mRequest.playbackPreferences.Value().textTrack.characteristics.HasValue()) { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : mRequest.playbackPreferences.Value().textTrack.characteristics.Value()) { + NSNumber * newElement_4; + newElement_4 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_4)]; + [array_4 addObject:newElement_4]; + } + params.playbackPreferences.textTrack.characteristics = array_4; + } } else { - LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + params.playbackPreferences.textTrack.characteristics = nil; } - SetCommandExitStatus(error); - }]; + params.playbackPreferences.textTrack.audioOutputIndex = [NSNumber numberWithUnsignedChar:mRequest.playbackPreferences.Value().textTrack.audioOutputIndex]; + if (mRequest.playbackPreferences.Value().audioTracks.HasValue()) { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + for (auto & entry_3 : mRequest.playbackPreferences.Value().audioTracks.Value()) { + MTRContentLauncherClusterTrackPreferenceStruct * newElement_3; + newElement_3 = [MTRContentLauncherClusterTrackPreferenceStruct new]; + newElement_3.languageCode = [[NSString alloc] initWithBytes:entry_3.languageCode.data() length:entry_3.languageCode.size() encoding:NSUTF8StringEncoding]; + if (entry_3.characteristics.HasValue()) { + { // Scope for our temporary variables + auto * array_6 = [NSMutableArray new]; + for (auto & entry_6 : entry_3.characteristics.Value()) { + NSNumber * newElement_6; + newElement_6 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_6)]; + [array_6 addObject:newElement_6]; + } + newElement_3.characteristics = array_6; + } + } else { + newElement_3.characteristics = nil; + } + newElement_3.audioOutputIndex = [NSNumber numberWithUnsignedChar:entry_3.audioOutputIndex]; + [array_3 addObject:newElement_3]; + } + params.playbackPreferences.audioTracks = array_3; + } + } else { + params.playbackPreferences.audioTracks = nil; + } + } else { + params.playbackPreferences = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.useCurrentContext.HasValue()) { + params.useCurrentContext = [NSNumber numberWithBool:mRequest.useCurrentContext.Value()]; + } else { + params.useCurrentContext = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchContentWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; + TypedComplexArgument mComplex_Search; + TypedComplexArgument> mComplex_PlaybackPreferences; }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAttribute { +/* + * Command LaunchURL + */ +class ContentLauncherLaunchURL : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMin() - : SubscribeAttribute("rms-current-min") - { - } - - ~SubscribeAttributeElectricalMeasurementRmsCurrentMin() + ContentLauncherLaunchURL() + : ClusterCommand("launch-url") + , mComplex_BrandingInformation(&mRequest.brandingInformation) { + AddArgument("ContentURL", &mRequest.contentURL); + AddArgument("DisplayString", &mRequest.displayString); + AddArgument("BrandingInformation", &mComplex_BrandingInformation); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() length:mRequest.contentURL.size() encoding:NSUTF8StringEncoding]; + if (mRequest.displayString.HasValue()) { + params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() length:mRequest.displayString.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.displayString = nil; } - [cluster subscribeAttributeRmsCurrentMinWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + if (mRequest.brandingInformation.HasValue()) { + params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; + params.brandingInformation.providerName = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() length:mRequest.brandingInformation.Value().providerName.size() encoding:NSUTF8StringEncoding]; + if (mRequest.brandingInformation.Value().background.HasValue()) { + params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { + params.brandingInformation.background.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + params.brandingInformation.background.imageURL = nil; } - SetCommandExitStatus(error); - }]; - + if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { + params.brandingInformation.background.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() length:mRequest.brandingInformation.Value().background.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.background.color = nil; + } + if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { + params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.background.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; + params.brandingInformation.background.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; + params.brandingInformation.background.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; + } else { + params.brandingInformation.background.size = nil; + } + } else { + params.brandingInformation.background = nil; + } + if (mRequest.brandingInformation.Value().logo.HasValue()) { + params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { + params.brandingInformation.logo.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.imageURL = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { + params.brandingInformation.logo.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.color = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { + params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.logo.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; + params.brandingInformation.logo.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; + params.brandingInformation.logo.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; + } else { + params.brandingInformation.logo.size = nil; + } + } else { + params.brandingInformation.logo = nil; + } + if (mRequest.brandingInformation.Value().progressBar.HasValue()) { + params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { + params.brandingInformation.progressBar.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.imageURL = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { + params.brandingInformation.progressBar.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.color = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { + params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.progressBar.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; + params.brandingInformation.progressBar.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; + params.brandingInformation.progressBar.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; + } else { + params.brandingInformation.progressBar.size = nil; + } + } else { + params.brandingInformation.progressBar = nil; + } + if (mRequest.brandingInformation.Value().splash.HasValue()) { + params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { + params.brandingInformation.splash.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.imageURL = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { + params.brandingInformation.splash.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.color = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { + params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.splash.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; + params.brandingInformation.splash.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; + params.brandingInformation.splash.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; + } else { + params.brandingInformation.splash.size = nil; + } + } else { + params.brandingInformation.splash = nil; + } + if (mRequest.brandingInformation.Value().waterMark.HasValue()) { + params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { + params.brandingInformation.waterMark.imageURL = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.imageURL = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { + params.brandingInformation.waterMark.color = [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.color = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { + params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.waterMark.size.width = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; + params.brandingInformation.waterMark.size.height = [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; + params.brandingInformation.waterMark.size.metric = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; + } else { + params.brandingInformation.waterMark.size = nil; + } + } else { + params.brandingInformation.waterMark = nil; + } + } else { + params.brandingInformation = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchURLWithParams:params completion: + ^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; + TypedComplexArgument> mComplex_BrandingInformation; }; /* - * Attribute RmsCurrentMax + * Attribute AcceptHeader */ -class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { +class ReadContentLauncherAcceptHeader : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMax() - : ReadAttribute("rms-current-max") + ReadContentLauncherAcceptHeader() + : ReadAttribute("accept-header") { } - ~ReadElectricalMeasurementRmsCurrentMax() + ~ReadContentLauncherAcceptHeader() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); + LogNSError("ContentLauncher AcceptHeader read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169865,25 +153554,25 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMax() - : SubscribeAttribute("rms-current-max") + SubscribeAttributeContentLauncherAcceptHeader() + : SubscribeAttribute("accept-header") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMax() + ~SubscribeAttributeContentLauncherAcceptHeader() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptHeader::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169894,10 +153583,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxWithParams:params + [cluster subscribeAttributeAcceptHeaderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169911,34 +153600,34 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt }; /* - * Attribute ActivePower + * Attribute SupportedStreamingProtocols */ -class ReadElectricalMeasurementActivePower : public ReadAttribute { +class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { public: - ReadElectricalMeasurementActivePower() - : ReadAttribute("active-power") + ReadContentLauncherSupportedStreamingProtocols() + : ReadAttribute("supported-streaming-protocols") { } - ~ReadElectricalMeasurementActivePower() + ~ReadContentLauncherSupportedStreamingProtocols() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePower read Error", error); + LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -169947,25 +153636,25 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttribute { +class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePower() - : SubscribeAttribute("active-power") + SubscribeAttributeContentLauncherSupportedStreamingProtocols() + : SubscribeAttribute("supported-streaming-protocols") { } - ~SubscribeAttributeElectricalMeasurementActivePower() + ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::SupportedStreamingProtocols::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -169976,10 +153665,10 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerWithParams:params + [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -169993,34 +153682,34 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri }; /* - * Attribute ActivePowerMin + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { +class ReadContentLauncherGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMin() - : ReadAttribute("active-power-min") + ReadContentLauncherGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementActivePowerMin() + ~ReadContentLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); + LogNSError("ContentLauncher GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -170029,25 +153718,25 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAttribute { +class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMin() - : SubscribeAttribute("active-power-min") + SubscribeAttributeContentLauncherGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMin() + ~SubscribeAttributeContentLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170058,10 +153747,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170075,34 +153764,34 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt }; /* - * Attribute ActivePowerMax + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { +class ReadContentLauncherAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMax() - : ReadAttribute("active-power-max") + ReadContentLauncherAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementActivePowerMax() + ~ReadContentLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); + LogNSError("ContentLauncher AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -170111,25 +153800,25 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMax() - : SubscribeAttribute("active-power-max") + SubscribeAttributeContentLauncherAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMax() + ~SubscribeAttributeContentLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170140,10 +153829,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170156,35 +153845,37 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ReactivePower + * Attribute EventList */ -class ReadElectricalMeasurementReactivePower : public ReadAttribute { +class ReadContentLauncherEventList : public ReadAttribute { public: - ReadElectricalMeasurementReactivePower() - : ReadAttribute("reactive-power") + ReadContentLauncherEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementReactivePower() + ~ReadContentLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ReactivePower read Error", error); + LogNSError("ContentLauncher EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -170193,25 +153884,25 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAttribute { +class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactivePower() - : SubscribeAttribute("reactive-power") + SubscribeAttributeContentLauncherEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementReactivePower() + ~SubscribeAttributeContentLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170222,10 +153913,10 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170238,35 +153929,37 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ApparentPower + * Attribute AttributeList */ -class ReadElectricalMeasurementApparentPower : public ReadAttribute { +class ReadContentLauncherAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementApparentPower() - : ReadAttribute("apparent-power") + ReadContentLauncherAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementApparentPower() + ~ReadContentLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ApparentPower read Error", error); + LogNSError("ContentLauncher AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -170275,25 +153968,25 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementApparentPower() - : SubscribeAttribute("apparent-power") + SubscribeAttributeContentLauncherAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementApparentPower() + ~SubscribeAttributeContentLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170304,10 +153997,10 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170321,34 +154014,34 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt }; /* - * Attribute PowerFactor + * Attribute FeatureMap */ -class ReadElectricalMeasurementPowerFactor : public ReadAttribute { +class ReadContentLauncherFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactor() - : ReadAttribute("power-factor") + ReadContentLauncherFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementPowerFactor() + ~ReadContentLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement PowerFactor read Error", error); + LogNSError("ContentLauncher FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -170357,25 +154050,25 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttribute { +class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactor() - : SubscribeAttribute("power-factor") + SubscribeAttributeContentLauncherFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementPowerFactor() + ~SubscribeAttributeContentLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170386,10 +154079,10 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170403,102 +154096,61 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri }; /* - * Attribute AverageRmsVoltageMeasurementPeriod + * Attribute ClusterRevision */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadAttribute { +class ReadContentLauncherClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : ReadAttribute("average-rms-voltage-measurement-period") + ReadContentLauncherClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() + ~ReadContentLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public WriteAttribute { -public: - WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : WriteAttribute("average-rms-voltage-measurement-period") - { - AddArgument("attr-name", "average-rms-voltage-measurement-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod write Error", error); + LogNSError("ContentLauncher ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public SubscribeAttribute { +class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : SubscribeAttribute("average-rms-voltage-measurement-period") + SubscribeAttributeContentLauncherClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() + ~SubscribeAttributeContentLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentLauncher::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170509,10 +154161,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170525,103 +154177,178 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod } }; +/*----------------------------------------------------------------------------*\ +| Cluster AudioOutput | 0x050B | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelectOutput | 0x00 | +| * RenameOutput | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * OutputList | 0x0000 | +| * CurrentOutput | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AverageRmsUnderVoltageCounter + * Command SelectOutput */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttribute { +class AudioOutputSelectOutput : public ClusterCommand { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounter() - : ReadAttribute("average-rms-under-voltage-counter") + AudioOutputSelectOutput() + : ClusterCommand("select-output") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster selectOutputWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounter() +private: + chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type mRequest; +}; + +/* + * Command RenameOutput + */ +class AudioOutputRenameOutput : public ClusterCommand { +public: + AudioOutputRenameOutput() + : ClusterCommand("rename-output") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() length:mRequest.name.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster renameOutputWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; -class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttribute { +/* + * Attribute OutputList + */ +class ReadAudioOutputOutputList : public ReadAttribute { public: - WriteElectricalMeasurementAverageRmsUnderVoltageCounter() - : WriteAttribute("average-rms-under-voltage-counter") + ReadAudioOutputOutputList() + : ReadAttribute("output-list") { - AddArgument("attr-name", "average-rms-under-voltage-counter"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteElectricalMeasurementAverageRmsUnderVoltageCounter() + ~ReadAudioOutputOutputList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeAverageRmsUnderVoltageCounterWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.OutputList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("AudioOutput OutputList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : public SubscribeAttribute { +class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() - : SubscribeAttribute("average-rms-under-voltage-counter") + SubscribeAttributeAudioOutputOutputList() + : SubscribeAttribute("output-list") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() + ~SubscribeAttributeAudioOutputOutputList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::OutputList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170632,10 +154359,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithParams:params + [cluster subscribeAttributeOutputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.OutputList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170649,102 +154376,61 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub }; /* - * Attribute RmsExtremeOverVoltagePeriod + * Attribute CurrentOutput */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribute { +class ReadAudioOutputCurrentOutput : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() - : ReadAttribute("rms-extreme-over-voltage-period") + ReadAudioOutputCurrentOutput() + : ReadAttribute("current-output") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() + ~ReadAudioOutputCurrentOutput() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() - : WriteAttribute("rms-extreme-over-voltage-period") - { - AddArgument("attr-name", "rms-extreme-over-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeRmsExtremeOverVoltagePeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", error); + LogNSError("AudioOutput CurrentOutput read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : public SubscribeAttribute { +class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() - : SubscribeAttribute("rms-extreme-over-voltage-period") + SubscribeAttributeAudioOutputCurrentOutput() + : SubscribeAttribute("current-output") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() + ~SubscribeAttributeAudioOutputCurrentOutput() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::CurrentOutput::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170755,10 +154441,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:params + [cluster subscribeAttributeCurrentOutputWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170772,102 +154458,61 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi }; /* - * Attribute RmsExtremeUnderVoltagePeriod + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribute { +class ReadAudioOutputGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : ReadAttribute("rms-extreme-under-voltage-period") + ReadAudioOutputGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() + ~ReadAudioOutputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : WriteAttribute("rms-extreme-under-voltage-period") - { - AddArgument("attr-name", "rms-extreme-under-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", error); + LogNSError("AudioOutput GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : public SubscribeAttribute { +class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : SubscribeAttribute("rms-extreme-under-voltage-period") + SubscribeAttributeAudioOutputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() + ~SubscribeAttributeAudioOutputGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -170878,10 +154523,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -170895,102 +154540,61 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ }; /* - * Attribute RmsVoltageSagPeriod + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { +class ReadAudioOutputAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSagPeriod() - : ReadAttribute("rms-voltage-sag-period") + ReadAudioOutputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementRmsVoltageSagPeriod() + ~ReadAudioOutputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsVoltageSagPeriod() - : WriteAttribute("rms-voltage-sag-period") - { - AddArgument("attr-name", "rms-voltage-sag-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsVoltageSagPeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeRmsVoltageSagPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + LogNSError("AudioOutput AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() - : SubscribeAttribute("rms-voltage-sag-period") + SubscribeAttributeAudioOutputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() + ~SubscribeAttributeAudioOutputAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171001,10 +154605,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagPeriodWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171017,103 +154621,64 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageSwellPeriod + * Attribute EventList */ -class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { +class ReadAudioOutputEventList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwellPeriod() - : ReadAttribute("rms-voltage-swell-period") + ReadAudioOutputEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementRmsVoltageSwellPeriod() + ~ReadAudioOutputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsVoltageSwellPeriod() - : WriteAttribute("rms-voltage-swell-period") - { - AddArgument("attr-name", "rms-voltage-swell-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsVoltageSwellPeriod() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeRmsVoltageSwellPeriodWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + LogNSError("AudioOutput EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public SubscribeAttribute { +class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() - : SubscribeAttribute("rms-voltage-swell-period") + SubscribeAttributeAudioOutputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() + ~SubscribeAttributeAudioOutputEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171124,10 +154689,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171140,35 +154705,37 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AcVoltageMultiplier + * Attribute AttributeList */ -class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { +class ReadAudioOutputAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageMultiplier() - : ReadAttribute("ac-voltage-multiplier") + ReadAudioOutputAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementAcVoltageMultiplier() + ~ReadAudioOutputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); + LogNSError("AudioOutput AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171177,25 +154744,25 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() - : SubscribeAttribute("ac-voltage-multiplier") + SubscribeAttributeAudioOutputAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() + ~SubscribeAttributeAudioOutputAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171206,10 +154773,10 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageMultiplierWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171223,34 +154790,34 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr }; /* - * Attribute AcVoltageDivisor + * Attribute FeatureMap */ -class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { +class ReadAudioOutputFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageDivisor() - : ReadAttribute("ac-voltage-divisor") + ReadAudioOutputFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementAcVoltageDivisor() + ~ReadAudioOutputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); + LogNSError("AudioOutput FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171259,25 +154826,25 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public SubscribeAttribute { +class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageDivisor() - : SubscribeAttribute("ac-voltage-divisor") + SubscribeAttributeAudioOutputFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageDivisor() + ~SubscribeAttributeAudioOutputFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171288,10 +154855,10 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageDivisorWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171305,34 +154872,34 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe }; /* - * Attribute AcCurrentMultiplier + * Attribute ClusterRevision */ -class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { +class ReadAudioOutputClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentMultiplier() - : ReadAttribute("ac-current-multiplier") + ReadAudioOutputClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementAcCurrentMultiplier() + ~ReadAudioOutputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); + LogNSError("AudioOutput ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171341,25 +154908,25 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() - : SubscribeAttribute("ac-current-multiplier") + SubscribeAttributeAudioOutputClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() + ~SubscribeAttributeAudioOutputClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AudioOutput::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AudioOutput::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171370,10 +154937,10 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentMultiplierWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171386,35 +154953,245 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr } }; +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationLauncher | 0x050C | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchApp | 0x00 | +| * StopApp | 0x01 | +| * HideApp | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CatalogList | 0x0000 | +| * CurrentApp | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command LaunchApp + */ +class ApplicationLauncherLaunchApp : public ClusterCommand { +public: + ApplicationLauncherLaunchApp() + : ClusterCommand("launch-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } + if (mRequest.data.HasValue()) { + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; + } else { + params.data = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + TypedComplexArgument> mComplex_Application; +}; + +/* + * Command StopApp + */ +class ApplicationLauncherStopApp : public ClusterCommand { +public: + ApplicationLauncherStopApp() + : ClusterCommand("stop-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; + TypedComplexArgument> mComplex_Application; +}; + +/* + * Command HideApp + */ +class ApplicationLauncherHideApp : public ClusterCommand { +public: + ApplicationLauncherHideApp() + : ClusterCommand("hide-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() length:mRequest.application.Value().applicationID.size() encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster hideAppWithParams:params completion: + ^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; + TypedComplexArgument> mComplex_Application; +}; + /* - * Attribute AcCurrentDivisor + * Attribute CatalogList */ -class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { +class ReadApplicationLauncherCatalogList : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentDivisor() - : ReadAttribute("ac-current-divisor") + ReadApplicationLauncherCatalogList() + : ReadAttribute("catalog-list") { } - ~ReadElectricalMeasurementAcCurrentDivisor() + ~ReadApplicationLauncherCatalogList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); + LogNSError("ApplicationLauncher CatalogList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171423,25 +155200,25 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentDivisor() - : SubscribeAttribute("ac-current-divisor") + SubscribeAttributeApplicationLauncherCatalogList() + : SubscribeAttribute("catalog-list") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentDivisor() + ~SubscribeAttributeApplicationLauncherCatalogList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CatalogList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171452,10 +155229,10 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentDivisorWithParams:params + [cluster subscribeAttributeCatalogListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171469,34 +155246,34 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe }; /* - * Attribute AcPowerMultiplier + * Attribute CurrentApp */ -class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { +class ReadApplicationLauncherCurrentApp : public ReadAttribute { public: - ReadElectricalMeasurementAcPowerMultiplier() - : ReadAttribute("ac-power-multiplier") + ReadApplicationLauncherCurrentApp() + : ReadAttribute("current-app") { } - ~ReadElectricalMeasurementAcPowerMultiplier() + ~ReadApplicationLauncherCurrentApp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentAppWithCompletion:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); + LogNSError("ApplicationLauncher CurrentApp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171505,25 +155282,25 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcPowerMultiplier() - : SubscribeAttribute("ac-power-multiplier") + SubscribeAttributeApplicationLauncherCurrentApp() + : SubscribeAttribute("current-app") { } - ~SubscribeAttributeElectricalMeasurementAcPowerMultiplier() + ~SubscribeAttributeApplicationLauncherCurrentApp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::CurrentApp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171534,10 +155311,10 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcPowerMultiplierWithParams:params + [cluster subscribeAttributeCurrentAppWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171551,34 +155328,34 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib }; /* - * Attribute AcPowerDivisor + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { +class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementAcPowerDivisor() - : ReadAttribute("ac-power-divisor") + ReadApplicationLauncherGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementAcPowerDivisor() + ~ReadApplicationLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); + LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171587,25 +155364,25 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcPowerDivisor() - : SubscribeAttribute("ac-power-divisor") + SubscribeAttributeApplicationLauncherGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementAcPowerDivisor() + ~SubscribeAttributeApplicationLauncherGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171616,10 +155393,10 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcPowerDivisorWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171633,102 +155410,61 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt }; /* - * Attribute OverloadAlarmsMask + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { +class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementOverloadAlarmsMask() - : ReadAttribute("overload-alarms-mask") + ReadApplicationLauncherAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementOverloadAlarmsMask() + ~ReadApplicationLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { -public: - WriteElectricalMeasurementOverloadAlarmsMask() - : WriteAttribute("overload-alarms-mask") - { - AddArgument("attr-name", "overload-alarms-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementOverloadAlarmsMask() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOverloadAlarmsMaskWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() - : SubscribeAttribute("overload-alarms-mask") + SubscribeAttributeApplicationLauncherAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() + ~SubscribeAttributeApplicationLauncherAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171739,10 +155475,10 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverloadAlarmsMaskWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171755,35 +155491,37 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute VoltageOverload + * Attribute EventList */ -class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { +class ReadApplicationLauncherEventList : public ReadAttribute { public: - ReadElectricalMeasurementVoltageOverload() - : ReadAttribute("voltage-overload") + ReadApplicationLauncherEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementVoltageOverload() + ~ReadApplicationLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement VoltageOverload read Error", error); + LogNSError("ApplicationLauncher EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171792,25 +155530,25 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementVoltageOverload() - : SubscribeAttribute("voltage-overload") + SubscribeAttributeApplicationLauncherEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementVoltageOverload() + ~SubscribeAttributeApplicationLauncherEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171821,10 +155559,10 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVoltageOverloadWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171837,35 +155575,37 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentOverload + * Attribute AttributeList */ -class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { +class ReadApplicationLauncherAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementCurrentOverload() - : ReadAttribute("current-overload") + ReadApplicationLauncherAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementCurrentOverload() + ~ReadApplicationLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement CurrentOverload read Error", error); + LogNSError("ApplicationLauncher AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -171874,25 +155614,25 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementCurrentOverload() - : SubscribeAttribute("current-overload") + SubscribeAttributeApplicationLauncherAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementCurrentOverload() + ~SubscribeAttributeApplicationLauncherAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -171903,10 +155643,10 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentOverloadWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -171920,102 +155660,61 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA }; /* - * Attribute AcOverloadAlarmsMask + * Attribute FeatureMap */ -class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { +class ReadApplicationLauncherFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementAcOverloadAlarmsMask() - : ReadAttribute("ac-overload-alarms-mask") + ReadApplicationLauncherFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementAcOverloadAlarmsMask() + ~ReadApplicationLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { -public: - WriteElectricalMeasurementAcOverloadAlarmsMask() - : WriteAttribute("ac-overload-alarms-mask") - { - AddArgument("attr-name", "ac-overload-alarms-mask"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAcOverloadAlarmsMask() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeAcOverloadAlarmsMaskWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + LogNSError("ApplicationLauncher FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() - : SubscribeAttribute("ac-overload-alarms-mask") + SubscribeAttributeApplicationLauncherFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() + ~SubscribeAttributeApplicationLauncherFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172026,10 +155725,10 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcOverloadAlarmsMaskWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172043,34 +155742,34 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc }; /* - * Attribute AcVoltageOverload + * Attribute ClusterRevision */ -class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { +class ReadApplicationLauncherClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageOverload() - : ReadAttribute("ac-voltage-overload") + ReadApplicationLauncherClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementAcVoltageOverload() + ~ReadApplicationLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); + LogNSError("ApplicationLauncher ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172079,25 +155778,25 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageOverload() - : SubscribeAttribute("ac-voltage-overload") + SubscribeAttributeApplicationLauncherClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageOverload() + ~SubscribeAttributeApplicationLauncherClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationLauncher::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationLauncher::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172108,10 +155807,10 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageOverloadWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172124,35 +155823,59 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationBasic | 0x050D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0000 | +| * VendorID | 0x0001 | +| * ApplicationName | 0x0002 | +| * ProductID | 0x0003 | +| * Application | 0x0004 | +| * Status | 0x0005 | +| * ApplicationVersion | 0x0006 | +| * AllowedVendorList | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AcCurrentOverload + * Attribute VendorName */ -class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { +class ReadApplicationBasicVendorName : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentOverload() - : ReadAttribute("ac-current-overload") + ReadApplicationBasicVendorName() + : ReadAttribute("vendor-name") { } - ~ReadElectricalMeasurementAcCurrentOverload() + ~ReadApplicationBasicVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); + LogNSError("ApplicationBasic VendorName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172161,25 +155884,25 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentOverload() - : SubscribeAttribute("ac-current-overload") + SubscribeAttributeApplicationBasicVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentOverload() + ~SubscribeAttributeApplicationBasicVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172190,10 +155913,10 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentOverloadWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172207,34 +155930,34 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib }; /* - * Attribute AcActivePowerOverload + * Attribute VendorID */ -class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { +class ReadApplicationBasicVendorID : public ReadAttribute { public: - ReadElectricalMeasurementAcActivePowerOverload() - : ReadAttribute("ac-active-power-overload") + ReadApplicationBasicVendorID() + : ReadAttribute("vendor-id") { } - ~ReadElectricalMeasurementAcActivePowerOverload() + ~ReadApplicationBasicVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); + LogNSError("ApplicationBasic VendorID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172243,25 +155966,25 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcActivePowerOverload() - : SubscribeAttribute("ac-active-power-overload") + SubscribeAttributeApplicationBasicVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeElectricalMeasurementAcActivePowerOverload() + ~SubscribeAttributeApplicationBasicVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172272,10 +155995,10 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcActivePowerOverloadWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172289,34 +156012,34 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs }; /* - * Attribute AcReactivePowerOverload + * Attribute ApplicationName */ -class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { +class ReadApplicationBasicApplicationName : public ReadAttribute { public: - ReadElectricalMeasurementAcReactivePowerOverload() - : ReadAttribute("ac-reactive-power-overload") + ReadApplicationBasicApplicationName() + : ReadAttribute("application-name") { } - ~ReadElectricalMeasurementAcReactivePowerOverload() + ~ReadApplicationBasicApplicationName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); + LogNSError("ApplicationBasic ApplicationName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172325,25 +156048,25 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() - : SubscribeAttribute("ac-reactive-power-overload") + SubscribeAttributeApplicationBasicApplicationName() + : SubscribeAttribute("application-name") { } - ~SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() + ~SubscribeAttributeApplicationBasicApplicationName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172354,10 +156077,10 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcReactivePowerOverloadWithParams:params + [cluster subscribeAttributeApplicationNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172371,34 +156094,34 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su }; /* - * Attribute AverageRmsOverVoltage + * Attribute ProductID */ -class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { +class ReadApplicationBasicProductID : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsOverVoltage() - : ReadAttribute("average-rms-over-voltage") + ReadApplicationBasicProductID() + : ReadAttribute("product-id") { } - ~ReadElectricalMeasurementAverageRmsOverVoltage() + ~ReadApplicationBasicProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); + LogNSError("ApplicationBasic ProductID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172407,25 +156130,25 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() - : SubscribeAttribute("average-rms-over-voltage") + SubscribeAttributeApplicationBasicProductID() + : SubscribeAttribute("product-id") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() + ~SubscribeAttributeApplicationBasicProductID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ProductID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172436,10 +156159,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsOverVoltageWithParams:params + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172453,34 +156176,34 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs }; /* - * Attribute AverageRmsUnderVoltage + * Attribute Application */ -class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { +class ReadApplicationBasicApplication : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltage() - : ReadAttribute("average-rms-under-voltage") + ReadApplicationBasicApplication() + : ReadAttribute("application") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltage() + ~ReadApplicationBasicApplication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationWithCompletion:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); + LogNSError("ApplicationBasic Application read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172489,25 +156212,25 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() - : SubscribeAttribute("average-rms-under-voltage") + SubscribeAttributeApplicationBasicApplication() + : SubscribeAttribute("application") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() + ~SubscribeAttributeApplicationBasicApplication() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Application::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172518,10 +156241,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageWithParams:params + [cluster subscribeAttributeApplicationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172535,34 +156258,34 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub }; /* - * Attribute RmsExtremeOverVoltage + * Attribute Status */ -class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { +class ReadApplicationBasicStatus : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltage() - : ReadAttribute("rms-extreme-over-voltage") + ReadApplicationBasicStatus() + : ReadAttribute("status") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltage() + ~ReadApplicationBasicStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); + LogNSError("ApplicationBasic Status read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172571,25 +156294,25 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() - : SubscribeAttribute("rms-extreme-over-voltage") + SubscribeAttributeApplicationBasicStatus() + : SubscribeAttribute("status") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() + ~SubscribeAttributeApplicationBasicStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172600,10 +156323,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltageWithParams:params + [cluster subscribeAttributeStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + NSLog(@"ApplicationBasic.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172617,34 +156340,34 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs }; /* - * Attribute RmsExtremeUnderVoltage + * Attribute ApplicationVersion */ -class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { +class ReadApplicationBasicApplicationVersion : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltage() - : ReadAttribute("rms-extreme-under-voltage") + ReadApplicationBasicApplicationVersion() + : ReadAttribute("application-version") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltage() + ~ReadApplicationBasicApplicationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); + LogNSError("ApplicationBasic ApplicationVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172653,25 +156376,25 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() - : SubscribeAttribute("rms-extreme-under-voltage") + SubscribeAttributeApplicationBasicApplicationVersion() + : SubscribeAttribute("application-version") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() + ~SubscribeAttributeApplicationBasicApplicationVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ApplicationVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172682,10 +156405,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltageWithParams:params + [cluster subscribeAttributeApplicationVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172699,34 +156422,34 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub }; /* - * Attribute RmsVoltageSag + * Attribute AllowedVendorList */ -class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { +class ReadApplicationBasicAllowedVendorList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSag() - : ReadAttribute("rms-voltage-sag") + ReadApplicationBasicAllowedVendorList() + : ReadAttribute("allowed-vendor-list") { } - ~ReadElectricalMeasurementRmsVoltageSag() + ~ReadApplicationBasicAllowedVendorList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); + LogNSError("ApplicationBasic AllowedVendorList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172735,25 +156458,25 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSag() - : SubscribeAttribute("rms-voltage-sag") + SubscribeAttributeApplicationBasicAllowedVendorList() + : SubscribeAttribute("allowed-vendor-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSag() + ~SubscribeAttributeApplicationBasicAllowedVendorList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AllowedVendorList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172764,10 +156487,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagWithParams:params + [cluster subscribeAttributeAllowedVendorListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172781,34 +156504,34 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt }; /* - * Attribute RmsVoltageSwell + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { +class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwell() - : ReadAttribute("rms-voltage-swell") + ReadApplicationBasicGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementRmsVoltageSwell() + ~ReadApplicationBasicGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); + LogNSError("ApplicationBasic GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172817,25 +156540,25 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwell() - : SubscribeAttribute("rms-voltage-swell") + SubscribeAttributeApplicationBasicGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwell() + ~SubscribeAttributeApplicationBasicGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172846,10 +156569,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172863,34 +156586,34 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA }; /* - * Attribute LineCurrentPhaseB + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { +class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementLineCurrentPhaseB() - : ReadAttribute("line-current-phase-b") + ReadApplicationBasicAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementLineCurrentPhaseB() + ~ReadApplicationBasicAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); + LogNSError("ApplicationBasic AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172899,25 +156622,25 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() - : SubscribeAttribute("line-current-phase-b") + SubscribeAttributeApplicationBasicAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() + ~SubscribeAttributeApplicationBasicAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -172928,10 +156651,10 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineCurrentPhaseBWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -172944,35 +156667,37 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveCurrentPhaseB + * Attribute EventList */ -class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { +class ReadApplicationBasicEventList : public ReadAttribute { public: - ReadElectricalMeasurementActiveCurrentPhaseB() - : ReadAttribute("active-current-phase-b") + ReadApplicationBasicEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementActiveCurrentPhaseB() + ~ReadApplicationBasicEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); + LogNSError("ApplicationBasic EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -172981,25 +156706,25 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() - : SubscribeAttribute("active-current-phase-b") + SubscribeAttributeApplicationBasicEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() + ~SubscribeAttributeApplicationBasicEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173010,10 +156735,10 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCurrentPhaseBWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173026,35 +156751,37 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ReactiveCurrentPhaseB + * Attribute AttributeList */ -class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { +class ReadApplicationBasicAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementReactiveCurrentPhaseB() - : ReadAttribute("reactive-current-phase-b") + ReadApplicationBasicAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementReactiveCurrentPhaseB() + ~ReadApplicationBasicAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); + LogNSError("ApplicationBasic AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173063,25 +156790,25 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() - : SubscribeAttribute("reactive-current-phase-b") + SubscribeAttributeApplicationBasicAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() + ~SubscribeAttributeApplicationBasicAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173092,10 +156819,10 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactiveCurrentPhaseBWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173109,34 +156836,34 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs }; /* - * Attribute RmsVoltagePhaseB + * Attribute FeatureMap */ -class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { +class ReadApplicationBasicFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltagePhaseB() - : ReadAttribute("rms-voltage-phase-b") + ReadApplicationBasicFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementRmsVoltagePhaseB() + ~ReadApplicationBasicFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); + LogNSError("ApplicationBasic FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173145,25 +156872,25 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() - : SubscribeAttribute("rms-voltage-phase-b") + SubscribeAttributeApplicationBasicFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() + ~SubscribeAttributeApplicationBasicFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173174,10 +156901,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltagePhaseBWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173191,34 +156918,34 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe }; /* - * Attribute RmsVoltageMinPhaseB + * Attribute ClusterRevision */ -class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { +class ReadApplicationBasicClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMinPhaseB() - : ReadAttribute("rms-voltage-min-phase-b") + ReadApplicationBasicClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementRmsVoltageMinPhaseB() + ~ReadApplicationBasicClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); + LogNSError("ApplicationBasic ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173227,25 +156954,25 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() - : SubscribeAttribute("rms-voltage-min-phase-b") + SubscribeAttributeApplicationBasicClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() + ~SubscribeAttributeApplicationBasicClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ApplicationBasic::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ApplicationBasic::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173256,10 +156983,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinPhaseBWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173272,117 +156999,222 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr } }; +/*----------------------------------------------------------------------------*\ +| Cluster AccountLogin | 0x050E | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetSetupPIN | 0x00 | +| * Login | 0x02 | +| * Logout | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * LoggedOut | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute RmsVoltageMaxPhaseB + * Command GetSetupPIN */ -class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { +class AccountLoginGetSetupPIN : public ClusterCommand { public: - ReadElectricalMeasurementRmsVoltageMaxPhaseB() - : ReadAttribute("rms-voltage-max-phase-b") - { - } - - ~ReadElectricalMeasurementRmsVoltageMaxPhaseB() + AccountLoginGetSetupPIN() + : ClusterCommand("get-setup-pin") { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getSetupPINWithParams:params completion: + ^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public SubscribeAttribute { +/* + * Command Login + */ +class AccountLoginLogin : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() - : SubscribeAttribute("rms-voltage-max-phase-b") + AccountLoginLogin() + : ClusterCommand("login") + { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + AddArgument("SetupPIN", &mRequest.setupPIN); +#if MTR_ENABLE_PROVISIONAL + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Login::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() length:mRequest.tempAccountIdentifier.size() encoding:NSUTF8StringEncoding]; + params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() length:mRequest.setupPIN.size() encoding:NSUTF8StringEncoding]; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.node.HasValue()) { + params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; + } else { + params.node = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster loginWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() +private: + chip::app::Clusters::AccountLogin::Commands::Login::Type mRequest; +}; + +/* + * Command Logout + */ +class AccountLoginLogout : public ClusterCommand { +public: + AccountLoginLogout() + : ClusterCommand("logout") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Node", 0, UINT64_MAX, &mRequest.node); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::AccountLogin::Commands::Logout::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.node.HasValue()) { + params.node = [NSNumber numberWithUnsignedLongLong:mRequest.node.Value()]; + } else { + params.node = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster logoutWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeRmsVoltageMaxPhaseBWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::AccountLogin::Commands::Logout::Type mRequest; }; /* - * Attribute RmsCurrentPhaseB + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { +class ReadAccountLoginGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentPhaseB() - : ReadAttribute("rms-current-phase-b") + ReadAccountLoginGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementRmsCurrentPhaseB() + ~ReadAccountLoginGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); + LogNSError("AccountLogin GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173391,25 +157223,25 @@ class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() - : SubscribeAttribute("rms-current-phase-b") + SubscribeAttributeAccountLoginGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() + ~SubscribeAttributeAccountLoginGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173420,10 +157252,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentPhaseBWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173437,34 +157269,34 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe }; /* - * Attribute RmsCurrentMinPhaseB + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { +class ReadAccountLoginAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMinPhaseB() - : ReadAttribute("rms-current-min-phase-b") + ReadAccountLoginAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementRmsCurrentMinPhaseB() + ~ReadAccountLoginAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); + LogNSError("AccountLogin AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173473,25 +157305,25 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() - : SubscribeAttribute("rms-current-min-phase-b") + SubscribeAttributeAccountLoginAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() + ~SubscribeAttributeAccountLoginAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173502,10 +157334,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMinPhaseBWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173518,35 +157350,37 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsCurrentMaxPhaseB + * Attribute EventList */ -class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { +class ReadAccountLoginEventList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMaxPhaseB() - : ReadAttribute("rms-current-max-phase-b") + ReadAccountLoginEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementRmsCurrentMaxPhaseB() + ~ReadAccountLoginEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); + LogNSError("AccountLogin EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173555,25 +157389,25 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() - : SubscribeAttribute("rms-current-max-phase-b") + SubscribeAttributeAccountLoginEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() + ~SubscribeAttributeAccountLoginEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173584,10 +157418,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxPhaseBWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173600,35 +157434,37 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ActivePowerPhaseB + * Attribute AttributeList */ -class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { +class ReadAccountLoginAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerPhaseB() - : ReadAttribute("active-power-phase-b") + ReadAccountLoginAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementActivePowerPhaseB() + ~ReadAccountLoginAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); + LogNSError("AccountLogin AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173637,25 +157473,25 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerPhaseB() - : SubscribeAttribute("active-power-phase-b") + SubscribeAttributeAccountLoginAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerPhaseB() + ~SubscribeAttributeAccountLoginAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173666,10 +157502,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerPhaseBWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173683,34 +157519,34 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib }; /* - * Attribute ActivePowerMinPhaseB + * Attribute FeatureMap */ -class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { +class ReadAccountLoginFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMinPhaseB() - : ReadAttribute("active-power-min-phase-b") + ReadAccountLoginFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementActivePowerMinPhaseB() + ~ReadAccountLoginFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); + LogNSError("AccountLogin FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173719,25 +157555,25 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() - : SubscribeAttribute("active-power-min-phase-b") + SubscribeAttributeAccountLoginFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() + ~SubscribeAttributeAccountLoginFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173748,10 +157584,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinPhaseBWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173765,34 +157601,34 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc }; /* - * Attribute ActivePowerMaxPhaseB + * Attribute ClusterRevision */ -class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { +class ReadAccountLoginClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMaxPhaseB() - : ReadAttribute("active-power-max-phase-b") + ReadAccountLoginClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementActivePowerMaxPhaseB() + ~ReadAccountLoginClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); + LogNSError("AccountLogin ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -173801,25 +157637,25 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public SubscribeAttribute { +class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() - : SubscribeAttribute("active-power-max-phase-b") + SubscribeAttributeAccountLoginClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() + ~SubscribeAttributeAccountLoginClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::AccountLogin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::AccountLogin::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -173830,10 +157666,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxPhaseBWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -173846,199 +157682,599 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ContentControl | 0x050F | +|------------------------------------------------------------------------------| +| Commands: | | +| * UpdatePIN | 0x00 | +| * ResetPIN | 0x01 | +| * Enable | 0x03 | +| * Disable | 0x04 | +| * AddBonusTime | 0x05 | +| * SetScreenDailyTime | 0x06 | +| * BlockUnratedContent | 0x07 | +| * UnblockUnratedContent | 0x08 | +| * SetOnDemandRatingThreshold | 0x09 | +| * SetScheduledContentRatingThreshold | 0x0A | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Enabled | 0x0000 | +| * OnDemandRatings | 0x0001 | +| * OnDemandRatingThreshold | 0x0002 | +| * ScheduledContentRatings | 0x0003 | +| * ScheduledContentRatingThreshold | 0x0004 | +| * ScreenDailyTime | 0x0005 | +| * RemainingScreenTime | 0x0006 | +| * BlockUnrated | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * RemainingScreenTimeExpired | 0x0000 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ReactivePowerPhaseB + * Command UpdatePIN */ -class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { +class ContentControlUpdatePIN : public ClusterCommand { public: - ReadElectricalMeasurementReactivePowerPhaseB() - : ReadAttribute("reactive-power-phase-b") + ContentControlUpdatePIN() + : ClusterCommand("update-pin") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("OldPIN", &mRequest.oldPIN); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewPIN", &mRequest.newPIN); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UpdatePIN::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterUpdatePINParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.oldPIN.HasValue()) { + params.oldPIN = [[NSString alloc] initWithBytes:mRequest.oldPIN.Value().data() length:mRequest.oldPIN.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.oldPIN = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.newPIN = [[NSString alloc] initWithBytes:mRequest.newPIN.data() length:mRequest.newPIN.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updatePINWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadElectricalMeasurementReactivePowerPhaseB() +private: + chip::app::Clusters::ContentControl::Commands::UpdatePIN::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ResetPIN + */ +class ContentControlResetPIN : public ClusterCommand { +public: + ContentControlResetPIN() + : ClusterCommand("reset-pin") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::ResetPIN::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterResetPINParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster resetPINWithParams:params completion: + ^(MTRContentControlClusterResetPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentControl::Commands::ResetPINResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Enable + */ +class ContentControlEnable : public ClusterCommand { +public: + ContentControlEnable() + : ClusterCommand("enable") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Enable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterEnableParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enableWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Disable + */ +class ContentControlDisable : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() - : SubscribeAttribute("reactive-power-phase-b") + ContentControlDisable() + : ClusterCommand("disable") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::Disable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterDisableParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster disableWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddBonusTime + */ +class ContentControlAddBonusTime : public ClusterCommand { +public: + ContentControlAddBonusTime() + : ClusterCommand("add-bonus-time") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PINCode", &mRequest.PINCode); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("BonusTime", 0, UINT32_MAX, &mRequest.bonusTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::AddBonusTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterAddBonusTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.PINCode.HasValue()) { + params.pinCode = [[NSString alloc] initWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.pinCode = nil; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.bonusTime.HasValue()) { + params.bonusTime = [NSNumber numberWithUnsignedInt:mRequest.bonusTime.Value()]; + } else { + params.bonusTime = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addBonusTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeReactivePowerPhaseBWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentControl::Commands::AddBonusTime::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ApparentPowerPhaseB + * Command SetScreenDailyTime */ -class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { +class ContentControlSetScreenDailyTime : public ClusterCommand { public: - ReadElectricalMeasurementApparentPowerPhaseB() - : ReadAttribute("apparent-power-phase-b") + ContentControlSetScreenDailyTime() + : ClusterCommand("set-screen-daily-time") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ScreenTime", 0, UINT32_MAX, &mRequest.screenTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetScreenDailyTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.screenTime = [NSNumber numberWithUnsignedInt:mRequest.screenTime]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setScreenDailyTimeWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadElectricalMeasurementApparentPowerPhaseB() +private: + chip::app::Clusters::ContentControl::Commands::SetScreenDailyTime::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command BlockUnratedContent + */ +class ContentControlBlockUnratedContent : public ClusterCommand { +public: + ContentControlBlockUnratedContent() + : ClusterCommand("block-unrated-content") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::BlockUnratedContent::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterBlockUnratedContentParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster blockUnratedContentWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command UnblockUnratedContent + */ +class ContentControlUnblockUnratedContent : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() - : SubscribeAttribute("apparent-power-phase-b") + ContentControlUnblockUnratedContent() + : ClusterCommand("unblock-unrated-content") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::UnblockUnratedContent::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterUnblockUnratedContentParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unblockUnratedContentWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetOnDemandRatingThreshold + */ +class ContentControlSetOnDemandRatingThreshold : public ClusterCommand { +public: + ContentControlSetOnDemandRatingThreshold() + : ClusterCommand("set-on-demand-rating-threshold") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Rating", &mRequest.rating); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetOnDemandRatingThresholdParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setOnDemandRatingThresholdWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeApparentPowerPhaseBWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentControl::Commands::SetOnDemandRatingThreshold::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetScheduledContentRatingThreshold + */ +class ContentControlSetScheduledContentRatingThreshold : public ClusterCommand { +public: + ContentControlSetScheduledContentRatingThreshold() + : ClusterCommand("set-scheduled-content-rating-threshold") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Rating", &mRequest.rating); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentControlClusterSetScheduledContentRatingThresholdParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.rating = [[NSString alloc] initWithBytes:mRequest.rating.data() length:mRequest.rating.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setScheduledContentRatingThresholdWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentControl::Commands::SetScheduledContentRatingThreshold::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PowerFactorPhaseB + * Attribute Enabled */ -class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { +class ReadContentControlEnabled : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactorPhaseB() - : ReadAttribute("power-factor-phase-b") + ReadContentControlEnabled() + : ReadAttribute("enabled") { } - ~ReadElectricalMeasurementPowerFactorPhaseB() + ~ReadContentControlEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.Enabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); + LogNSError("ContentControl Enabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174047,25 +158283,25 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlEnabled : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() - : SubscribeAttribute("power-factor-phase-b") + SubscribeAttributeContentControlEnabled() + : SubscribeAttribute("enabled") { } - ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() + ~SubscribeAttributeContentControlEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::Enabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174076,10 +158312,10 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorPhaseBWithParams:params + [cluster subscribeAttributeEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + NSLog(@"ContentControl.Enabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174092,35 +158328,38 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsVoltageMeasurementPeriodPhaseB + * Attribute OnDemandRatings */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public ReadAttribute { +class ReadContentControlOnDemandRatings : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() - : ReadAttribute("average-rms-voltage-measurement-period-phase-b") + ReadContentControlOnDemandRatings() + : ReadAttribute("on-demand-ratings") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() + ~ReadContentControlOnDemandRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnDemandRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseB read Error", error); + LogNSError("ContentControl OnDemandRatings read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174129,25 +158368,25 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public } }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlOnDemandRatings : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() - : SubscribeAttribute("average-rms-voltage-measurement-period-phase-b") + SubscribeAttributeContentControlOnDemandRatings() + : SubscribeAttribute("on-demand-ratings") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() + ~SubscribeAttributeContentControlOnDemandRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatings::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174158,10 +158397,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:params + [cluster subscribeAttributeOnDemandRatingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174174,35 +158413,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsOverVoltageCounterPhaseB + * Attribute OnDemandRatingThreshold */ -class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadAttribute { +class ReadContentControlOnDemandRatingThreshold : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() - : ReadAttribute("average-rms-over-voltage-counter-phase-b") + ReadContentControlOnDemandRatingThreshold() + : ReadAttribute("on-demand-rating-threshold") { } - ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() + ~ReadContentControlOnDemandRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnDemandRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); + LogNSError("ContentControl OnDemandRatingThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174211,25 +158453,25 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadA } }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlOnDemandRatingThreshold : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() - : SubscribeAttribute("average-rms-over-voltage-counter-phase-b") + SubscribeAttributeContentControlOnDemandRatingThreshold() + : SubscribeAttribute("on-demand-rating-threshold") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() + ~SubscribeAttributeContentControlOnDemandRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::OnDemandRatingThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174240,10 +158482,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:params + [cluster subscribeAttributeOnDemandRatingThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.OnDemandRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174256,35 +158498,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsUnderVoltageCounterPhaseB + * Attribute ScheduledContentRatings */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public ReadAttribute { +class ReadContentControlScheduledContentRatings : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() - : ReadAttribute("average-rms-under-voltage-counter-phase-b") + ReadContentControlScheduledContentRatings() + : ReadAttribute("scheduled-content-ratings") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() + ~ReadContentControlScheduledContentRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduledContentRatingsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseB read Error", error); + LogNSError("ContentControl ScheduledContentRatings read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174293,25 +158538,25 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlScheduledContentRatings : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() - : SubscribeAttribute("average-rms-under-voltage-counter-phase-b") + SubscribeAttributeContentControlScheduledContentRatings() + : SubscribeAttribute("scheduled-content-ratings") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() + ~SubscribeAttributeContentControlScheduledContentRatings() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatings::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174322,10 +158567,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:params + [cluster subscribeAttributeScheduledContentRatingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatings response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174338,35 +158583,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsExtremeOverVoltagePeriodPhaseB + * Attribute ScheduledContentRatingThreshold */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAttribute { +class ReadContentControlScheduledContentRatingThreshold : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() - : ReadAttribute("rms-extreme-over-voltage-period-phase-b") + ReadContentControlScheduledContentRatingThreshold() + : ReadAttribute("scheduled-content-rating-threshold") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() + ~ReadContentControlScheduledContentRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScheduledContentRatingThresholdWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); + LogNSError("ContentControl ScheduledContentRatingThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174375,25 +158623,25 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAt } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlScheduledContentRatingThreshold : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() - : SubscribeAttribute("rms-extreme-over-voltage-period-phase-b") + SubscribeAttributeContentControlScheduledContentRatingThreshold() + : SubscribeAttribute("scheduled-content-rating-threshold") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() + ~SubscribeAttributeContentControlScheduledContentRatingThreshold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScheduledContentRatingThreshold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174404,10 +158652,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:params + [cluster subscribeAttributeScheduledContentRatingThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScheduledContentRatingThreshold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174420,35 +158668,38 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsExtremeUnderVoltagePeriodPhaseB + * Attribute ScreenDailyTime */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadAttribute { +class ReadContentControlScreenDailyTime : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() - : ReadAttribute("rms-extreme-under-voltage-period-phase-b") + ReadContentControlScreenDailyTime() + : ReadAttribute("screen-daily-time") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() + ~ReadContentControlScreenDailyTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScreenDailyTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); + LogNSError("ContentControl ScreenDailyTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174457,25 +158708,25 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadA } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlScreenDailyTime : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() - : SubscribeAttribute("rms-extreme-under-voltage-period-phase-b") + SubscribeAttributeContentControlScreenDailyTime() + : SubscribeAttribute("screen-daily-time") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() + ~SubscribeAttributeContentControlScreenDailyTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ScreenDailyTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174486,10 +158737,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:params + [cluster subscribeAttributeScreenDailyTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + NSLog(@"ContentControl.ScreenDailyTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174502,35 +158753,38 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageSagPeriodPhaseB + * Attribute RemainingScreenTime */ -class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute { +class ReadContentControlRemainingScreenTime : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() - : ReadAttribute("rms-voltage-sag-period-phase-b") + ReadContentControlRemainingScreenTime() + : ReadAttribute("remaining-screen-time") { } - ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() + ~ReadContentControlRemainingScreenTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRemainingScreenTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); + LogNSError("ContentControl RemainingScreenTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174539,25 +158793,25 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlRemainingScreenTime : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() - : SubscribeAttribute("rms-voltage-sag-period-phase-b") + SubscribeAttributeContentControlRemainingScreenTime() + : SubscribeAttribute("remaining-screen-time") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() + ~SubscribeAttributeContentControlRemainingScreenTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::RemainingScreenTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174568,10 +158822,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:params + [cluster subscribeAttributeRemainingScreenTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + NSLog(@"ContentControl.RemainingScreenTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174584,35 +158838,38 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageSwellPeriodPhaseB + * Attribute BlockUnrated */ -class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribute { +class ReadContentControlBlockUnrated : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() - : ReadAttribute("rms-voltage-swell-period-phase-b") + ReadContentControlBlockUnrated() + : ReadAttribute("block-unrated") { } - ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() + ~ReadContentControlBlockUnrated() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBlockUnratedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.BlockUnrated response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); + LogNSError("ContentControl BlockUnrated read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174621,25 +158878,25 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeContentControlBlockUnrated : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() - : SubscribeAttribute("rms-voltage-swell-period-phase-b") + SubscribeAttributeContentControlBlockUnrated() + : SubscribeAttribute("block-unrated") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() + ~SubscribeAttributeContentControlBlockUnrated() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::BlockUnrated::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174650,10 +158907,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:params + [cluster subscribeAttributeBlockUnratedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + NSLog(@"ContentControl.BlockUnrated response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174666,35 +158923,38 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute LineCurrentPhaseC + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { +class ReadContentControlGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementLineCurrentPhaseC() - : ReadAttribute("line-current-phase-c") + ReadContentControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementLineCurrentPhaseC() + ~ReadContentControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); + LogNSError("ContentControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174703,25 +158963,25 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() - : SubscribeAttribute("line-current-phase-c") + SubscribeAttributeContentControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() + ~SubscribeAttributeContentControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174732,10 +158992,10 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineCurrentPhaseCWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174748,35 +159008,38 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActiveCurrentPhaseC + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { +class ReadContentControlAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementActiveCurrentPhaseC() - : ReadAttribute("active-current-phase-c") + ReadContentControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementActiveCurrentPhaseC() + ~ReadContentControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); + LogNSError("ContentControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174785,25 +159048,25 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() - : SubscribeAttribute("active-current-phase-c") + SubscribeAttributeContentControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() + ~SubscribeAttributeContentControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174814,10 +159077,10 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCurrentPhaseCWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174830,35 +159093,38 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ReactiveCurrentPhaseC + * Attribute EventList */ -class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { +class ReadContentControlEventList : public ReadAttribute { public: - ReadElectricalMeasurementReactiveCurrentPhaseC() - : ReadAttribute("reactive-current-phase-c") + ReadContentControlEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementReactiveCurrentPhaseC() + ~ReadContentControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); + LogNSError("ContentControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174867,25 +159133,25 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() - : SubscribeAttribute("reactive-current-phase-c") + SubscribeAttributeContentControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() + ~SubscribeAttributeContentControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174896,10 +159162,10 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactiveCurrentPhaseCWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174912,35 +159178,38 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltagePhaseC + * Attribute AttributeList */ -class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { +class ReadContentControlAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltagePhaseC() - : ReadAttribute("rms-voltage-phase-c") + ReadContentControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementRmsVoltagePhaseC() + ~ReadContentControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); + LogNSError("ContentControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -174949,25 +159218,25 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() - : SubscribeAttribute("rms-voltage-phase-c") + SubscribeAttributeContentControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() + ~SubscribeAttributeContentControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -174978,10 +159247,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltagePhaseCWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -174994,35 +159263,38 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageMinPhaseC + * Attribute FeatureMap */ -class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { +class ReadContentControlFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMinPhaseC() - : ReadAttribute("rms-voltage-min-phase-c") + ReadContentControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementRmsVoltageMinPhaseC() + ~ReadContentControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); + LogNSError("ContentControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175031,25 +159303,25 @@ class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() - : SubscribeAttribute("rms-voltage-min-phase-c") + SubscribeAttributeContentControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() + ~SubscribeAttributeContentControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175060,10 +159332,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinPhaseCWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); + NSLog(@"ContentControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175076,35 +159348,38 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageMaxPhaseC + * Attribute ClusterRevision */ -class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { +class ReadContentControlClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMaxPhaseC() - : ReadAttribute("rms-voltage-max-phase-c") + ReadContentControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementRmsVoltageMaxPhaseC() + ~ReadContentControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); + LogNSError("ContentControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175113,25 +159388,25 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() - : SubscribeAttribute("rms-voltage-max-phase-c") + SubscribeAttributeContentControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() + ~SubscribeAttributeContentControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175142,10 +159417,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMaxPhaseCWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + NSLog(@"ContentControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175158,35 +159433,127 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ContentAppObserver | 0x0510 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ContentAppMessage | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command ContentAppMessage + */ +class ContentAppObserverContentAppMessage : public ClusterCommand { +public: + ContentAppObserverContentAppMessage() + : ClusterCommand("content-app-message") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("Data", &mRequest.data); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("EncodingHint", &mRequest.encodingHint); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRContentAppObserverClusterContentAppMessageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.encodingHint = [[NSString alloc] initWithBytes:mRequest.encodingHint.data() length:mRequest.encodingHint.size() encoding:NSUTF8StringEncoding]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster contentAppMessageWithParams:params completion: + ^(MTRContentAppObserverClusterContentAppMessageResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsCurrentPhaseC + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { +class ReadContentAppObserverGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentPhaseC() - : ReadAttribute("rms-current-phase-c") + ReadContentAppObserverGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementRmsCurrentPhaseC() + ~ReadContentAppObserverGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); + LogNSError("ContentAppObserver GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175195,25 +159562,25 @@ class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() - : SubscribeAttribute("rms-current-phase-c") + SubscribeAttributeContentAppObserverGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() + ~SubscribeAttributeContentAppObserverGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175224,10 +159591,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentPhaseCWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175240,35 +159607,38 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsCurrentMinPhaseC + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { +class ReadContentAppObserverAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMinPhaseC() - : ReadAttribute("rms-current-min-phase-c") + ReadContentAppObserverAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementRmsCurrentMinPhaseC() + ~ReadContentAppObserverAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); + LogNSError("ContentAppObserver AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175277,25 +159647,25 @@ class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() - : SubscribeAttribute("rms-current-min-phase-c") + SubscribeAttributeContentAppObserverAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() + ~SubscribeAttributeContentAppObserverAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175306,10 +159676,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMinPhaseCWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175322,35 +159692,38 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsCurrentMaxPhaseC + * Attribute EventList */ -class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { +class ReadContentAppObserverEventList : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMaxPhaseC() - : ReadAttribute("rms-current-max-phase-c") + ReadContentAppObserverEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementRmsCurrentMaxPhaseC() + ~ReadContentAppObserverEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); + LogNSError("ContentAppObserver EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175359,25 +159732,25 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() - : SubscribeAttribute("rms-current-max-phase-c") + SubscribeAttributeContentAppObserverEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() + ~SubscribeAttributeContentAppObserverEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175388,10 +159761,10 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxPhaseCWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175404,35 +159777,38 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActivePowerPhaseC + * Attribute AttributeList */ -class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { +class ReadContentAppObserverAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerPhaseC() - : ReadAttribute("active-power-phase-c") + ReadContentAppObserverAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementActivePowerPhaseC() + ~ReadContentAppObserverAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); + LogNSError("ContentAppObserver AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175441,25 +159817,25 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerPhaseC() - : SubscribeAttribute("active-power-phase-c") + SubscribeAttributeContentAppObserverAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerPhaseC() + ~SubscribeAttributeContentAppObserverAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175470,10 +159846,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerPhaseCWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175486,35 +159862,38 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActivePowerMinPhaseC + * Attribute FeatureMap */ -class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { +class ReadContentAppObserverFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMinPhaseC() - : ReadAttribute("active-power-min-phase-c") + ReadContentAppObserverFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementActivePowerMinPhaseC() + ~ReadContentAppObserverFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); + LogNSError("ContentAppObserver FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175523,25 +159902,25 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() - : SubscribeAttribute("active-power-min-phase-c") + SubscribeAttributeContentAppObserverFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() + ~SubscribeAttributeContentAppObserverFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175552,10 +159931,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinPhaseCWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + NSLog(@"ContentAppObserver.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175568,35 +159947,38 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ActivePowerMaxPhaseC + * Attribute ClusterRevision */ -class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { +class ReadContentAppObserverClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMaxPhaseC() - : ReadAttribute("active-power-max-phase-c") + ReadContentAppObserverClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementActivePowerMaxPhaseC() + ~ReadContentAppObserverClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); + LogNSError("ContentAppObserver ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175605,25 +159987,25 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() - : SubscribeAttribute("active-power-max-phase-c") + SubscribeAttributeContentAppObserverClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() + ~SubscribeAttributeContentAppObserverClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ContentAppObserver::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ContentAppObserver::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentAppObserver alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175634,10 +160016,10 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxPhaseCWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + NSLog(@"ContentAppObserver.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175650,35 +160032,62 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster EcosystemInformation | 0x0750 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * DeviceDirectory | 0x0000 | +| * LocationDirectory | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ReactivePowerPhaseC + * Attribute DeviceDirectory */ -class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { +class ReadEcosystemInformationDeviceDirectory : public ReadAttribute { public: - ReadElectricalMeasurementReactivePowerPhaseC() - : ReadAttribute("reactive-power-phase-c") + ReadEcosystemInformationDeviceDirectory() + : ReadAttribute("device-directory") { } - ~ReadElectricalMeasurementReactivePowerPhaseC() + ~ReadEcosystemInformationDeviceDirectory() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::DeviceDirectory::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeDeviceDirectoryWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.DeviceDirectory response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); + LogNSError("EcosystemInformation DeviceDirectory read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175687,25 +160096,25 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationDeviceDirectory : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() - : SubscribeAttribute("reactive-power-phase-c") + SubscribeAttributeEcosystemInformationDeviceDirectory() + : SubscribeAttribute("device-directory") { } - ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() + ~SubscribeAttributeEcosystemInformationDeviceDirectory() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::DeviceDirectory::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175716,10 +160125,10 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerPhaseCWithParams:params + [cluster subscribeAttributeDeviceDirectoryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.DeviceDirectory response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175732,35 +160141,42 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ApparentPowerPhaseC + * Attribute LocationDirectory */ -class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { +class ReadEcosystemInformationLocationDirectory : public ReadAttribute { public: - ReadElectricalMeasurementApparentPowerPhaseC() - : ReadAttribute("apparent-power-phase-c") + ReadEcosystemInformationLocationDirectory() + : ReadAttribute("location-directory") { } - ~ReadElectricalMeasurementApparentPowerPhaseC() + ~ReadEcosystemInformationLocationDirectory() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::LocationDirectory::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeLocationDirectoryWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.LocationDirectory response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); + LogNSError("EcosystemInformation LocationDirectory read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175769,25 +160185,25 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationLocationDirectory : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() - : SubscribeAttribute("apparent-power-phase-c") + SubscribeAttributeEcosystemInformationLocationDirectory() + : SubscribeAttribute("location-directory") { } - ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() + ~SubscribeAttributeEcosystemInformationLocationDirectory() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::LocationDirectory::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175798,10 +160214,10 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerPhaseCWithParams:params + [cluster subscribeAttributeLocationDirectoryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.LocationDirectory response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175814,35 +160230,38 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PowerFactorPhaseC + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { +class ReadEcosystemInformationGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactorPhaseC() - : ReadAttribute("power-factor-phase-c") + ReadEcosystemInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementPowerFactorPhaseC() + ~ReadEcosystemInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); + LogNSError("EcosystemInformation GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175851,25 +160270,25 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() - : SubscribeAttribute("power-factor-phase-c") + SubscribeAttributeEcosystemInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() + ~SubscribeAttributeEcosystemInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175880,10 +160299,10 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorPhaseCWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175896,35 +160315,38 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsVoltageMeasurementPeriodPhaseC + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public ReadAttribute { +class ReadEcosystemInformationAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() - : ReadAttribute("average-rms-voltage-measurement-period-phase-c") + ReadEcosystemInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() + ~ReadEcosystemInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseC read Error", error); + LogNSError("EcosystemInformation AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -175933,25 +160355,25 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public } }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() - : SubscribeAttribute("average-rms-voltage-measurement-period-phase-c") + SubscribeAttributeEcosystemInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() + ~SubscribeAttributeEcosystemInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -175962,10 +160384,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -175978,35 +160400,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsOverVoltageCounterPhaseC + * Attribute EventList */ -class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadAttribute { +class ReadEcosystemInformationEventList : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() - : ReadAttribute("average-rms-over-voltage-counter-phase-c") + ReadEcosystemInformationEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() + ~ReadEcosystemInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); + LogNSError("EcosystemInformation EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176015,25 +160440,25 @@ class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadA } }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() - : SubscribeAttribute("average-rms-over-voltage-counter-phase-c") + SubscribeAttributeEcosystemInformationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() + ~SubscribeAttributeEcosystemInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176044,10 +160469,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176060,35 +160485,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AverageRmsUnderVoltageCounterPhaseC + * Attribute AttributeList */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public ReadAttribute { +class ReadEcosystemInformationAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() - : ReadAttribute("average-rms-under-voltage-counter-phase-c") + ReadEcosystemInformationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() + ~ReadEcosystemInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseC read Error", error); + LogNSError("EcosystemInformation AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176097,25 +160525,25 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() - : SubscribeAttribute("average-rms-under-voltage-counter-phase-c") + SubscribeAttributeEcosystemInformationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() + ~SubscribeAttributeEcosystemInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176126,10 +160554,10 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176142,35 +160570,38 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsExtremeOverVoltagePeriodPhaseC + * Attribute FeatureMap */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAttribute { +class ReadEcosystemInformationFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() - : ReadAttribute("rms-extreme-over-voltage-period-phase-c") + ReadEcosystemInformationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() + ~ReadEcosystemInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); + LogNSError("EcosystemInformation FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176179,25 +160610,25 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAt } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() - : SubscribeAttribute("rms-extreme-over-voltage-period-phase-c") + SubscribeAttributeEcosystemInformationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() + ~SubscribeAttributeEcosystemInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176208,10 +160639,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + NSLog(@"EcosystemInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176224,35 +160655,38 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsExtremeUnderVoltagePeriodPhaseC + * Attribute ClusterRevision */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadAttribute { +class ReadEcosystemInformationClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() - : ReadAttribute("rms-extreme-under-voltage-period-phase-c") + ReadEcosystemInformationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() + ~ReadEcosystemInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EcosystemInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); + LogNSError("EcosystemInformation ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176261,25 +160695,25 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadA } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeEcosystemInformationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() - : SubscribeAttribute("rms-extreme-under-voltage-period-phase-c") + SubscribeAttributeEcosystemInformationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() + ~SubscribeAttributeEcosystemInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176290,10 +160724,10 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + NSLog(@"EcosystemInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176306,117 +160740,201 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster CommissionerControl | 0x0751 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RequestCommissioningApproval | 0x00 | +| * CommissionNode | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * SupportedDeviceCategories | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * CommissioningRequestResult | 0x0000 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute RmsVoltageSagPeriodPhaseC + * Command RequestCommissioningApproval */ -class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute { +class CommissionerControlRequestCommissioningApproval : public ClusterCommand { public: - ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() - : ReadAttribute("rms-voltage-sag-period-phase-c") - { - } - - ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() + CommissionerControlRequestCommissioningApproval() + : ClusterCommand("request-commissioning-approval") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("Label", &mRequest.label); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Id; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.label.HasValue()) { + params.label = [[NSString alloc] initWithBytes:mRequest.label.Value().data() length:mRequest.label.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.label = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster requestCommissioningApprovalWithParams:params completion: + ^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Type mRequest; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CommissionNode + */ +class CommissionerControlCommissionNode : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() - : SubscribeAttribute("rms-voltage-sag-period-phase-c") - { - } - - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() + CommissionerControlCommissionNode() + : ClusterCommand("commission-node") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ResponseTimeoutSeconds", 0, UINT16_MAX, &mRequest.responseTimeoutSeconds); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRCommissionerControlClusterCommissionNodeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.responseTimeoutSeconds = [NSNumber numberWithUnsignedShort:mRequest.responseTimeoutSeconds]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster commissionNodeWithParams:params completion: + ^(MTRCommissionerControlClusterReverseOpenCommissioningWindowParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RmsVoltageSwellPeriodPhaseC + * Attribute SupportedDeviceCategories */ -class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribute { +class ReadCommissionerControlSupportedDeviceCategories : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() - : ReadAttribute("rms-voltage-swell-period-phase-c") + ReadCommissionerControlSupportedDeviceCategories() + : ReadAttribute("supported-device-categories") { } - ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() + ~ReadCommissionerControlSupportedDeviceCategories() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedDeviceCategoriesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"CommissionerControl.SupportedDeviceCategories response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); + LogNSError("CommissionerControl SupportedDeviceCategories read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176425,25 +160943,25 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlSupportedDeviceCategories : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() - : SubscribeAttribute("rms-voltage-swell-period-phase-c") + SubscribeAttributeCommissionerControlSupportedDeviceCategories() + : SubscribeAttribute("supported-device-categories") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() + ~SubscribeAttributeCommissionerControlSupportedDeviceCategories() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::SupportedDeviceCategories::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176454,10 +160972,10 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:params + [cluster subscribeAttributeSupportedDeviceCategoriesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + NSLog(@"CommissionerControl.SupportedDeviceCategories response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176470,35 +160988,38 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { +class ReadCommissionerControlGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementGeneratedCommandList() + ReadCommissionerControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementGeneratedCommandList() + ~ReadCommissionerControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"CommissionerControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); + LogNSError("CommissionerControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176507,25 +161028,25 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementGeneratedCommandList() + SubscribeAttributeCommissionerControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementGeneratedCommandList() + ~SubscribeAttributeCommissionerControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::GeneratedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176539,7 +161060,7 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"CommissionerControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176552,35 +161073,38 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { +class ReadCommissionerControlAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementAcceptedCommandList() + ReadCommissionerControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementAcceptedCommandList() + ~ReadCommissionerControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"CommissionerControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); + LogNSError("CommissionerControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176589,25 +161113,25 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcceptedCommandList() + SubscribeAttributeCommissionerControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementAcceptedCommandList() + ~SubscribeAttributeCommissionerControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AcceptedCommandList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176621,7 +161145,7 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"CommissionerControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176634,37 +161158,38 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadElectricalMeasurementEventList : public ReadAttribute { +class ReadCommissionerControlEventList : public ReadAttribute { public: - ReadElectricalMeasurementEventList() + ReadCommissionerControlEventList() : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementEventList() + ~ReadCommissionerControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); + NSLog(@"CommissionerControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement EventList read Error", error); + LogNSError("CommissionerControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176673,25 +161198,25 @@ class ReadElectricalMeasurementEventList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementEventList() + SubscribeAttributeCommissionerControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementEventList() + ~SubscribeAttributeCommissionerControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::EventList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176705,7 +161230,7 @@ class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribu [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); + NSLog(@"CommissionerControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176719,36 +161244,37 @@ class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribu }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadElectricalMeasurementAttributeList : public ReadAttribute { +class ReadCommissionerControlAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementAttributeList() + ReadCommissionerControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementAttributeList() + ~ReadCommissionerControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + NSLog(@"CommissionerControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement AttributeList read Error", error); + LogNSError("CommissionerControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176757,25 +161283,25 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAttributeList() + SubscribeAttributeCommissionerControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementAttributeList() + ~SubscribeAttributeCommissionerControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::AttributeList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176789,7 +161315,7 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + NSLog(@"CommissionerControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176802,35 +161328,38 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadElectricalMeasurementFeatureMap : public ReadAttribute { +class ReadCommissionerControlFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementFeatureMap() + ReadCommissionerControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementFeatureMap() + ~ReadCommissionerControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + NSLog(@"CommissionerControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement FeatureMap read Error", error); + LogNSError("CommissionerControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176839,25 +161368,25 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementFeatureMap() + SubscribeAttributeCommissionerControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementFeatureMap() + ~SubscribeAttributeCommissionerControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::FeatureMap::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176871,7 +161400,7 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + NSLog(@"CommissionerControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176884,35 +161413,38 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadElectricalMeasurementClusterRevision : public ReadAttribute { +class ReadCommissionerControlClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementClusterRevision() + ReadCommissionerControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementClusterRevision() + ~ReadCommissionerControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::CommissionerControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"CommissionerControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ElectricalMeasurement ClusterRevision read Error", error); + LogNSError("CommissionerControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -176921,25 +161453,25 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeCommissionerControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementClusterRevision() + SubscribeAttributeCommissionerControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementClusterRevision() + ~SubscribeAttributeCommissionerControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::CommissionerControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::CommissionerControl::Attributes::ClusterRevision::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterCommissionerControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -176953,7 +161485,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"CommissionerControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -176966,6 +161498,8 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster UnitTesting | 0xFFF1FC05 | |------------------------------------------------------------------------------| @@ -191920,40 +176454,6 @@ void registerClusterOnOff(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOnOffSwitchConfiguration(Commands & commands) -{ - using namespace chip::app::Clusters::OnOffSwitchConfiguration; - - const char * clusterName = "OnOffSwitchConfiguration"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterLevelControl(Commands & commands) { using namespace chip::app::Clusters::LevelControl; @@ -192027,59 +176527,6 @@ void registerClusterLevelControl(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBinaryInputBasic(Commands & commands) -{ - using namespace chip::app::Clusters::BinaryInputBasic; - - const char * clusterName = "BinaryInputBasic"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - 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(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterPulseWidthModulation(Commands & commands) { #if MTR_ENABLE_PROVISIONAL @@ -196278,63 +180725,6 @@ void registerClusterWindowCovering(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBarrierControl(Commands & commands) -{ - using namespace chip::app::Clusters::BarrierControl; - - const char * clusterName = "BarrierControl"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - 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(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterServiceArea(Commands & commands) { #if MTR_ENABLE_PROVISIONAL @@ -198734,301 +183124,6 @@ void registerClusterCommissionerControl(Commands & commands) commands.RegisterCluster(clusterName, clusterCommands); #endif // MTR_ENABLE_PROVISIONAL } -void registerClusterElectricalMeasurement(Commands & commands) -{ - using namespace chip::app::Clusters::ElectricalMeasurement; - - const char * clusterName = "ElectricalMeasurement"; - - commands_list clusterCommands = { - make_unique(Id), // - make_unique(), // - make_unique(), // - make_unique(Id), // - make_unique(Id), // - make_unique(Id), // - 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(), // - 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(), // - 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(), // - 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(), // - 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(), // - 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(), // - 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(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterUnitTesting(Commands & commands) { using namespace chip::app::Clusters::UnitTesting; @@ -199456,9 +183551,7 @@ void registerClusters(Commands & commands) registerClusterIdentify(commands); registerClusterGroups(commands); registerClusterOnOff(commands); - registerClusterOnOffSwitchConfiguration(commands); registerClusterLevelControl(commands); - registerClusterBinaryInputBasic(commands); registerClusterPulseWidthModulation(commands); registerClusterDescriptor(commands); registerClusterBinding(commands); @@ -199529,7 +183622,6 @@ void registerClusters(Commands & commands) registerClusterDeviceEnergyManagementMode(commands); registerClusterDoorLock(commands); registerClusterWindowCovering(commands); - registerClusterBarrierControl(commands); registerClusterServiceArea(commands); registerClusterPumpConfigurationAndControl(commands); registerClusterThermostat(commands); @@ -199572,7 +183664,6 @@ void registerClusters(Commands & commands) registerClusterContentAppObserver(commands); registerClusterEcosystemInformation(commands); registerClusterCommissionerControl(commands); - registerClusterElectricalMeasurement(commands); registerClusterUnitTesting(commands); registerClusterSampleMei(commands); } From 4f3570653b165d4317aa230a7e313942b6983a3c Mon Sep 17 00:00:00 2001 From: Yuanyao Zhong <82843247+yyzhong-g@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:18:04 -0400 Subject: [PATCH 30/42] Add Write Handler in Chef Fan Control AttributeAccessInterface (#35046) * Add Write Handler in Chef Fan Control AttributeAccessInterface * Restyled by clang-format * Update examples/chef/common/chef-fan-control-manager.cpp Co-authored-by: Andrei Litvin --------- Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- .../chef/common/chef-fan-control-manager.cpp | 114 +++++++++++++----- 1 file changed, 86 insertions(+), 28 deletions(-) diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index b30f58db27aee7..8d9ed5ae8bb699 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +31,7 @@ using namespace chip; using namespace chip::app; +using namespace chip::app::DataModel; using namespace chip::app::Clusters; using namespace chip::app::Clusters::FanControl; using namespace chip::app::Clusters::FanControl::Attributes; @@ -43,38 +45,17 @@ class ChefFanControlManager : public AttributeAccessInterface, public Delegate AttributeAccessInterface(Optional(aEndpointId), FanControl::Id), Delegate(aEndpointId) {} + CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; Status HandleStep(StepDirectionEnum aDirection, bool aWrap, bool aLowestOff) override; private: - CHIP_ERROR ReadPercentCurrent(AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadSpeedCurrent(AttributeValueEncoder & aEncoder); + Nullable mPercentSetting{}; + Nullable mSpeedSetting{}; }; static std::unique_ptr mFanControlManager; -CHIP_ERROR ChefFanControlManager::ReadPercentCurrent(AttributeValueEncoder & aEncoder) -{ - // Return PercentSetting attribute value for now - DataModel::Nullable percentSetting; - Protocols::InteractionModel::Status status = PercentSetting::Get(mEndpoint, percentSetting); - - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED); - - return aEncoder.Encode(percentSetting.ValueOr(0)); -} - -CHIP_ERROR ChefFanControlManager::ReadSpeedCurrent(AttributeValueEncoder & aEncoder) -{ - // Return SpeedCurrent attribute value for now - DataModel::Nullable speedSetting; - Protocols::InteractionModel::Status status = SpeedSetting::Get(mEndpoint, speedSetting); - - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, CHIP_ERROR_READ_FAILED); - - return aEncoder.Encode(speedSetting.ValueOr(0)); -} - Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWrap, bool aLowestOff) { ChipLogProgress(NotSpecified, "ChefFanControlManager::HandleStep aDirection %d, aWrap %d, aLowestOff %d", @@ -118,6 +99,73 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra return SpeedSetting::Set(mEndpoint, newSpeedSetting); } +CHIP_ERROR ChefFanControlManager::Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) +{ + VerifyOrDie(aPath.mClusterId == FanControl::Id); + VerifyOrDie(aPath.mEndpointId == mEndpoint); + + switch (aPath.mAttributeId) + { + case SpeedSetting::Id: { + Nullable newSpeedSetting; + ReturnErrorOnFailure(aDecoder.Decode(newSpeedSetting)); + + // Ensure new speed is in bounds + { + uint8_t maxSpeedSetting = 0; + Protocols::InteractionModel::Status status = SpeedMax::Get(mEndpoint, &maxSpeedSetting); + VerifyOrReturnError(status == Protocols::InteractionModel::Status::Success, CHIP_IM_GLOBAL_STATUS(Failure)); + + if (!newSpeedSetting.IsNull() && newSpeedSetting.Value() > maxSpeedSetting) + { + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } + } + + // Only act on changed. + if (newSpeedSetting != mSpeedSetting) + { + mSpeedSetting = newSpeedSetting; + + // Mark both the setting AND the current dirty, since the current always + // tracks the target for our product. + MatterReportingAttributeChangeCallback(mEndpoint, FanControl::Id, Attributes::SpeedSetting::Id); + MatterReportingAttributeChangeCallback(mEndpoint, FanControl::Id, Attributes::SpeedCurrent::Id); + } + + break; + } + case PercentSetting::Id: { + Nullable newPercentSetting; + ReturnErrorOnFailure(aDecoder.Decode(newPercentSetting)); + + // Ensure new speed in percent is valid. + if (!newPercentSetting.IsNull() && newPercentSetting.Value() > 100) + { + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } + + // Only act on changed. + if (newPercentSetting != mPercentSetting) + { + mPercentSetting = newPercentSetting; + + // Mark both the setting AND the current dirty, since the current always + // tracks the target for our product. + MatterReportingAttributeChangeCallback(mEndpoint, FanControl::Id, Attributes::PercentSetting::Id); + MatterReportingAttributeChangeCallback(mEndpoint, FanControl::Id, Attributes::PercentCurrent::Id); + } + + break; + } + default: + break; + } + + // Fall through goes to attribute store legacy handling. + return CHIP_NO_ERROR; +} + CHIP_ERROR ChefFanControlManager::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { VerifyOrDie(aPath.mClusterId == FanControl::Id); @@ -125,10 +173,20 @@ CHIP_ERROR ChefFanControlManager::Read(const ConcreteReadAttributePath & aPath, switch (aPath.mAttributeId) { - case SpeedCurrent::Id: - return ReadSpeedCurrent(aEncoder); - case PercentCurrent::Id: - return ReadPercentCurrent(aEncoder); + case PercentCurrent::Id: { + // Current percents always tracks setting immediately in our implementation. + return aEncoder.Encode(mPercentSetting.ValueOr(0)); + } + case PercentSetting::Id: { + return aEncoder.Encode(mPercentSetting); + } + case SpeedCurrent::Id: { + // Current speed always tracks setting immediately in our implementation. + return aEncoder.Encode(mSpeedSetting.ValueOr(0)); + } + case SpeedSetting::Id: { + return aEncoder.Encode(mSpeedSetting); + } default: break; } From dbf73276f282557b5066611398c87f577c730dfd Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 16 Sep 2024 16:48:29 -0400 Subject: [PATCH 31/42] Prevent setting up a commissioning session on a suspended controller. (#35602) * Prevent setting up a commissioning session on a suspended controller. Since commissioning session setup does not go through MTRDevice or MTRBaseDevice this was not blocked. * Update src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm Co-authored-by: Kiel Oleson --------- Co-authored-by: Kiel Oleson --- .../Framework/CHIP/MTRDeviceController.mm | 2 +- .../CHIP/MTRDeviceController_Concrete.mm | 20 ++++++++++++++++++- .../CHIPTests/MTRPerControllerStorageTests.m | 9 +++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 58ef5b58c8ed32..e39a4d14e75612 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -366,7 +366,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory - (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier]; + return [NSString stringWithFormat:@"<%@: %p, uuid: %@, suspended: %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier, MTR_YES_NO(self.suspended)]; } - (BOOL)isRunning diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index a73a644b85302a..3a7fd008d99b5d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -345,7 +345,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory - (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier]; + return [NSString stringWithFormat:@"<%@: %p, uuid: %@, suspended: %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier, MTR_YES_NO(self.suspended)]; } - (BOOL)isRunning @@ -823,6 +823,15 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID error:(NSError * __autoreleasing *)error { + if (self.suspended) { + MTR_LOG_ERROR("%@ suspended: can't set up commissioning session for device ID 0x%016llX with setup payload %@", self, newNodeID.unsignedLongLongValue, payload); + // TODO: Can we do a better error here? + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + return NO; + } + MTR_LOG("Setting up commissioning session for device ID 0x%016llX with setup payload %@", newNodeID.unsignedLongLongValue, payload); [[MTRMetricsCollector sharedInstance] resetMetrics]; @@ -952,6 +961,15 @@ - (BOOL)commissionNodeWithID:(NSNumber *)nodeID commissioningParams:(MTRCommissioningParameters *)commissioningParams error:(NSError * __autoreleasing *)error { + if (self.suspended) { + MTR_LOG_ERROR("%@ suspended: can't commission device ID 0x%016llX with parameters %@", self, nodeID.unsignedLongLongValue, commissioningParams); + // TODO: Can we do a better error here? + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + return NO; + } + auto block = ^BOOL { chip::Controller::CommissioningParameters params; if (commissioningParams.csrNonce) { diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index b7dad2e542c264..a7b8ddeee1d034 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -1682,6 +1682,15 @@ - (void)test012_startSuspended XCTAssertNotNil(controller); XCTAssertTrue(controller.running); XCTAssertTrue(controller.suspended); + + // Test that a suspended controller can't set up a commissioning session. + __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(payload); + + [controller setupCommissioningSessionWithPayload:payload newNodeID:@(17) error:&error]; + XCTAssertNotNil(error); + [controller shutdown]; } From 010ad94aebe2aa77df6a6c15f80d509646ce6169 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Mon, 16 Sep 2024 17:23:12 -0400 Subject: [PATCH 32/42] Update BUILDING.md to include Java JRE (#35603) - Installed a new PC for work. Could not run zap_regen_all.py successfully, as the Java dependency was not installed, but this was not stated in the manual. --- docs/guides/BUILDING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 941b5328887e31..0cbd2fc3c64920 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -94,7 +94,8 @@ satisfied with the following command: ``` sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \ - python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev + python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev \ + default-jre ``` #### UI builds From add0bf1963b0039d4d381a807dd9a1cb20e8bc53 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 17 Sep 2024 00:31:14 -0400 Subject: [PATCH 33/42] Improve some MTRDeviceController logging. (#35609) More things should include context about which controller is involved. --- .../CHIP/MTRDeviceControllerDelegateBridge.mm | 24 +++++++++++-------- .../CHIP/MTRDeviceController_Concrete.mm | 2 +- .../CHIP/ServerEndpoint/MTRServerCluster.mm | 4 ++-- .../CHIP/ServerEndpoint/MTRServerEndpoint.mm | 4 ++-- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm index 5972b17de804e2..f19306eb7b67d0 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm @@ -62,7 +62,9 @@ void MTRDeviceControllerDelegateBridge::OnStatusUpdate(chip::Controller::DevicePairingDelegate::Status status) { - MTR_LOG("DeviceControllerDelegate status updated: %d", status); + MTRDeviceController * strongController = mController; + + MTR_LOG("%@ DeviceControllerDelegate status updated: %d", strongController, status); // If pairing failed, PASE failed. However, since OnPairingComplete(failure_code) might not be invoked in all cases, mark // end of PASE with timeout as assumed failure. If OnPairingComplete is invoked, the right error code will be updated in @@ -72,7 +74,6 @@ } id strongDelegate = mDelegate; - MTRDeviceController * strongController = mController; if (strongDelegate && mQueue && strongController) { if ([strongDelegate respondsToSelector:@selector(controller:statusUpdate:)]) { MTRCommissioningStatus commissioningStatus = MapStatus(status); @@ -93,15 +94,16 @@ void MTRDeviceControllerDelegateBridge::OnPairingComplete(CHIP_ERROR error) { + MTRDeviceController * strongController = mController; + if (error == CHIP_NO_ERROR) { - MTR_LOG("MTRDeviceControllerDelegate PASE session establishment succeeded."); + MTR_LOG("%@ MTRDeviceControllerDelegate PASE session establishment succeeded.", strongController); } else { - MTR_LOG_ERROR("MTRDeviceControllerDelegate PASE session establishment failed: %" CHIP_ERROR_FORMAT, error.Format()); + MTR_LOG_ERROR("%@ MTRDeviceControllerDelegate PASE session establishment failed: %" CHIP_ERROR_FORMAT, strongController, error.Format()); } MATTER_LOG_METRIC_END(kMetricSetupPASESession, error); id strongDelegate = mDelegate; - MTRDeviceController * strongController = mController; if (strongDelegate && mQueue && strongController) { if ([strongDelegate respondsToSelector:@selector(controller:commissioningSessionEstablishmentDone:)]) { dispatch_async(mQueue, ^{ @@ -121,13 +123,14 @@ void MTRDeviceControllerDelegateBridge::OnReadCommissioningInfo(const chip::Controller::ReadCommissioningInfo & info) { + MTRDeviceController * strongController = mController; + chip::VendorId vendorId = info.basic.vendorId; uint16_t productId = info.basic.productId; - MTR_LOG("DeviceControllerDelegate Read Commissioning Info. VendorId %u ProductId %u", vendorId, productId); + MTR_LOG("%@ DeviceControllerDelegate Read Commissioning Info. VendorId %u ProductId %u", strongController, vendorId, productId); id strongDelegate = mDelegate; - MTRDeviceController * strongController = mController; if (strongDelegate && mQueue && strongController) { if ([strongDelegate respondsToSelector:@selector(controller:readCommissioningInfo:)]) { dispatch_async(mQueue, ^{ @@ -140,16 +143,17 @@ void MTRDeviceControllerDelegateBridge::OnCommissioningComplete(chip::NodeId nodeId, CHIP_ERROR error) { - MTR_LOG("DeviceControllerDelegate Commissioning complete. NodeId %llu Status %s", nodeId, chip::ErrorStr(error)); + MTRDeviceController * strongController = mController; + + MTR_LOG("%@ DeviceControllerDelegate Commissioning complete. NodeId 0x%016llx Status %s", strongController, nodeId, chip::ErrorStr(error)); MATTER_LOG_METRIC_END(kMetricDeviceCommissioning, error); id strongDelegate = mDelegate; - MTRDeviceController * strongController = mController; if (strongDelegate && mQueue && strongController) { // Always collect the metrics to avoid unbounded growth of the stats in the collector MTRMetrics * metrics = [[MTRMetricsCollector sharedInstance] metricSnapshot:TRUE]; - MTR_LOG("Device commissioning complete with metrics %@", metrics); + MTR_LOG("%@ Device commissioning complete with metrics %@", strongController, metrics); if ([strongDelegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:)] || [strongDelegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:metrics:)]) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index 3a7fd008d99b5d..0cbb8b7e95d8c4 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -832,7 +832,7 @@ - (BOOL)setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload return NO; } - MTR_LOG("Setting up commissioning session for device ID 0x%016llX with setup payload %@", newNodeID.unsignedLongLongValue, payload); + MTR_LOG("%@ Setting up commissioning session for device ID 0x%016llX with setup payload %@", self, newNodeID.unsignedLongLongValue, payload); [[MTRMetricsCollector sharedInstance] resetMetrics]; diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm index 172ce2bd0d0797..e2f6fecbbb6bee 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm @@ -346,8 +346,8 @@ - (BOOL)associateWithController:(nullable MTRDeviceController *)controller _deviceController = controller; - MTR_LOG("Associated %@, attribute count %llu, with controller", [self _descriptionWhileLocked], - static_cast(attributeCount)); + MTR_LOG("Associated %@, attribute count %llu, with controller %@", [self _descriptionWhileLocked], + static_cast(attributeCount), controller); return YES; } diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm index d9e54bce58d395..1b0f27fbaf141e 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm @@ -311,8 +311,8 @@ - (BOOL)finishAssociationWithController:(nullable MTRDeviceController *)controll _deviceController = controller; - MTR_LOG("Associated %@, cluster count %llu, with controller", - self, static_cast(clusterCount)); + MTR_LOG("Associated %@, cluster count %llu, with controller %@", + self, static_cast(clusterCount), controller); return YES; } From 514e810a7cfd3a8c99f612cbfe51a4e403f2ffd5 Mon Sep 17 00:00:00 2001 From: doru91 Date: Tue, 17 Sep 2024 11:39:33 +0300 Subject: [PATCH 34/42] [lit icd] add sdk support for dsls (Dynamic SIT LIT support) (#35325) * [lit icd] add sdk support for dsls (Dynamic SIT LIT support) Signed-off-by: Doru Gucea * [mcxw71_k32w1][lit icd] add platform support for dsls (Dynamic SIT LIT support) Signed-off-by: Doru Gucea * [lit icd] add DSLS Test Event trigger Signed-off-by: Doru Gucea * [linux app][lit icd] enable DSLS Signed-off-by: Doru Gucea --------- Signed-off-by: Doru Gucea --- .github/.wordlist.txt | 1 + examples/contact-sensor-app/nxp/README.md | 1 + .../contact-sensor-app/nxp/k32w1/README.md | 15 ++--- .../contact-sensor-app/nxp/k32w1/args.gni | 1 + .../nxp/zap-lit/contact-sensor-app.matter | 2 +- .../nxp/zap-lit/contact-sensor-app.zap | 4 +- examples/lit-icd-app/linux/args.gni | 1 + .../lit-icd-common/lit-icd-server-app.matter | 2 +- .../lit-icd-common/lit-icd-server-app.zap | 20 +------ .../nxp/mcxw71_k32w1/button/ButtonManager.cpp | 36 ++++++++++++ .../nxp/mcxw71_k32w1/button/ButtonManager.h | 7 +++ src/app/icd/icd.gni | 3 + src/app/icd/server/BUILD.gn | 1 + src/app/icd/server/ICDManager.cpp | 55 +++++++++++++++--- src/app/icd/server/ICDManager.h | 10 ++++ src/app/icd/server/ICDNotifier.cpp | 24 ++++++++ src/app/icd/server/ICDNotifier.h | 18 ++++++ src/app/icd/server/tests/TestICDManager.cpp | 58 +++++++++++++++++++ .../suites/TestIcdManagementCluster.yaml | 2 +- 19 files changed, 221 insertions(+), 40 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index f317901e450aa6..31955b6c9ad617 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -453,6 +453,7 @@ dpkg dropdown dryrun DS +DSLS duplicative DUT DUTS diff --git a/examples/contact-sensor-app/nxp/README.md b/examples/contact-sensor-app/nxp/README.md index 133539e44ce3ec..20474bea76057c 100644 --- a/examples/contact-sensor-app/nxp/README.md +++ b/examples/contact-sensor-app/nxp/README.md @@ -154,6 +154,7 @@ This is a list of ICD configuration gn args. | nxp_active_mode_threshold_ms | 1000 (ms) | Active Mode Threshold value | | nxp_icd_supported_clients_per_fabric | 2 | Registration slots per fabric | | chip_enable_icd_lit | false | Enable LIT ICD support | +| chip_enable_icd_dsls | false | Enable LIT ICD DSLS support | | chip_persist_subscriptions | true | Try once to re-establish subscriptions from the server side after reboot. May be disabled for LIT use case | | chip_subscription_timeout_resumption | true | Same as above, but try to re-establish timeout out subscriptions | | using `Fibonacci Backoff` for retries pacing. May be disabled for LIT use case | diff --git a/examples/contact-sensor-app/nxp/k32w1/README.md b/examples/contact-sensor-app/nxp/k32w1/README.md index 217f06e11906b6..5f47979e2d25bb 100644 --- a/examples/contact-sensor-app/nxp/k32w1/README.md +++ b/examples/contact-sensor-app/nxp/k32w1/README.md @@ -41,13 +41,14 @@ operation by corrupting packages and OTA will not work. The user actions are summarized below: -| button | action | state | output | -| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -| SW2 | short press | not commissioned | Enable BLE advertising | -| SW2 | short press | commissioned + device is LIT | Enable Active Mode | -| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) | -| SW3 | short press | NA | Toggle attribute `StateValue` value | -| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) | +| button | action | state | output | +| ------ | ------------ | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| SW2 | short press | not commissioned | Enable BLE advertising | +| SW2 | short press | commissioned + device is LIT | Enable Active Mode | +| SW2 | double press | commissioned + device is LIT + supports DSLS | Enable / Disable SIT Mode | +| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) | +| SW3 | short press | NA | Toggle attribute `StateValue` value | +| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) | ## Building diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index b1c31aa7eb642a..98372f4b8261e4 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -31,6 +31,7 @@ chip_with_lwip = false chip_enable_icd_server = true chip_enable_icd_lit = false +chip_enable_icd_dsls = false icd_enforce_sit_slow_poll_limit = true chip_persist_subscriptions = true chip_subscription_timeout_resumption = true diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index 5e877d10e662a1..25deeedf5ee495 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -2012,7 +2012,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x0007; + ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 3; handle command RegisterClient; diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap index 83c1526403104e..25d003c55eb798 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap @@ -3818,7 +3818,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0007", + "defaultValue": "0x000F", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4317,4 +4317,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/lit-icd-app/linux/args.gni b/examples/lit-icd-app/linux/args.gni index b1567dd6284893..1692f982753031 100644 --- a/examples/lit-icd-app/linux/args.gni +++ b/examples/lit-icd-app/linux/args.gni @@ -31,3 +31,4 @@ chip_enable_icd_server = true chip_subscription_timeout_resumption = true chip_icd_report_on_active_mode = true chip_enable_icd_lit = true +chip_enable_icd_dsls = true diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index a1beda368f8f29..a5d5f2ba4fb274 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -2097,7 +2097,7 @@ endpoint 0 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0x0007; + ram attribute featureMap default = 0x000F; ram attribute clusterRevision default = 3; handle command RegisterClient; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index 09567dcb43c99f..18c561cfbf3314 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -829,24 +829,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3558,7 +3540,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0007", + "defaultValue": "0x000F", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp index 09b0546c30968c..6e5390d997a9b8 100644 --- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp +++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.cpp @@ -51,6 +51,10 @@ ButtonManager ButtonManager::sInstance; TimerHandle_t resetTimer; +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) +static bool sitModeRequested; +#endif // CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS + CHIP_ERROR ButtonManager::Init() { resetTimer = xTimerCreate("FnTmr", 1, false, (void *) this, [](TimerHandle_t xTimer) { @@ -60,6 +64,10 @@ CHIP_ERROR ButtonManager::Init() }); VerifyOrReturnError(resetTimer != NULL, APP_ERROR_CREATE_TIMER_FAILED); +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) + static bool sitModeRequested; +#endif // CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS + return CHIP_NO_ERROR; } @@ -76,6 +84,13 @@ button_status_t ButtonManager::BleCallback(void * handle, button_callback_messag case kBUTTON_EventLongPress: event.Handler = ButtonManager::ResetActionEventHandler; break; + +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) + case kBUTTON_EventDoubleClick: + event.Handler = ButtonManager::DSLSActionEventHandler; + break; +#endif + default: /* No action required */ break; @@ -187,6 +202,27 @@ void ButtonManager::BleHandler(const AppEvent & event) chip::NXP::App::GetAppTask().SwitchCommissioningStateHandler(); } +#if (CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS) +void ButtonManager::DSLSActionEventHandler(const AppEvent & event) +{ + if (chip::DeviceLayer::ConfigurationMgr().IsFullyProvisioned()) + { + if (!sitModeRequested) + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestNotification(); }, 0); + sitModeRequested = true; + } + else + { + chip::DeviceLayer::PlatformMgr().ScheduleWork( + [](intptr_t arg) { chip::app::ICDNotifier::GetInstance().NotifySITModeRequestWithdrawal(); }, 0); + sitModeRequested = false; + } + } +} +#endif // CHIP_CONFIG_ENABLE_ICD_LIT && CHIP_CONFIG_ENABLE_ICD_DSLS + void ButtonManager::CancelTimer() { if (xTimerStop(resetTimer, 0) == pdFAIL) diff --git a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h index aec2411e1095af..7f4f6cf81d94d3 100644 --- a/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h +++ b/examples/platform/nxp/mcxw71_k32w1/button/ButtonManager.h @@ -87,6 +87,13 @@ class ButtonManager */ static void ResetActionEventHandler(const AppEvent & event); + /** + * @brief This callback schedules a DSLS LIT action (Dynamic SIT LIT Support). + * + * It is used when the app requests SIT mode (check spec, "Runtime Operating Mode Switching") + */ + static void DSLSActionEventHandler(const AppEvent & event); + /** * @brief This callback performs a factory reset. * diff --git a/src/app/icd/icd.gni b/src/app/icd/icd.gni index 8994cf486106aa..ed3fd0518f5858 100644 --- a/src/app/icd/icd.gni +++ b/src/app/icd/icd.gni @@ -30,6 +30,9 @@ declare_args() { # Set to true to enforce SIT Slow Polling Max value to 15seconds (spec 9.16.1.5) icd_enforce_sit_slow_poll_limit = false + + # Set to true if device supports dynamic switching from SIT to LIT operating modes (DSLS) + chip_enable_icd_dsls = false } # Set the defaults for CIP and UAT features to be consistent with the LIT value. diff --git a/src/app/icd/server/BUILD.gn b/src/app/icd/server/BUILD.gn index b30b79d3d4a1d0..e1967c23f52f90 100644 --- a/src/app/icd/server/BUILD.gn +++ b/src/app/icd/server/BUILD.gn @@ -36,6 +36,7 @@ buildconfig_header("icd-server-buildconfig") { "CHIP_CONFIG_ENABLE_ICD_LIT=${chip_enable_icd_lit}", "CHIP_CONFIG_ENABLE_ICD_CIP=${chip_enable_icd_checkin}", "CHIP_CONFIG_ENABLE_ICD_UAT=${chip_enable_icd_user_active_mode_trigger}", + "CHIP_CONFIG_ENABLE_ICD_DSLS=${chip_enable_icd_dsls}", "ICD_REPORT_ON_ENTER_ACTIVE_MODE=${chip_icd_report_on_active_mode}", "ICD_MAX_NOTIFICATION_SUBSCRIBERS=${icd_max_notification_subscribers}", "ICD_ENFORCE_SIT_SLOW_POLL_LIMIT=${icd_enforce_sit_slow_poll_limit}", diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index 2ba08990aef4b6..3e89af1e1613a5 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -36,6 +36,8 @@ enum class ICDTestEventTriggerEvent : uint64_t kInvalidateHalfCounterValues = 0x0046'0000'00000003, kInvalidateAllCounterValues = 0x0046'0000'00000004, kForceMaximumCheckInBackOffState = 0x0046'0000'00000005, + kDSLSForceSitMode = 0x0046'0000'00000006, + kDSLSWithdrawSitMode = 0x0046'0000'00000007, }; } // namespace @@ -367,19 +369,28 @@ void ICDManager::UpdateICDMode() // Device can only switch to the LIT operating mode if LIT support is present if (SupportsFeature(Feature::kLongIdleTimeSupport)) { - VerifyOrDie(mStorage != nullptr); - VerifyOrDie(mFabricTable != nullptr); - // We can only get to LIT Mode, if at least one client is registered with the ICD device - for (const auto & fabricInfo : *mFabricTable) +#if CHIP_CONFIG_ENABLE_ICD_DSLS + // Ensure SIT mode is not requested + if (SupportsFeature(Feature::kDynamicSitLitSupport) && !mSITModeRequested) { - // We only need 1 valid entry to ensure LIT compliance - ICDMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/, mSymmetricKeystore); - if (!table.IsEmpty()) +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS + + VerifyOrDie(mStorage != nullptr); + VerifyOrDie(mFabricTable != nullptr); + // We can only get to LIT Mode, if at least one client is registered with the ICD device + for (const auto & fabricInfo : *mFabricTable) { - tempMode = ICDConfigurationData::ICDMode::LIT; - break; + // We only need 1 valid entry to ensure LIT compliance + ICDMonitoringTable table(*mStorage, fabricInfo.GetFabricIndex(), 1 /*Table entry limit*/, mSymmetricKeystore); + if (!table.IsEmpty()) + { + tempMode = ICDConfigurationData::ICDMode::LIT; + break; + } } +#if CHIP_CONFIG_ENABLE_ICD_DSLS } +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS } #endif // CHIP_CONFIG_ENABLE_ICD_LIT @@ -622,6 +633,24 @@ void ICDManager::OnActiveRequestWithdrawal(KeepActiveFlags request) } } +#if CHIP_CONFIG_ENABLE_ICD_DSLS +void ICDManager::OnSITModeRequest() +{ + mSITModeRequested = true; + this->UpdateICDMode(); + // Update the poll interval also to comply with SIT requirements + UpdateOperationState(OperationalState::ActiveMode); +} + +void ICDManager::OnSITModeRequestWithdrawal() +{ + mSITModeRequested = false; + this->UpdateICDMode(); + // Update the poll interval also to comply with LIT requirements + UpdateOperationState(OperationalState::ActiveMode); +} +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS + void ICDManager::OnNetworkActivity() { this->UpdateOperationState(OperationalState::ActiveMode); @@ -685,6 +714,14 @@ CHIP_ERROR ICDManager::HandleEventTrigger(uint64_t eventTrigger) err = mICDCheckInBackOffStrategy->ForceMaximumCheckInBackoff(); break; #endif // CHIP_CONFIG_ENABLE_ICD_CIP +#if CHIP_CONFIG_ENABLE_ICD_DSLS + case ICDTestEventTriggerEvent::kDSLSForceSitMode: + OnSITModeRequest(); + break; + case ICDTestEventTriggerEvent::kDSLSWithdrawSitMode: + OnSITModeRequestWithdrawal(); + break; +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS default: err = CHIP_ERROR_INVALID_ARGUMENT; break; diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index 19f5f0abeda955..dc516673df8d40 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -241,6 +241,12 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler void OnNetworkActivity() override; void OnKeepActiveRequest(KeepActiveFlags request) override; void OnActiveRequestWithdrawal(KeepActiveFlags request) override; + +#if CHIP_CONFIG_ENABLE_ICD_DSLS + void OnSITModeRequest() override; + void OnSITModeRequestWithdrawal() override; +#endif + void OnICDManagementServerEvent(ICDManagementEvents event) override; void OnSubscriptionReport() override; @@ -356,6 +362,10 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler ObjectPool mStateObserverPool; uint8_t mOpenExchangeContextCount = 0; +#if CHIP_CONFIG_ENABLE_ICD_DSLS + bool mSITModeRequested = false; +#endif + #if CHIP_CONFIG_ENABLE_ICD_CIP uint8_t mCheckInRequestCount = 0; diff --git a/src/app/icd/server/ICDNotifier.cpp b/src/app/icd/server/ICDNotifier.cpp index 4df2379d065131..4b4bf2a7009a46 100644 --- a/src/app/icd/server/ICDNotifier.cpp +++ b/src/app/icd/server/ICDNotifier.cpp @@ -89,6 +89,30 @@ void ICDNotifier::NotifyActiveRequestWithdrawal(ICDListener::KeepActiveFlags req } } +#if CHIP_CONFIG_ENABLE_ICD_DSLS +void ICDNotifier::NotifySITModeRequestNotification() +{ + for (auto subscriber : mSubscribers) + { + if (subscriber != nullptr) + { + subscriber->OnSITModeRequest(); + } + } +} + +void ICDNotifier::NotifySITModeRequestWithdrawal() +{ + for (auto subscriber : mSubscribers) + { + if (subscriber != nullptr) + { + subscriber->OnSITModeRequestWithdrawal(); + } + } +} +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS + void ICDNotifier::NotifyICDManagementEvent(ICDListener::ICDManagementEvents event) { for (auto subscriber : mSubscribers) diff --git a/src/app/icd/server/ICDNotifier.h b/src/app/icd/server/ICDNotifier.h index 785fd1e08c9879..6f4b458bdd7e49 100644 --- a/src/app/icd/server/ICDNotifier.h +++ b/src/app/icd/server/ICDNotifier.h @@ -71,6 +71,20 @@ class ICDListener */ virtual void OnKeepActiveRequest(KeepActiveFlags request) = 0; +#if CHIP_CONFIG_ENABLE_ICD_DSLS + /** + * @brief This function is called for all subscribers of the ICDNotifier when it calls NotifySITModeRequestNotification. + * It informs the subscriber that the ICD must be kept in SIT mode. + */ + virtual void OnSITModeRequest() = 0; + + /** + * @brief This function is called for all subscribers of the ICDNotifier when it calls NotifySITModeRequestWithdrawal. + * It informs the subscriber that a previous request no longer needs ICD to be kept in SIT mode. + */ + virtual void OnSITModeRequestWithdrawal() = 0; +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS + /** * @brief This function is called for all subscribers of the ICDNotifier when it calls NotifyActiveRequestWithdrawal. * It informs the subscriber that a previous request no longer needs ICD to maintain its Active Mode. @@ -109,6 +123,10 @@ class ICDNotifier void NotifyNetworkActivityNotification(); void NotifyActiveRequestNotification(ICDListener::KeepActiveFlags request); void NotifyActiveRequestWithdrawal(ICDListener::KeepActiveFlags request); +#if CHIP_CONFIG_ENABLE_ICD_DSLS + void NotifySITModeRequestNotification(); + void NotifySITModeRequestWithdrawal(); +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS void NotifyICDManagementEvent(ICDListener::ICDManagementEvents event); void NotifySubscriptionReport(); diff --git a/src/app/icd/server/tests/TestICDManager.cpp b/src/app/icd/server/tests/TestICDManager.cpp index df5c2e4970c579..f6f999c1a36bca 100644 --- a/src/app/icd/server/tests/TestICDManager.cpp +++ b/src/app/icd/server/tests/TestICDManager.cpp @@ -695,6 +695,64 @@ TEST_F(TestICDManager, TestICDMStayActive) EXPECT_EQ(stayActivePromisedMs, 20000UL); } +#if CHIP_CONFIG_ENABLE_ICD_DSLS +/** + * @brief Test verifies the logic of the ICDManager related to DSLS (Dynamic SIT LIT Support) + */ +TEST_F(TestICDManager, TestICDMDSLS) +{ + typedef ICDListener::ICDManagementEvents ICDMEvent; + ICDNotifier notifier = ICDNotifier::GetInstance(); + + // Set FeatureMap + // Configures CIP, UAT, LITS and DSLS to 1 + mICDManager.SetTestFeatureMapValue(0x0F); + + // Check ICDManager starts in SIT mode if no entries are present + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::SIT); + + // Create table with one fabric + ICDMonitoringTable table1(testStorage, kTestFabricIndex1, kMaxTestClients, &(mKeystore)); + + // Add an entry to the fabric + ICDMonitoringEntry entry1(&(mKeystore)); + entry1.checkInNodeID = kClientNodeId11; + entry1.monitoredSubject = kClientNodeId12; + EXPECT_EQ(CHIP_NO_ERROR, entry1.SetKey(ByteSpan(kKeyBuffer1a))); + EXPECT_EQ(CHIP_NO_ERROR, table1.Set(0, entry1)); + + // Trigger register event after first entry was added + notifier.NotifyICDManagementEvent(ICDMEvent::kTableUpdated); + + // Check ICDManager is now in the LIT operating mode + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::LIT); + + // Simulate SIT Mode Request - device must switch to SIT mode even if there is a client registered + notifier.NotifySITModeRequestNotification(); + + // Check ICDManager is now in the SIT operating mode + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::SIT); + + // Advance time so active mode interval expires. + AdvanceClockAndRunEventLoop(ICDConfigurationData::GetInstance().GetActiveModeDuration() + 1_ms32); + + // Check ICDManager is still in the SIT operating mode + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::SIT); + + // Withdraw SIT mode + notifier.NotifySITModeRequestWithdrawal(); + + // Check ICDManager is now in the LIT operating mode + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::LIT); + + // Advance time so active mode interval expires. + AdvanceClockAndRunEventLoop(ICDConfigurationData::GetInstance().GetActiveModeDuration() + 1_ms32); + + // Check ICDManager is still in the LIT operating mode + EXPECT_EQ(ICDConfigurationData::GetInstance().GetICDMode(), ICDConfigurationData::ICDMode::LIT); +} +#endif // CHIP_CONFIG_ENABLE_ICD_DSLS + #if CHIP_CONFIG_ENABLE_ICD_CIP #if CHIP_CONFIG_PERSIST_SUBSCRIPTIONS #if CHIP_CONFIG_SUBSCRIPTION_TIMEOUT_RESUMPTION diff --git a/src/app/tests/suites/TestIcdManagementCluster.yaml b/src/app/tests/suites/TestIcdManagementCluster.yaml index 68e358385b8e21..b8ccab4bcf6538 100644 --- a/src/app/tests/suites/TestIcdManagementCluster.yaml +++ b/src/app/tests/suites/TestIcdManagementCluster.yaml @@ -115,7 +115,7 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0x07 + value: 0x0F - label: "Read IdleModeDuration" command: "readAttribute" From 89c8d331fd5a55aaec87655319502a2d3c308db7 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:15:05 +0300 Subject: [PATCH 35/42] [NXP] Move some components in common (#35594) * [nxp][platform][common] Rename S200 crypto PAL and move it to common Signed-off-by: marius-alex-tache * [nxp][examples][common] Make S200 Operational Keystore common Signed-off-by: marius-alex-tache * [nxp][platform][common] Make k32w1 BLEManager implementation common This can be reused by other platforms as long as they are using the same SDK. Signed-off-by: marius-alex-tache * [nxp][platform][common] Move OTA related files to a common folder OTAFirmwareProcessor and OTAHooks could be reused by other platforms as long as the SDK is the same, so moving them from k32w1 folder. Signed-off-by: marius-alex-tache * [nxp][platform][common] Move Factory Data provider into a common folder Some components were implemented for k32w1, but can be reused as long as the used SDK is the same. Moving them to factory_data/legacy until synchronizing with the other factory data implementation. Signed-off-by: marius-alex-tache * [nxp][platform][k32w0] Update files after moving some components Signed-off-by: marius-alex-tache * [nxp][mcxw71_k32w1] Update build system after moving some components Signed-off-by: marius-alex-tache * [nxp][examples][k32w0] Update build system after moving some components Signed-off-by: marius-alex-tache * [nxp][scripts][common] Update list of supported devices for multi-image OTA Signed-off-by: marius-alex-tache * [nxp] Bump nxp_matter_support Signed-off-by: marius-alex-tache * [nxp][mcxw71_k32w1][lock-app] Update build system after moving some components Signed-off-by: marius-alex-tache * [nxp][mcxw71_k32w1] Fix factory data compilation issue Signed-off-by: Doru Gucea * Restyled by gn * [nxp][ota] Fix spelling of platforms Signed-off-by: marius-alex-tache * Restyled by gn * [nxp][platform][k32w0] Move setting of k32w0_sdk_root k32w0_sdk_root set was moved to nxp_matter_support submodule Signed-off-by: Marius Tache --------- Signed-off-by: marius-alex-tache Signed-off-by: Doru Gucea Signed-off-by: Marius Tache Co-authored-by: Doru Gucea Co-authored-by: Restyled.io --- .../nxp/k32w0/main/AppTask.cpp | 2 +- .../contact-sensor-app/nxp/k32w1/BUILD.gn | 20 +++- .../contact-sensor-app/nxp/mcxw71/BUILD.gn | 20 +++- .../lighting-app/nxp/k32w0/main/AppTask.cpp | 2 +- examples/lighting-app/nxp/k32w1/BUILD.gn | 15 ++- examples/lighting-app/nxp/mcxw71/BUILD.gn | 20 +++- examples/lock-app/nxp/k32w1/BUILD.gn | 15 ++- examples/lock-app/nxp/mcxw71/BUILD.gn | 15 ++- .../source/OperationalKeystoreS200.cpp} | 4 +- scripts/tools/nxp/ota/README.md | 48 +++++----- .../{legacy => ble}/BLEManagerCommon.cpp | 2 +- .../common/{legacy => ble}/BLEManagerCommon.h | 2 +- .../ble}/BLEManagerImpl.cpp | 7 +- .../crypto/CHIPCryptoPalS200.cpp} | 2 +- .../PersistentStorageOpKeystoreS200.cpp} | 26 ++--- .../crypto/PersistentStorageOpKeystoreS200.h} | 10 +- .../legacy/FactoryDataDriver.cpp | 4 +- .../legacy/FactoryDataDriver.h | 0 .../legacy}/FactoryDataDriverImpl.cpp | 4 +- .../legacy}/FactoryDataDriverImpl.h | 4 +- .../legacy/FactoryDataProvider.cpp | 2 +- .../legacy/FactoryDataProvider.h | 2 +- .../legacy}/FactoryDataProviderImpl.cpp | 2 +- .../legacy}/FactoryDataProviderImpl.h | 2 +- src/platform/nxp/common/legacy/gatt_db.h | 30 ------ src/platform/nxp/common/legacy/gatt_uuid128.h | 26 ----- .../OTAFactoryDataProcessor.cpp | 2 +- .../{legacy => ota}/OTAFactoryDataProcessor.h | 6 +- .../ota}/OTAFirmwareProcessor.cpp | 4 +- .../ota}/OTAFirmwareProcessor.h | 2 +- .../{mcxw71_k32w1 => common/ota}/OTAHooks.cpp | 26 ++--- .../{legacy => ota}/OTAImageProcessorImpl.cpp | 2 +- .../{legacy => ota}/OTAImageProcessorImpl.h | 2 +- .../{legacy => ota}/OTATlvProcessor.cpp | 4 +- .../common/{legacy => ota}/OTATlvProcessor.h | 0 .../{legacy/OTA_README.md => ota/README.md} | 2 +- src/platform/nxp/k32w0/BLEManagerImpl.h | 2 +- src/platform/nxp/k32w0/BUILD.gn | 14 +-- .../nxp/k32w0/OTAFactoryDataProcessor.cpp | 2 +- .../nxp/k32w0/OTAFactoryDataProcessor.h | 2 +- .../nxp/k32w0/OTAFirmwareProcessor.cpp | 2 +- src/platform/nxp/k32w0/OTAFirmwareProcessor.h | 2 +- src/platform/nxp/k32w0/OTAHooks.cpp | 2 +- src/platform/nxp/k32w0/args.gni | 6 -- .../nxp/mcxw71_k32w1/BLEManagerImpl.h | 2 +- src/platform/nxp/mcxw71_k32w1/BUILD.gn | 56 ++++++----- .../nxp/mcxw71_k32w1/ble_function_mux.c | 94 ------------------- .../nxp/mcxw71_k32w1/ble_function_mux.h | 34 ------- src/platform/nxp/mcxw71_k32w1/gatt_db.h | 30 ------ src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h | 26 ----- third_party/nxp/nxp_matter_support | 2 +- 51 files changed, 215 insertions(+), 397 deletions(-) rename examples/platform/nxp/{mcxw71_k32w1/operational_keystore/OperationalKeystore.cpp => common/operational_keystore/source/OperationalKeystoreS200.cpp} (88%) rename src/platform/nxp/common/{legacy => ble}/BLEManagerCommon.cpp (99%) rename src/platform/nxp/common/{legacy => ble}/BLEManagerCommon.h (99%) rename src/platform/nxp/{mcxw71_k32w1 => common/ble}/BLEManagerImpl.cpp (92%) rename src/platform/nxp/{mcxw71_k32w1/CHIPCryptoPalK32W1.cpp => common/crypto/CHIPCryptoPalS200.cpp} (99%) rename src/platform/nxp/{mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp => common/crypto/PersistentStorageOpKeystoreS200.cpp} (89%) rename src/platform/nxp/{mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h => common/crypto/PersistentStorageOpKeystoreS200.h} (93%) rename src/platform/nxp/common/{ => factory_data}/legacy/FactoryDataDriver.cpp (94%) rename src/platform/nxp/common/{ => factory_data}/legacy/FactoryDataDriver.h (100%) rename src/platform/nxp/{mcxw71_k32w1 => common/factory_data/legacy}/FactoryDataDriverImpl.cpp (96%) rename src/platform/nxp/{mcxw71_k32w1 => common/factory_data/legacy}/FactoryDataDriverImpl.h (92%) rename src/platform/nxp/common/{ => factory_data}/legacy/FactoryDataProvider.cpp (99%) rename src/platform/nxp/common/{ => factory_data}/legacy/FactoryDataProvider.h (98%) rename src/platform/nxp/{mcxw71_k32w1 => common/factory_data/legacy}/FactoryDataProviderImpl.cpp (99%) rename src/platform/nxp/{mcxw71_k32w1 => common/factory_data/legacy}/FactoryDataProviderImpl.h (98%) delete mode 100644 src/platform/nxp/common/legacy/gatt_db.h delete mode 100644 src/platform/nxp/common/legacy/gatt_uuid128.h rename src/platform/nxp/common/{legacy => ota}/OTAFactoryDataProcessor.cpp (98%) rename src/platform/nxp/common/{legacy => ota}/OTAFactoryDataProcessor.h (92%) rename src/platform/nxp/{mcxw71_k32w1 => common/ota}/OTAFirmwareProcessor.cpp (96%) rename src/platform/nxp/{mcxw71_k32w1 => common/ota}/OTAFirmwareProcessor.h (96%) rename src/platform/nxp/{mcxw71_k32w1 => common/ota}/OTAHooks.cpp (85%) rename src/platform/nxp/common/{legacy => ota}/OTAImageProcessorImpl.cpp (99%) rename src/platform/nxp/common/{legacy => ota}/OTAImageProcessorImpl.h (98%) rename src/platform/nxp/common/{legacy => ota}/OTATlvProcessor.cpp (97%) rename src/platform/nxp/common/{legacy => ota}/OTATlvProcessor.h (100%) rename src/platform/nxp/common/{legacy/OTA_README.md => ota/README.md} (99%) delete mode 100644 src/platform/nxp/mcxw71_k32w1/ble_function_mux.c delete mode 100644 src/platform/nxp/mcxw71_k32w1/ble_function_mux.h delete mode 100644 src/platform/nxp/mcxw71_k32w1/gatt_db.h delete mode 100644 src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h diff --git a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp index d350a4527d281c..36cf190adf0b54 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #endif #include diff --git a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn index 0e24893bd06737..e887b2c5cc4f7f 100644 --- a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn @@ -39,6 +39,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -54,6 +56,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", @@ -69,6 +74,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -104,7 +110,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "CONFIG_NETWORK_LAYER_BLE=1", "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", "CONFIG_OPERATIONAL_KEYSTORE=1", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", ] if (chip_with_diag_logs_demo) { @@ -141,6 +147,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -149,19 +156,23 @@ mcxw71_k32w1_executable("contact_sensor_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", ] - include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + include_dirs += [ + "${common_example_dir}/ota_requestor/include", + "${chip_root}/src/platform/nxp/common/ota", + ] sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ] deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ] } @@ -183,7 +194,6 @@ mcxw71_k32w1_executable("contact_sensor_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { diff --git a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn index 02a0d7a78768dc..87b25125d1c47c 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn +++ b/examples/contact-sensor-app/nxp/mcxw71/BUILD.gn @@ -38,6 +38,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -53,6 +55,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/MCXW716C", @@ -68,6 +73,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -103,7 +109,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "CONFIG_NETWORK_LAYER_BLE=1", "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", "CONFIG_OPERATIONAL_KEYSTORE=1", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", ] if (chip_with_diag_logs_demo) { @@ -140,6 +146,7 @@ mcxw71_k32w1_executable("contact_sensor_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -148,19 +155,23 @@ mcxw71_k32w1_executable("contact_sensor_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", ] - include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + include_dirs += [ + "${common_example_dir}/ota_requestor/include", + "${chip_root}/src/platform/nxp/common/ota", + ] sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ] deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ] } @@ -182,7 +193,6 @@ mcxw71_k32w1_executable("contact_sensor_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { diff --git a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp index 7db25b0a7c0451..2418ab85978eb2 100644 --- a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #endif #include "DefaultTestEventTriggerDelegate.h" diff --git a/examples/lighting-app/nxp/k32w1/BUILD.gn b/examples/lighting-app/nxp/k32w1/BUILD.gn index 541c288dd1eb5c..8b5bd6b2cd77f2 100644 --- a/examples/lighting-app/nxp/k32w1/BUILD.gn +++ b/examples/lighting-app/nxp/k32w1/BUILD.gn @@ -44,6 +44,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -59,6 +61,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", @@ -74,6 +79,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -125,7 +131,7 @@ mcxw71_k32w1_executable("light_app") { "CONFIG_OPERATIONAL_KEYSTORE=1", "CONFIG_ENABLE_FEEDBACK=1", "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", ] # App common files @@ -148,12 +154,13 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", @@ -174,7 +181,6 @@ mcxw71_k32w1_executable("light_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { @@ -186,7 +192,8 @@ mcxw71_k32w1_executable("light_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } diff --git a/examples/lighting-app/nxp/mcxw71/BUILD.gn b/examples/lighting-app/nxp/mcxw71/BUILD.gn index 34733584a80cd9..b5d393dc6b9afc 100644 --- a/examples/lighting-app/nxp/mcxw71/BUILD.gn +++ b/examples/lighting-app/nxp/mcxw71/BUILD.gn @@ -44,6 +44,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -59,6 +61,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/MCXW716C", @@ -74,6 +79,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -125,7 +131,7 @@ mcxw71_k32w1_executable("light_app") { "CONFIG_OPERATIONAL_KEYSTORE=1", "CONFIG_ENABLE_FEEDBACK=1", "APP_QUEUE_TICKS_TO_WAIT=pdMS_TO_TICKS(10)", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", ] # App common files @@ -148,18 +154,22 @@ mcxw71_k32w1_executable("light_app") { "${common_example_dir}/clusters/source/ZclCallbacks.cpp", "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", ] - include_dirs += [ "${common_example_dir}/ota_requestor/include" ] + include_dirs += [ + "${common_example_dir}/ota_requestor/include", + "${chip_root}/src/platform/nxp/common/ota", + ] sources += [ "${common_example_dir}/ota_requestor/source/OTARequestorInitiatorMultiImage.cpp" ] deps += [ "${chip_root}/src/platform/nxp:nxp_ota" ] } @@ -174,7 +184,6 @@ mcxw71_k32w1_executable("light_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { @@ -186,7 +195,8 @@ mcxw71_k32w1_executable("light_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } diff --git a/examples/lock-app/nxp/k32w1/BUILD.gn b/examples/lock-app/nxp/k32w1/BUILD.gn index b8b6b7f67fa34c..42cff8a8b42c45 100644 --- a/examples/lock-app/nxp/k32w1/BUILD.gn +++ b/examples/lock-app/nxp/k32w1/BUILD.gn @@ -37,6 +37,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -52,6 +54,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", @@ -67,6 +72,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -102,7 +108,7 @@ mcxw71_k32w1_executable("lock_app") { "CONFIG_NETWORK_LAYER_BLE=1", "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", "CONFIG_OPERATIONAL_KEYSTORE=1", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", "CONFIG_APP_FREERTOS_OS=1", ] @@ -144,6 +150,7 @@ mcxw71_k32w1_executable("lock_app") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -152,7 +159,8 @@ mcxw71_k32w1_executable("lock_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } @@ -170,7 +178,7 @@ mcxw71_k32w1_executable("lock_app") { if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", @@ -198,7 +206,6 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { diff --git a/examples/lock-app/nxp/mcxw71/BUILD.gn b/examples/lock-app/nxp/mcxw71/BUILD.gn index effa43f226640b..febab870a524ca 100644 --- a/examples/lock-app/nxp/mcxw71/BUILD.gn +++ b/examples/lock-app/nxp/mcxw71/BUILD.gn @@ -37,6 +37,8 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" +support_common_platform_dir = + "${nxp_sdk_matter_support_root}/examples/platform/common" mcxw71_k32w1_sdk("sdk") { defines = [] @@ -52,6 +54,9 @@ mcxw71_k32w1_sdk("sdk") { # Indicate the default path to OpenThreadConfig.h include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] + # Indicate the default path to GATT database + include_dirs += [ "${support_common_platform_dir}/ble" ] + include_dirs += [ "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", @@ -67,6 +72,7 @@ mcxw71_k32w1_sdk("sdk") { "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${support_common_platform_dir}/ble/ble_function_mux.c", ] if (is_debug) { @@ -102,7 +108,7 @@ mcxw71_k32w1_executable("lock_app") { "CONFIG_NETWORK_LAYER_BLE=1", "CONFIG_THREAD_DEVICE_TYPE=kThreadDeviceType_SleepyEndDevice", "CONFIG_OPERATIONAL_KEYSTORE=1", - "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/legacy/FactoryDataProvider.h\"", + "EXTERNAL_FACTORY_DATA_PROVIDER_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProvider.h\"", "CONFIG_APP_FREERTOS_OS=1", ] @@ -144,6 +150,7 @@ mcxw71_k32w1_executable("lock_app") { "${common_example_dir}/device_callbacks/source/CommonDeviceCallbacks.cpp", "${common_example_dir}/device_manager/source/CHIPDeviceManager.cpp", "${common_example_dir}/icd/source/ICDUtil.cpp", + "${common_example_dir}/operational_keystore/source/OperationalKeystoreS200.cpp", "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", ] @@ -152,7 +159,8 @@ mcxw71_k32w1_executable("lock_app") { } if (chip_with_factory_data == 1) { - include_dirs += [ "${chip_root}/src/platform/nxp/common/legacy" ] + include_dirs += + [ "${chip_root}/src/platform/nxp/common/factory_data/legacy" ] deps += [ "${chip_root}/src/platform/nxp:nxp_factory_data" ] } @@ -170,7 +178,7 @@ mcxw71_k32w1_executable("lock_app") { if (chip_enable_ota_requestor) { defines += [ - "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/legacy/OTAImageProcessorImpl.h\"", + "CONFIG_CHIP_OTA_IMAGE_PROCESSOR_HEADER=\"platform/nxp/common/ota/OTAImageProcessorImpl.h\"", # The status LED and the external flash CS pin are wired together. The OTA image writing may fail if used together. "LED_MANAGER_ENABLE_STATUS_LED=0", @@ -198,7 +206,6 @@ mcxw71_k32w1_executable("lock_app") { sources += [ "${example_platform_dir}/button/ButtonManager.cpp", "${example_platform_dir}/clusters/Identify.cpp", - "${example_platform_dir}/operational_keystore/OperationalKeystore.cpp", ] if (chip_enable_ota_requestor) { diff --git a/examples/platform/nxp/mcxw71_k32w1/operational_keystore/OperationalKeystore.cpp b/examples/platform/nxp/common/operational_keystore/source/OperationalKeystoreS200.cpp similarity index 88% rename from examples/platform/nxp/mcxw71_k32w1/operational_keystore/OperationalKeystore.cpp rename to examples/platform/nxp/common/operational_keystore/source/OperationalKeystoreS200.cpp index ecd72266178984..04f89e4c814f43 100644 --- a/examples/platform/nxp/mcxw71_k32w1/operational_keystore/OperationalKeystore.cpp +++ b/examples/platform/nxp/common/operational_keystore/source/OperationalKeystoreS200.cpp @@ -16,9 +16,9 @@ */ #include "OperationalKeystore.h" -#include "K32W1PersistentStorageOpKeystore.h" +#include -static chip::K32W1PersistentStorageOpKeystore sInstance; +static chip::PersistentStorageOpKeystoreS200 sInstance; chip::Crypto::OperationalKeystore * chip::NXP::App::OperationalKeystore::GetInstance() { diff --git a/scripts/tools/nxp/ota/README.md b/scripts/tools/nxp/ota/README.md index 5c3a12adba7cf9..d2f8fd17a5d028 100644 --- a/scripts/tools/nxp/ota/README.md +++ b/scripts/tools/nxp/ota/README.md @@ -11,10 +11,14 @@ format. The payload contains data in standard TLV format (not Matter TLV format). During OTA transfer, these TLV can span across multiple BDX blocks, thus the `OTAImageProcessorImpl` instance should take this into account. +For details related to the OTA implementation, please see +[OTA README](../../../../src/platform/nxp/common/ota/README.md). + ## Supported platforms -- K32W0 - - [K32W OTA README](../../../../src/platform/nxp/common/legacy/OTA_README.md) +- `k32w0` +- `k32w1` +- `mcxw71` ## Usage @@ -31,30 +35,22 @@ reference commands. The list of **custom options**: -``` -# Application options ---app-input-file --> Path to the application binary. ---app-version --> Application version. It's part of the descriptor and - can be different than the OTA image header version: -vn. ---app-version-str --> Application version string. Same as above. ---app-build-date --> Application build date. Same as above. - -# SSBL options ---bl-input-file --> Path to the SSBL binary. ---bl-version --> SSBL version. ---bl-version-str --> SSBL version string. ---bl-build-date --> SSBL build date. - -# Factory data options ---factory-data --> If set, enables the generation of factory data. ---cert_declaration --> Certification Declaration. ---dac_cert --> DAC certificate. ---dac_key --> DAC private key. ---pai_cert --> PAI certificate. - -# Custom TLV options ---json --> Path to a JSON file following ota_payload.schema -``` +| option | description | +| -------------------- | -------------------------------------------------- | +| `--app-input-file` | Path to the application binary | +| `--app-version` | Application version. Can differ from `-vn` | +| `--app-version-str` | Application version string. Same as above | +| `--app-build-date` | Application build date. Same as above | +| `--bl-input-file` | Path to the SSBL binary | +| `--bl-version` | SSBL version | +| `--bl-version-str` | SSBL version string | +| `--bl-build-date` | SSBL build date | +| `--factory-data` | Enable the generation of factory data | +| `--cert_declaration` | Matter Certification Declaration | +| `--dac_cert` | Matter DAC certificate | +| `--dac_key` | Matter DAC private key | +| `--pai_cert` | Matter PAI certificate | +| `--json` | Path to a JSON file following `ota_payload.schema` | Please note that the options above are separated into four categories: application, bootloader, factory data and custom TLV (`--json` option). If no diff --git a/src/platform/nxp/common/legacy/BLEManagerCommon.cpp b/src/platform/nxp/common/ble/BLEManagerCommon.cpp similarity index 99% rename from src/platform/nxp/common/legacy/BLEManagerCommon.cpp rename to src/platform/nxp/common/ble/BLEManagerCommon.cpp index d9dbde88f3a614..02871e31f71058 100644 --- a/src/platform/nxp/common/legacy/BLEManagerCommon.cpp +++ b/src/platform/nxp/common/ble/BLEManagerCommon.cpp @@ -20,7 +20,7 @@ /** * @file * Provides an implementation of the BLEManager singleton object - * for the K32W platforms. + * for NXP platforms. */ /* this file behaves like a config.h, comes first */ diff --git a/src/platform/nxp/common/legacy/BLEManagerCommon.h b/src/platform/nxp/common/ble/BLEManagerCommon.h similarity index 99% rename from src/platform/nxp/common/legacy/BLEManagerCommon.h rename to src/platform/nxp/common/ble/BLEManagerCommon.h index b7fc1275d2501f..780ee194b8b28f 100644 --- a/src/platform/nxp/common/legacy/BLEManagerCommon.h +++ b/src/platform/nxp/common/ble/BLEManagerCommon.h @@ -20,7 +20,7 @@ /** * @file * Provides an implementation of the BLEManager singleton object - * for the K32W platforms. + * for NXP platforms. */ #pragma once diff --git a/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp b/src/platform/nxp/common/ble/BLEManagerImpl.cpp similarity index 92% rename from src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp rename to src/platform/nxp/common/ble/BLEManagerImpl.cpp index 1eefdf5ef16ffc..e8ac5e96a7da13 100644 --- a/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp +++ b/src/platform/nxp/common/ble/BLEManagerImpl.cpp @@ -28,7 +28,12 @@ messaging_t gHci2Host_TaskQueue; /*! Event for the Host Task Queue */ OSA_EVENT_HANDLE_DEFINE(gHost_TaskEvent); -#include +#ifdef EXTERNAL_BLEMANAGERIMPL_HEADER +#include EXTERNAL_BLEMANAGERIMPL_HEADER +#elif defined(CHIP_DEVICE_LAYER_TARGET) +#define BLEMANAGERIMPL_HEADER +#include BLEMANAGERIMPL_HEADER +#endif // defined(CHIP_DEVICE_LAYER_TARGET) extern "C" bleResult_t Hci_Reset(void); diff --git a/src/platform/nxp/mcxw71_k32w1/CHIPCryptoPalK32W1.cpp b/src/platform/nxp/common/crypto/CHIPCryptoPalS200.cpp similarity index 99% rename from src/platform/nxp/mcxw71_k32w1/CHIPCryptoPalK32W1.cpp rename to src/platform/nxp/common/crypto/CHIPCryptoPalS200.cpp index 9506d1bdfe1cc3..6e9342658c7ddd 100644 --- a/src/platform/nxp/mcxw71_k32w1/CHIPCryptoPalK32W1.cpp +++ b/src/platform/nxp/common/crypto/CHIPCryptoPalS200.cpp @@ -17,7 +17,7 @@ /** * @file - * mbedTLS based implementation of CHIP crypto primitives + * mbedTLS and S200 based implementation of CHIP crypto primitives */ #include diff --git a/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp b/src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.cpp similarity index 89% rename from src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp rename to src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.cpp index a3a4a480430979..09744d2ce51d15 100644 --- a/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp +++ b/src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.cpp @@ -29,7 +29,7 @@ #include #include -#include "K32W1PersistentStorageOpKeystore.h" +#include "PersistentStorageOpKeystoreS200.h" #include "sss_crypto.h" @@ -82,7 +82,7 @@ CHIP_ERROR P256KeypairSSS::ImportBlob(P256SerializedKeypairSSS & input) return CHIP_NO_ERROR; } -bool K32W1PersistentStorageOpKeystore::HasOpKeypairForFabric(FabricIndex fabricIndex) const +bool PersistentStorageOpKeystoreS200::HasOpKeypairForFabric(FabricIndex fabricIndex) const { VerifyOrReturnError(mStorage != nullptr, false); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), false); @@ -102,8 +102,8 @@ bool K32W1PersistentStorageOpKeystore::HasOpKeypairForFabric(FabricIndex fabricI return (err == CHIP_NO_ERROR && (keySize == SSS_KEY_PAIR_BLOB_SIZE)); } -CHIP_ERROR K32W1PersistentStorageOpKeystore::NewOpKeypairForFabric(FabricIndex fabricIndex, - MutableByteSpan & outCertificateSigningRequest) +CHIP_ERROR PersistentStorageOpKeystoreS200::NewOpKeypairForFabric(FabricIndex fabricIndex, + MutableByteSpan & outCertificateSigningRequest) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); @@ -135,8 +135,8 @@ CHIP_ERROR K32W1PersistentStorageOpKeystore::NewOpKeypairForFabric(FabricIndex f return CHIP_NO_ERROR; } -CHIP_ERROR K32W1PersistentStorageOpKeystore::ActivateOpKeypairForFabric(FabricIndex fabricIndex, - const Crypto::P256PublicKey & nocPublicKey) +CHIP_ERROR PersistentStorageOpKeystoreS200::ActivateOpKeypairForFabric(FabricIndex fabricIndex, + const Crypto::P256PublicKey & nocPublicKey) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mPendingKeypair != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); @@ -149,7 +149,7 @@ CHIP_ERROR K32W1PersistentStorageOpKeystore::ActivateOpKeypairForFabric(FabricIn return CHIP_NO_ERROR; } -CHIP_ERROR K32W1PersistentStorageOpKeystore::CommitOpKeypairForFabric(FabricIndex fabricIndex) +CHIP_ERROR PersistentStorageOpKeystoreS200::CommitOpKeypairForFabric(FabricIndex fabricIndex) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(mPendingKeypair != nullptr, CHIP_ERROR_INVALID_FABRIC_INDEX); @@ -168,7 +168,7 @@ CHIP_ERROR K32W1PersistentStorageOpKeystore::CommitOpKeypairForFabric(FabricInde return CHIP_NO_ERROR; } -CHIP_ERROR K32W1PersistentStorageOpKeystore::RemoveOpKeypairForFabric(FabricIndex fabricIndex) +CHIP_ERROR PersistentStorageOpKeystoreS200::RemoveOpKeypairForFabric(FabricIndex fabricIndex) { VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); VerifyOrReturnError(IsValidFabricIndex(fabricIndex), CHIP_ERROR_INVALID_FABRIC_INDEX); @@ -188,7 +188,7 @@ CHIP_ERROR K32W1PersistentStorageOpKeystore::RemoveOpKeypairForFabric(FabricInde return err; } -void K32W1PersistentStorageOpKeystore::RevertPendingKeypair() +void PersistentStorageOpKeystoreS200::RevertPendingKeypair() { VerifyOrReturn(mStorage != nullptr); @@ -196,8 +196,8 @@ void K32W1PersistentStorageOpKeystore::RevertPendingKeypair() ResetPendingKey(); } -CHIP_ERROR K32W1PersistentStorageOpKeystore::SignWithOpKeypair(FabricIndex fabricIndex, const ByteSpan & message, - Crypto::P256ECDSASignature & outSignature) const +CHIP_ERROR PersistentStorageOpKeystoreS200::SignWithOpKeypair(FabricIndex fabricIndex, const ByteSpan & message, + Crypto::P256ECDSASignature & outSignature) const { CHIP_ERROR error = CHIP_NO_ERROR; @@ -239,7 +239,7 @@ CHIP_ERROR K32W1PersistentStorageOpKeystore::SignWithOpKeypair(FabricIndex fabri return mCachedKeypair->ECDSA_sign_msg(message.data(), message.size(), outSignature); } -Crypto::P256Keypair * K32W1PersistentStorageOpKeystore::AllocateEphemeralKeypairForCASE() +Crypto::P256Keypair * PersistentStorageOpKeystoreS200::AllocateEphemeralKeypairForCASE() { // DO NOT CUT AND PASTE without considering the ReleaseEphemeralKeypair(). // If allocating a derived class, then `ReleaseEphemeralKeypair` MUST @@ -247,7 +247,7 @@ Crypto::P256Keypair * K32W1PersistentStorageOpKeystore::AllocateEphemeralKeypair return Platform::New(); } -void K32W1PersistentStorageOpKeystore::ReleaseEphemeralKeypair(Crypto::P256Keypair * keypair) +void PersistentStorageOpKeystoreS200::ReleaseEphemeralKeypair(Crypto::P256Keypair * keypair) { // DO NOT CUT AND PASTE without considering the AllocateEphemeralKeypairForCASE(). // This must delete the same concrete class as allocated in `AllocateEphemeralKeypairForCASE` diff --git a/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h b/src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.h similarity index 93% rename from src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h rename to src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.h index c0aeabccd2e724..12edb9d8412cc0 100644 --- a/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h +++ b/src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.h @@ -61,15 +61,15 @@ class P256KeypairSSS : public Crypto::P256Keypair * of how to use the interface. * */ -class K32W1PersistentStorageOpKeystore : public Crypto::OperationalKeystore +class PersistentStorageOpKeystoreS200 : public Crypto::OperationalKeystore { public: - K32W1PersistentStorageOpKeystore() = default; - virtual ~K32W1PersistentStorageOpKeystore() { Finish(); } + PersistentStorageOpKeystoreS200() = default; + virtual ~PersistentStorageOpKeystoreS200() { Finish(); } // Non-copyable - K32W1PersistentStorageOpKeystore(K32W1PersistentStorageOpKeystore const &) = delete; - void operator=(K32W1PersistentStorageOpKeystore const &) = delete; + PersistentStorageOpKeystoreS200(PersistentStorageOpKeystoreS200 const &) = delete; + void operator=(PersistentStorageOpKeystoreS200 const &) = delete; /** * @brief Initialize the Operational Keystore to map to a given storage delegate. diff --git a/src/platform/nxp/common/legacy/FactoryDataDriver.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriver.cpp similarity index 94% rename from src/platform/nxp/common/legacy/FactoryDataDriver.cpp rename to src/platform/nxp/common/factory_data/legacy/FactoryDataDriver.cpp index 6ddbedc3ca35c8..f54406cfa1cc58 100644 --- a/src/platform/nxp/common/legacy/FactoryDataDriver.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriver.cpp @@ -17,8 +17,8 @@ #include #include -#include -#include +#include +#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/nxp/common/legacy/FactoryDataDriver.h b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriver.h similarity index 100% rename from src/platform/nxp/common/legacy/FactoryDataDriver.h rename to src/platform/nxp/common/factory_data/legacy/FactoryDataDriver.h diff --git a/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp similarity index 96% rename from src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp rename to src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp index 473c4932ee1ba1..18ea65cdf18e26 100644 --- a/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.cpp @@ -16,8 +16,8 @@ */ #include -#include -#include +#include +#include using namespace chip::DeviceLayer::PersistedStorage; diff --git a/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.h b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.h similarity index 92% rename from src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.h rename to src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.h index 8b3e77358c6d47..43e91793767f69 100644 --- a/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.h +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataDriverImpl.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include extern "C" { #include "HWParameter.h" @@ -29,7 +29,7 @@ namespace chip { namespace DeviceLayer { /** - * This class implements the FactoryDataDriver with K32W1 specific functions + * This class implements the FactoryDataDriver */ class FactoryDataDriverImpl : public FactoryDataDriver diff --git a/src/platform/nxp/common/legacy/FactoryDataProvider.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp similarity index 99% rename from src/platform/nxp/common/legacy/FactoryDataProvider.cpp rename to src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp index 7ecc29a54cf077..38998ed3c5bde6 100644 --- a/src/platform/nxp/common/legacy/FactoryDataProvider.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include diff --git a/src/platform/nxp/common/legacy/FactoryDataProvider.h b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.h similarity index 98% rename from src/platform/nxp/common/legacy/FactoryDataProvider.h rename to src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.h index f7d05c3f1da1f4..f84336457f0ba9 100644 --- a/src/platform/nxp/common/legacy/FactoryDataProvider.h +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProvider.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include diff --git a/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp similarity index 99% rename from src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp rename to src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp index c55940e8838395..abb189685bdc7f 100644 --- a/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #include -#include +#include #include #include "fsl_adapter_flash.h" diff --git a/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.h similarity index 98% rename from src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h rename to src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.h index d7f15bba4ed422..ef23e59a6d05e6 100644 --- a/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h +++ b/src/platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #if !CHIP_USE_PLAIN_DAC_KEY #include "sss_crypto.h" diff --git a/src/platform/nxp/common/legacy/gatt_db.h b/src/platform/nxp/common/legacy/gatt_db.h deleted file mode 100644 index 604fcfb61a7ba1..00000000000000 --- a/src/platform/nxp/common/legacy/gatt_db.h +++ /dev/null @@ -1,30 +0,0 @@ -PRIMARY_SERVICE(service_gatt, gBleSig_GenericAttributeProfile_d) -CHARACTERISTIC(char_service_changed, gBleSig_GattServiceChanged_d, (gGattCharPropRead_c | gGattCharPropNotify_c)) -VALUE(value_service_changed, gBleSig_GattServiceChanged_d, (gPermissionNone_c), 4, 0x00, 0x00, 0x00, 0x00) -CCCD(cccd_service_changed) - -PRIMARY_SERVICE(service_gap, gBleSig_GenericAccessProfile_d) -CHARACTERISTIC(char_device_name, gBleSig_GapDeviceName_d, (gGattCharPropRead_c)) -VALUE(value_device_name, gBleSig_GapDeviceName_d, (gPermissionFlagReadable_c), 16, "NXP_ELOCK_DEMO") -CHARACTERISTIC(char_appearance, gBleSig_GapAppearance_d, (gGattCharPropRead_c)) -VALUE(value_appearance, gBleSig_GapAppearance_d, (gPermissionFlagReadable_c), 2, 0x00, 0x00) - -PRIMARY_SERVICE(service_chipoble, gChipoBleService_d) -CHARACTERISTIC_UUID128(chipoble_rx, uuid_chipoble_rx, (gGattCharPropWrite_c)) -VALUE_UUID128_VARLEN(value_chipoble_rx, uuid_chipoble_rx, (gPermissionFlagWritable_c), gAttMaxMtu_c - 3, gAttMaxMtu_c - 3, 0x00) -CHARACTERISTIC_UUID128(chipoble_tx, uuid_chipoble_tx, (gGattCharPropIndicate_c | gGattCharPropRead_c)) -VALUE_UUID128_VARLEN(value_chipoble_tx, uuid_chipoble_tx, (gPermissionFlagReadable_c), gAttMaxMtu_c - 3, gAttMaxMtu_c - 3, 0x00) -CCCD(cccd_chipoble_tx) -CHARACTERISTIC_UUID128(chipoble_c3, uuid_chipoble_c3, (gGattCharPropRead_c)) -VALUE_UUID128_VARLEN(value_chipoble_c3, uuid_chipoble_c3, (gPermissionFlagReadable_c), gAttMaxReadDataSize_d(gAttMaxValueLength_c), - gAttMaxReadDataSize_d(gAttMaxValueLength_c), 0x00) - -PRIMARY_SERVICE(service_device_info, gBleSig_DeviceInformationService_d) -CHARACTERISTIC(char_model_no, gBleSig_ModelNumberString_d, (gGattCharPropRead_c)) -VALUE(value_model_no, gBleSig_ModelNumberString_d, (gPermissionFlagReadable_c), 15, "Chip ELock Demo") -CHARACTERISTIC(char_serial_no, gBleSig_SerialNumberString_d, (gGattCharPropRead_c)) -VALUE(value_serial_no, gBleSig_SerialNumberString_d, (gPermissionFlagReadable_c), 7, "BLESN01") -CHARACTERISTIC(char_fw_rev, gBleSig_FirmwareRevisionString_d, (gGattCharPropRead_c)) -VALUE(value_fw_rev, gBleSig_FirmwareRevisionString_d, (gPermissionFlagReadable_c), 5, "1.1.1") -CHARACTERISTIC(char_sw_rev, gBleSig_SoftwareRevisionString_d, (gGattCharPropRead_c)) -VALUE(value_sw_rev, gBleSig_SoftwareRevisionString_d, (gPermissionFlagReadable_c), 5, "1.1.4") diff --git a/src/platform/nxp/common/legacy/gatt_uuid128.h b/src/platform/nxp/common/legacy/gatt_uuid128.h deleted file mode 100644 index 938968b1943ce2..00000000000000 --- a/src/platform/nxp/common/legacy/gatt_uuid128.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Declare all custom 128-bit UUIDs here using the format: -* -* UUID128(name, bytes) -* -* where: -* -name : an unique tag for the newly defined UUID; - will be used to reference this UUID when defining - services and characteristics in <> -* -bytes: 16 bytes representing the 128-bit value -* -* One definition per line. No semicolon required after each definition. -* -* example: -* UUID128(uuid_service_robot_characteristics, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, -0xCD, 0xEF) -* UUID128(uuid_char_robot_direction, 0x12, 0x34, 0x50, 0x00, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, -0xEF) -*/ -/* Services */ - -#define gChipoBleService_d 0xFFF6 - -UUID128(uuid_chipoble_tx, 0x12, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18) -UUID128(uuid_chipoble_rx, 0x11, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18) -UUID128(uuid_chipoble_c3, 0x04, 0x8f, 0x21, 0x83, 0x8a, 0x74, 0x7d, 0xb8, 0xf2, 0x45, 0x72, 0x87, 0x38, 0x02, 0x63, 0x64) diff --git a/src/platform/nxp/common/legacy/OTAFactoryDataProcessor.cpp b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.cpp similarity index 98% rename from src/platform/nxp/common/legacy/OTAFactoryDataProcessor.cpp rename to src/platform/nxp/common/ota/OTAFactoryDataProcessor.cpp index 4960ca2c4e0669..421f0203621add 100644 --- a/src/platform/nxp/common/legacy/OTAFactoryDataProcessor.cpp +++ b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include namespace chip { diff --git a/src/platform/nxp/common/legacy/OTAFactoryDataProcessor.h b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h similarity index 92% rename from src/platform/nxp/common/legacy/OTAFactoryDataProcessor.h rename to src/platform/nxp/common/ota/OTAFactoryDataProcessor.h index 862aad2d9a6341..570a33ceed5924 100644 --- a/src/platform/nxp/common/legacy/OTAFactoryDataProcessor.h +++ b/src/platform/nxp/common/ota/OTAFactoryDataProcessor.h @@ -21,9 +21,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER namespace chip { diff --git a/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp b/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp similarity index 96% rename from src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp rename to src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp index 2ea4d47cc655a1..15aa5f271c3ccc 100644 --- a/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp +++ b/src/platform/nxp/common/ota/OTAFirmwareProcessor.cpp @@ -17,8 +17,8 @@ */ #include -#include -#include +#include +#include #include "OtaSupport.h" diff --git a/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.h b/src/platform/nxp/common/ota/OTAFirmwareProcessor.h similarity index 96% rename from src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.h rename to src/platform/nxp/common/ota/OTAFirmwareProcessor.h index b8bb3abd008e7a..1d17e352a4bbf5 100644 --- a/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.h +++ b/src/platform/nxp/common/ota/OTAFirmwareProcessor.h @@ -20,7 +20,7 @@ #include "OtaPrivate.h" #include -#include +#include /* Posted Operations Size Info */ #define NB_PENDING_TRANSACTIONS 12 diff --git a/src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp b/src/platform/nxp/common/ota/OTAHooks.cpp similarity index 85% rename from src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp rename to src/platform/nxp/common/ota/OTAHooks.cpp index c476e705fd67be..032fe3d2ff9c4b 100644 --- a/src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp +++ b/src/platform/nxp/common/ota/OTAHooks.cpp @@ -16,25 +16,25 @@ * limitations under the License. */ -#include +#include #include #include -#include +#include #if CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR -#include -#include +#include +#include #endif // CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR #include "OtaSupport.h" -#ifndef CONFIG_CHIP_K32W1_MAX_ENTRIES_TEST -#define CONFIG_CHIP_K32W1_MAX_ENTRIES_TEST 0 +#ifndef CONFIG_CHIP_MAX_ENTRIES_TEST +#define CONFIG_CHIP_MAX_ENTRIES_TEST 0 #endif -#ifndef CONFIG_CHIP_K32W1_OTA_ABORT_HOOK -#define CONFIG_CHIP_K32W1_OTA_ABORT_HOOK 0 +#ifndef CONFIG_CHIP_OTA_ABORT_HOOK +#define CONFIG_CHIP_OTA_ABORT_HOOK 0 #endif #define APPLICATION_PROCESSOR_TAG 1 @@ -61,7 +61,7 @@ CHIP_ERROR ProcessDescriptor(void * descriptor) extern "C" WEAK CHIP_ERROR OtaHookInit() { -#if CONFIG_CHIP_K32W1_MAX_ENTRIES_TEST +#if CONFIG_CHIP_MAX_ENTRIES_TEST static chip::OTAFirmwareProcessor processors[8]; #endif @@ -77,13 +77,13 @@ extern "C" WEAK CHIP_ERROR OtaHookInit() ReturnErrorOnFailure(imageProcessor.RegisterProcessor(FACTORY_DATA_PROCESSOR_TAG, &sFactoryDataProcessor)); #endif // CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR -#if CONFIG_CHIP_K32W1_MAX_ENTRIES_TEST +#if CONFIG_CHIP_MAX_ENTRIES_TEST for (auto i = 0; i < 8; i++) { processors[i].RegisterDescriptorCallback(ProcessDescriptor); ReturnErrorOnFailure(imageProcessor.RegisterProcessor(i + 4, &processors[i])); } -#endif // CONFIG_CHIP_K32W1_MAX_ENTRIES_TEST +#endif // CONFIG_CHIP_MAX_ENTRIES_TEST return CHIP_NO_ERROR; } @@ -106,10 +106,10 @@ extern "C" WEAK void OtaHookAbort() Disclaimer: This is not default behavior and it was not checked against Matter specification compliance. You should use this at your own discretion. - Use CONFIG_CHIP_K32W1_OTA_ABORT_HOOK to enable/disable this feature (disabled by default). + Use CONFIG_CHIP_OTA_ABORT_HOOK to enable/disable this feature (disabled by default). This hook is called inside OTAImageProcessorImpl::HandleAbort to schedule a retry (when enabled). */ -#if CONFIG_CHIP_K32W1_OTA_ABORT_HOOK +#if CONFIG_CHIP_OTA_ABORT_HOOK auto & imageProcessor = chip::OTAImageProcessorImpl::GetDefaultInstance(); auto & providerLocation = imageProcessor.GetBackupProvider(); diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp b/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp similarity index 99% rename from src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp rename to src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp index c26a7da59b9483..f6f42367329e54 100644 --- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/common/ota/OTAImageProcessorImpl.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include using namespace chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; diff --git a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h b/src/platform/nxp/common/ota/OTAImageProcessorImpl.h similarity index 98% rename from src/platform/nxp/common/legacy/OTAImageProcessorImpl.h rename to src/platform/nxp/common/ota/OTAImageProcessorImpl.h index 9a862a716b957f..3419cbd6e2a9f1 100644 --- a/src/platform/nxp/common/legacy/OTAImageProcessorImpl.h +++ b/src/platform/nxp/common/ota/OTAImageProcessorImpl.h @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/platform/nxp/common/legacy/OTATlvProcessor.cpp b/src/platform/nxp/common/ota/OTATlvProcessor.cpp similarity index 97% rename from src/platform/nxp/common/legacy/OTATlvProcessor.cpp rename to src/platform/nxp/common/ota/OTATlvProcessor.cpp index e50da13cecdd31..66a080135b42db 100644 --- a/src/platform/nxp/common/legacy/OTATlvProcessor.cpp +++ b/src/platform/nxp/common/ota/OTATlvProcessor.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #if OTA_ENCRYPTION_ENABLE #include "OtaUtils.h" #include "rom_aes.h" diff --git a/src/platform/nxp/common/legacy/OTATlvProcessor.h b/src/platform/nxp/common/ota/OTATlvProcessor.h similarity index 100% rename from src/platform/nxp/common/legacy/OTATlvProcessor.h rename to src/platform/nxp/common/ota/OTATlvProcessor.h diff --git a/src/platform/nxp/common/legacy/OTA_README.md b/src/platform/nxp/common/ota/README.md similarity index 99% rename from src/platform/nxp/common/legacy/OTA_README.md rename to src/platform/nxp/common/ota/README.md index 0c9715b4610ff8..e288e6ab412c18 100644 --- a/src/platform/nxp/common/legacy/OTA_README.md +++ b/src/platform/nxp/common/ota/README.md @@ -1,4 +1,4 @@ -# K32W OTA +# Multi-image OTA The OTA processing is now delegated to instances of `OTATlvProcessor` derived classes. These instances are registered with the `OTAImageProcessorImpl` diff --git a/src/platform/nxp/k32w0/BLEManagerImpl.h b/src/platform/nxp/k32w0/BLEManagerImpl.h index 686eb1e3f703ee..b1aaa524af57d5 100644 --- a/src/platform/nxp/k32w0/BLEManagerImpl.h +++ b/src/platform/nxp/k32w0/BLEManagerImpl.h @@ -25,7 +25,7 @@ #include "ble_host_task_config.h" #include "controller_interface.h" -#include +#include /* host task configuration */ #define HOST_TASK_PRIORITY (4U) diff --git a/src/platform/nxp/k32w0/BUILD.gn b/src/platform/nxp/k32w0/BUILD.gn index a1b40506d6cd6a..6693acc213e4a1 100644 --- a/src/platform/nxp/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w0/BUILD.gn @@ -34,8 +34,8 @@ static_library("nxp_platform") { defines = [] sources = [ "../../SingletonConfigurationManager.cpp", - "../common/legacy/BLEManagerCommon.cpp", - "../common/legacy/BLEManagerCommon.h", + "../common/ble/BLEManagerCommon.cpp", + "../common/ble/BLEManagerCommon.h", "BLEManagerImpl.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", @@ -83,13 +83,13 @@ static_library("nxp_platform") { } if (chip_enable_ota_requestor) { - public += [ "../common/legacy/OTAImageProcessorImpl.h" ] + public += [ "../common/ota/OTAImageProcessorImpl.h" ] sources += [ - "../common/legacy/OTAImageProcessorImpl.cpp", - "../common/legacy/OTAImageProcessorImpl.h", - "../common/legacy/OTATlvProcessor.cpp", - "../common/legacy/OTATlvProcessor.h", + "../common/ota/OTAImageProcessorImpl.cpp", + "../common/ota/OTAImageProcessorImpl.h", + "../common/ota/OTATlvProcessor.cpp", + "../common/ota/OTATlvProcessor.h", ] if (chip_enable_ota_firmware_processor == 1) { diff --git a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp index b6777c7dc32820..9114906787a7b6 100644 --- a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp +++ b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.cpp @@ -18,8 +18,8 @@ #include #include -#include #include +#include #include #include diff --git a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.h b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.h index 3109e64a8d0ae3..57b973d73f0750 100644 --- a/src/platform/nxp/k32w0/OTAFactoryDataProcessor.h +++ b/src/platform/nxp/k32w0/OTAFactoryDataProcessor.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp b/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp index c7a1a2bbf435dd..3fcb2fd43bf1d9 100644 --- a/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp +++ b/src/platform/nxp/k32w0/OTAFirmwareProcessor.cpp @@ -17,7 +17,7 @@ */ #include -#include +#include #include #include diff --git a/src/platform/nxp/k32w0/OTAFirmwareProcessor.h b/src/platform/nxp/k32w0/OTAFirmwareProcessor.h index 444243f0c885d0..933a61538e068b 100644 --- a/src/platform/nxp/k32w0/OTAFirmwareProcessor.h +++ b/src/platform/nxp/k32w0/OTAFirmwareProcessor.h @@ -19,7 +19,7 @@ #pragma once #include -#include +#include namespace chip { diff --git a/src/platform/nxp/k32w0/OTAHooks.cpp b/src/platform/nxp/k32w0/OTAHooks.cpp index 30df88177ffdc6..659422de02a362 100644 --- a/src/platform/nxp/k32w0/OTAHooks.cpp +++ b/src/platform/nxp/k32w0/OTAHooks.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include +#include #include #include diff --git a/src/platform/nxp/k32w0/args.gni b/src/platform/nxp/k32w0/args.gni index 1076eea4f4cf7f..fda52672cf50e0 100644 --- a/src/platform/nxp/k32w0/args.gni +++ b/src/platform/nxp/k32w0/args.gni @@ -22,12 +22,6 @@ nxp_device_layer = "nxp/${nxp_platform}" nxp_use_lwip = false nxp_use_mbedtls_port = false -if (getenv("NXP_K32W0_SDK_ROOT") == "") { - k32w0_sdk_root = "${nxp_sdk_matter_support_root}/github_sdk/k32w0/repo" -} else { - k32w0_sdk_root = getenv("NXP_K32W0_SDK_ROOT") -} - # ARM architecture flags will be set based on NXP board. arm_platform_config = "${nxp_sdk_build_root}/${nxp_sdk_name}/nxp_arm.gni" diff --git a/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h index d2b38cdeda1619..1c51cd70b4e161 100644 --- a/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h +++ b/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h @@ -31,7 +31,7 @@ #include "controller_api.h" #include "controller_interface.h" -#include +#include /* host task configuration */ #define HOST_TASK_PRIORITY (4U) diff --git a/src/platform/nxp/mcxw71_k32w1/BUILD.gn b/src/platform/nxp/mcxw71_k32w1/BUILD.gn index 9e190474031296..253e21e4ef6a97 100644 --- a/src/platform/nxp/mcxw71_k32w1/BUILD.gn +++ b/src/platform/nxp/mcxw71_k32w1/BUILD.gn @@ -32,10 +32,10 @@ assert(chip_with_low_power == 0 || source_set("nxp_factory_data") { sources = [ - "../common/legacy/FactoryDataDriver.cpp", - "../common/legacy/FactoryDataProvider.cpp", - "FactoryDataDriverImpl.cpp", - "FactoryDataProviderImpl.cpp", + "../common/factory_data/legacy/FactoryDataDriver.cpp", + "../common/factory_data/legacy/FactoryDataDriverImpl.cpp", + "../common/factory_data/legacy/FactoryDataProvider.cpp", + "../common/factory_data/legacy/FactoryDataProviderImpl.cpp", ] public = [ @@ -43,7 +43,7 @@ source_set("nxp_factory_data") { "${chip_root}/src/credentials/CertificationDeclaration.h", ] - defines = [ "PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h\"" ] + defines = [ "PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/common/factory_data/legacy/FactoryDataProviderImpl.h\"" ] deps = [ ":nxp_platform", @@ -52,23 +52,23 @@ source_set("nxp_factory_data") { } source_set("nxp_ota") { - public = [ "../common/legacy/OTAImageProcessorImpl.h" ] + public = [ "../common/ota/OTAImageProcessorImpl.h" ] sources = [ - "../common/legacy/OTAImageProcessorImpl.cpp", - "../common/legacy/OTAImageProcessorImpl.h", - "../common/legacy/OTATlvProcessor.cpp", - "../common/legacy/OTATlvProcessor.h", - "OTAFirmwareProcessor.cpp", - "OTAFirmwareProcessor.h", - "OTAHooks.cpp", + "../common/ota/OTAFirmwareProcessor.cpp", + "../common/ota/OTAFirmwareProcessor.h", + "../common/ota/OTAHooks.cpp", + "../common/ota/OTAImageProcessorImpl.cpp", + "../common/ota/OTAImageProcessorImpl.h", + "../common/ota/OTATlvProcessor.cpp", + "../common/ota/OTATlvProcessor.h", ] if (chip_with_factory_data == 1 && chip_enable_ota_factory_data_processor == 1) { sources += [ - "../common/legacy/OTAFactoryDataProcessor.cpp", - "../common/legacy/OTAFactoryDataProcessor.h", + "../common/ota/OTAFactoryDataProcessor.cpp", + "../common/ota/OTAFactoryDataProcessor.h", ] } @@ -78,15 +78,25 @@ source_set("nxp_ota") { ] } +config("nxp_platform_config") { + include_dirs = [ + ".", + "../common/ble", + "../common/crypto", + "../common/factory_data/legacy", + "../common/ota", + ] +} + static_library("nxp_platform") { deps = [] defines = [ "CHIP_DEVICE_K32W1=1" ] sources = [ "../../SingletonConfigurationManager.cpp", - "../common/legacy/BLEManagerCommon.cpp", - "../common/legacy/BLEManagerCommon.h", - "BLEManagerImpl.cpp", + "../common/ble/BLEManagerCommon.cpp", + "../common/ble/BLEManagerCommon.h", + "../common/ble/BLEManagerImpl.cpp", "BLEManagerImpl.h", "CHIPDevicePlatformConfig.h", "CHIPDevicePlatformEvent.h", @@ -99,7 +109,6 @@ static_library("nxp_platform") { "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "SystemTimeSupport.cpp", - "ble_function_mux.c", ] if (chip_key_storage == "fwk_nvm") { @@ -151,6 +160,7 @@ static_library("nxp_platform") { "${chip_root}/src/credentials/examples/DeviceAttestationCredsExample.h", "${chip_root}/src/credentials/examples/ExampleDACs.h", "${chip_root}/src/credentials/examples/ExamplePAI.h", + "${chip_root}/src/platform/nxp/common/crypto/PersistentStorageOpKeystoreS200.h", "${chip_root}/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h", "${chip_root}/src/platform/nxp/mcxw71_k32w1/SMU2Manager.h", ] @@ -163,9 +173,9 @@ static_library("nxp_platform") { if (chip_crypto == "platform") { sources += [ - "CHIPCryptoPalK32W1.cpp", - "K32W1PersistentStorageOpKeystore.cpp", - "K32W1PersistentStorageOpKeystore.h", + "../common/crypto/CHIPCryptoPalS200.cpp", + "../common/crypto/PersistentStorageOpKeystoreS200.cpp", + "../common/crypto/PersistentStorageOpKeystoreS200.h", ] if (chip_with_ot_cli == 1) { @@ -208,4 +218,6 @@ static_library("nxp_platform") { "${chip_root}/src/platform:syscalls_stub", "${chip_root}/src/platform/logging:headers", ] + + public_configs = [ ":nxp_platform_config" ] } diff --git a/src/platform/nxp/mcxw71_k32w1/ble_function_mux.c b/src/platform/nxp/mcxw71_k32w1/ble_function_mux.c deleted file mode 100644 index ed3a643b8bdb9b..00000000000000 --- a/src/platform/nxp/mcxw71_k32w1/ble_function_mux.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2020 Nest Labs, Inc. - * All rights reserved. - * - * 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. - */ - -/** - * @file - * Provides an implementation for BLE Host NVM functions - */ -#include "assert.h" -#include "ble_constants.h" -#include "fsl_os_abstraction.h" -#include "gap_interface.h" -#include "gatt_database.h" - -#include "ble_constants.h" -#include "gatt_db_dynamic.h" - -#include "ble_function_mux.h" - -/* Security Manager */ -#define smpEdiv 0x1F99 -#define mcEncryptionKeySize_c 16 - -/* LTK */ -static uint8_t smpLtk[gcSmpMaxLtkSize_c] = { 0xD6, 0x93, 0xE8, 0xA4, 0x23, 0x55, 0x48, 0x99, - 0x1D, 0x77, 0x61, 0xE6, 0x63, 0x2B, 0x10, 0x8E }; - -/* RAND*/ -static uint8_t smpRand[gcSmpMaxRandSize_c] = { 0x26, 0x1E, 0xF6, 0x09, 0x97, 0x2E, 0xAD, 0x7E }; - -/* IRK */ -static uint8_t smpIrk[gcSmpIrkSize_c] = { 0x0A, 0x2D, 0xF4, 0x65, 0xE3, 0xBD, 0x7B, 0x49, - 0x1E, 0xB4, 0xC0, 0x95, 0x95, 0x13, 0x46, 0x73 }; - -/* CSRK */ -static uint8_t smpCsrk[gcSmpCsrkSize_c] = { 0x90, 0xD5, 0x06, 0x95, 0x92, 0xED, 0x91, 0xD7, - 0xA8, 0x9E, 0x2C, 0xDC, 0x4A, 0x93, 0x5B, 0xF9 }; - -gapSmpKeys_t gSmpKeys = { - .cLtkSize = mcEncryptionKeySize_c, - .aLtk = (void *) smpLtk, - .aIrk = (void *) smpIrk, - .aCsrk = (void *) smpCsrk, - .aRand = (void *) smpRand, - .cRandSize = gcSmpMaxRandSize_c, - .ediv = smpEdiv, -}; - -/******************************************************************************* - * Functions needed by the BLE stack - ******************************************************************************/ -void App_NvmRead(uint8_t mEntryIdx, void * pBondHeader, void * pBondDataDynamic, void * pBondDataStatic, void * pBondDataDeviceInfo, - void * pBondDataDescriptor, uint8_t mDescriptorIndex) -{ - NOT_USED(mEntryIdx); - NOT_USED(pBondHeader); - NOT_USED(pBondDataDynamic); - NOT_USED(pBondDataStatic); - NOT_USED(pBondDataDeviceInfo); - NOT_USED(pBondDataDescriptor); - NOT_USED(mDescriptorIndex); -} - -void App_NvmWrite(uint8_t mEntryIdx, void * pBondHeader, void * pBondDataDynamic, void * pBondDataStatic, - void * pBondDataDeviceInfo, void * pBondDataDescriptor, uint8_t mDescriptorIndex) -{ - NOT_USED(mEntryIdx); - NOT_USED(pBondHeader); - NOT_USED(pBondDataDynamic); - NOT_USED(pBondDataStatic); - NOT_USED(pBondDataDeviceInfo); - NOT_USED(pBondDataDescriptor); - NOT_USED(mDescriptorIndex); -} - -void App_NvmErase(uint8_t mEntryIdx) -{ - NOT_USED(mEntryIdx); -} diff --git a/src/platform/nxp/mcxw71_k32w1/ble_function_mux.h b/src/platform/nxp/mcxw71_k32w1/ble_function_mux.h deleted file mode 100644 index 8b9417d8b54e13..00000000000000 --- a/src/platform/nxp/mcxw71_k32w1/ble_function_mux.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2020 Nest Labs, Inc. - * All rights reserved. - * - * 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. - */ - -/** - * @file - * Provides an implementation for BLE Host NVM functions - */ - -#ifndef BLE_FUNCTION_MUX_H -#define BLE_FUNCTION_MUX_H - -typedef enum -{ - kBleFuncMux_AppMode_None, - kBleFuncMux_AppMode_Ota -} ble_func_mux_app_mode_t; - -#endif diff --git a/src/platform/nxp/mcxw71_k32w1/gatt_db.h b/src/platform/nxp/mcxw71_k32w1/gatt_db.h deleted file mode 100644 index 604fcfb61a7ba1..00000000000000 --- a/src/platform/nxp/mcxw71_k32w1/gatt_db.h +++ /dev/null @@ -1,30 +0,0 @@ -PRIMARY_SERVICE(service_gatt, gBleSig_GenericAttributeProfile_d) -CHARACTERISTIC(char_service_changed, gBleSig_GattServiceChanged_d, (gGattCharPropRead_c | gGattCharPropNotify_c)) -VALUE(value_service_changed, gBleSig_GattServiceChanged_d, (gPermissionNone_c), 4, 0x00, 0x00, 0x00, 0x00) -CCCD(cccd_service_changed) - -PRIMARY_SERVICE(service_gap, gBleSig_GenericAccessProfile_d) -CHARACTERISTIC(char_device_name, gBleSig_GapDeviceName_d, (gGattCharPropRead_c)) -VALUE(value_device_name, gBleSig_GapDeviceName_d, (gPermissionFlagReadable_c), 16, "NXP_ELOCK_DEMO") -CHARACTERISTIC(char_appearance, gBleSig_GapAppearance_d, (gGattCharPropRead_c)) -VALUE(value_appearance, gBleSig_GapAppearance_d, (gPermissionFlagReadable_c), 2, 0x00, 0x00) - -PRIMARY_SERVICE(service_chipoble, gChipoBleService_d) -CHARACTERISTIC_UUID128(chipoble_rx, uuid_chipoble_rx, (gGattCharPropWrite_c)) -VALUE_UUID128_VARLEN(value_chipoble_rx, uuid_chipoble_rx, (gPermissionFlagWritable_c), gAttMaxMtu_c - 3, gAttMaxMtu_c - 3, 0x00) -CHARACTERISTIC_UUID128(chipoble_tx, uuid_chipoble_tx, (gGattCharPropIndicate_c | gGattCharPropRead_c)) -VALUE_UUID128_VARLEN(value_chipoble_tx, uuid_chipoble_tx, (gPermissionFlagReadable_c), gAttMaxMtu_c - 3, gAttMaxMtu_c - 3, 0x00) -CCCD(cccd_chipoble_tx) -CHARACTERISTIC_UUID128(chipoble_c3, uuid_chipoble_c3, (gGattCharPropRead_c)) -VALUE_UUID128_VARLEN(value_chipoble_c3, uuid_chipoble_c3, (gPermissionFlagReadable_c), gAttMaxReadDataSize_d(gAttMaxValueLength_c), - gAttMaxReadDataSize_d(gAttMaxValueLength_c), 0x00) - -PRIMARY_SERVICE(service_device_info, gBleSig_DeviceInformationService_d) -CHARACTERISTIC(char_model_no, gBleSig_ModelNumberString_d, (gGattCharPropRead_c)) -VALUE(value_model_no, gBleSig_ModelNumberString_d, (gPermissionFlagReadable_c), 15, "Chip ELock Demo") -CHARACTERISTIC(char_serial_no, gBleSig_SerialNumberString_d, (gGattCharPropRead_c)) -VALUE(value_serial_no, gBleSig_SerialNumberString_d, (gPermissionFlagReadable_c), 7, "BLESN01") -CHARACTERISTIC(char_fw_rev, gBleSig_FirmwareRevisionString_d, (gGattCharPropRead_c)) -VALUE(value_fw_rev, gBleSig_FirmwareRevisionString_d, (gPermissionFlagReadable_c), 5, "1.1.1") -CHARACTERISTIC(char_sw_rev, gBleSig_SoftwareRevisionString_d, (gGattCharPropRead_c)) -VALUE(value_sw_rev, gBleSig_SoftwareRevisionString_d, (gPermissionFlagReadable_c), 5, "1.1.4") diff --git a/src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h b/src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h deleted file mode 100644 index 938968b1943ce2..00000000000000 --- a/src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -* Declare all custom 128-bit UUIDs here using the format: -* -* UUID128(name, bytes) -* -* where: -* -name : an unique tag for the newly defined UUID; - will be used to reference this UUID when defining - services and characteristics in <> -* -bytes: 16 bytes representing the 128-bit value -* -* One definition per line. No semicolon required after each definition. -* -* example: -* UUID128(uuid_service_robot_characteristics, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, -0xCD, 0xEF) -* UUID128(uuid_char_robot_direction, 0x12, 0x34, 0x50, 0x00, 0x90, 0xAB, 0xCD, 0xEF, 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, -0xEF) -*/ -/* Services */ - -#define gChipoBleService_d 0xFFF6 - -UUID128(uuid_chipoble_tx, 0x12, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18) -UUID128(uuid_chipoble_rx, 0x11, 0x9D, 0x9F, 0x42, 0x9C, 0x4F, 0x9F, 0x95, 0x59, 0x45, 0x3D, 0x26, 0xF5, 0x2E, 0xEE, 0x18) -UUID128(uuid_chipoble_c3, 0x04, 0x8f, 0x21, 0x83, 0x8a, 0x74, 0x7d, 0xb8, 0xf2, 0x45, 0x72, 0x87, 0x38, 0x02, 0x63, 0x64) diff --git a/third_party/nxp/nxp_matter_support b/third_party/nxp/nxp_matter_support index f6329bb2280c8b..21d18627ad4671 160000 --- a/third_party/nxp/nxp_matter_support +++ b/third_party/nxp/nxp_matter_support @@ -1 +1 @@ -Subproject commit f6329bb2280c8bc3f50f6d39e79191499e67cffa +Subproject commit 21d18627ad46710dfb863080c1047cdbaf556d25 From 64f859b9854cd9139d3d790cfea05e313b69fab3 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Tue, 17 Sep 2024 06:36:06 -0700 Subject: [PATCH 36/42] [Fabric-Admin] Update the last used nodeId to avoid conflict (#35612) * Update the last used nodeId to avoid conflict * Fix lint error --- .../fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp | 2 ++ examples/fabric-admin/device_manager/DeviceManager.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp index 3c389c468f9485..85a3aada9f88ae 100644 --- a/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp +++ b/examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp @@ -62,6 +62,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E ChipLogProgress(NotSpecified, "Successfully paired bridge device: NodeId: " ChipLogFormatX64, ChipLogValueX64(mBridgeNodeId)); + DeviceMgr().UpdateLastUsedNodeId(mBridgeNodeId); DeviceMgr().SubscribeRemoteFabricBridge(); if (DeviceMgr().IsLocalBridgeReady()) @@ -180,6 +181,7 @@ void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, C if (err == CHIP_NO_ERROR) { DeviceMgr().SetLocalBridgeNodeId(mLocalBridgeNodeId); + DeviceMgr().UpdateLastUsedNodeId(mLocalBridgeNodeId); ChipLogProgress(NotSpecified, "Successfully paired local bridge device: NodeId: " ChipLogFormatX64, ChipLogValueX64(mLocalBridgeNodeId)); } diff --git a/examples/fabric-admin/device_manager/DeviceManager.cpp b/examples/fabric-admin/device_manager/DeviceManager.cpp index d8de362255dd81..ae8fa507ceaaa4 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.cpp +++ b/examples/fabric-admin/device_manager/DeviceManager.cpp @@ -47,6 +47,10 @@ void DeviceManager::Init() { // TODO: (#34113) Init mLastUsedNodeId from chip config file mLastUsedNodeId = 1; + mInitialized = true; + + ChipLogProgress(NotSpecified, "DeviceManager initialized: last used nodeId " ChipLogFormatX64, + ChipLogValueX64(mLastUsedNodeId)); } NodeId DeviceManager::GetNextAvailableNodeId() @@ -61,8 +65,8 @@ void DeviceManager::UpdateLastUsedNodeId(NodeId nodeId) { if (nodeId > mLastUsedNodeId) { - ChipLogProgress(NotSpecified, "Updating last used NodeId to " ChipLogFormatX64, ChipLogValueX64(nodeId)); mLastUsedNodeId = nodeId; + ChipLogProgress(NotSpecified, "Updating last used NodeId to " ChipLogFormatX64, ChipLogValueX64(mLastUsedNodeId)); } } From d292892f68cc17b45357802e7611c23ca7a07b2d Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 17 Sep 2024 15:51:16 +0200 Subject: [PATCH 37/42] [Python] Process attribute cache updates in Python thread (#35557) * [Python] Process attribute cache updates in Python thread Instead of processing the attribute update in the SDK thread, process them on request in the Python thread. This avoids acks being sent back too late to the device after the last DataReport if there are many attribute updates sent at once. Currently still the same data model and processing is done. There is certainly also room for optimization to make this more efficient. * Get updated attribute values Make sure to get the attribute values again after each command to get the updated attribute cache. * Reference ReadEvent/ReadAttribute APIs on dev controller object --- .../repl/Matter_Basic_Interactions.ipynb | 4 +- src/controller/python/chip/ChipDeviceCtrl.py | 132 ++++++++++-------- .../python/chip/clusters/Attribute.py | 72 +++++----- .../test/test_scripts/cluster_objects.py | 9 +- 4 files changed, 116 insertions(+), 101 deletions(-) diff --git a/docs/guides/repl/Matter_Basic_Interactions.ipynb b/docs/guides/repl/Matter_Basic_Interactions.ipynb index 41c1c788655612..bc021aec730fa9 100644 --- a/docs/guides/repl/Matter_Basic_Interactions.ipynb +++ b/docs/guides/repl/Matter_Basic_Interactions.ipynb @@ -3504,7 +3504,7 @@ "source": [ "#### Read Events:\n", "\n", - "A `ReadEvents` API exists that behaves similarly to the `ReadAttributes` API. It permits the same degrees of wildcard expression as its counterpart and follows the same format for expressing all wildcard permutations." + "A `ReadEvent` API exists that behaves similarly to the `ReadAttribute` API. It permits the same degrees of wildcard expression as its counterpart and follows the same format for expressing all wildcard permutations." ] }, { @@ -3609,7 +3609,7 @@ "source": [ "### Subscription Interaction\n", "\n", - "To subscribe to a Node, the same `ReadAttributes` API is used to trigger a subscription, with a valid `reportInterval` tuple passed in being used as a way to indicate the request to create a subscription." + "To subscribe to a Node, the same `ReadAttribute` API is used to trigger a subscription, with a valid `reportInterval` tuple passed in being used as a way to indicate the request to create a subscription." ] }, { diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index d76d415d746945..8c751f7f791dd0 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -1433,20 +1433,23 @@ def _parseEventPathTuple(self, pathTuple: typing.Union[ else: raise ValueError("Unsupported Attribute Path") - async def Read(self, nodeid: int, attributes: typing.Optional[typing.List[typing.Union[ - None, # Empty tuple, all wildcard - typing.Tuple[int], # Endpoint - # Wildcard endpoint, Cluster id present - typing.Tuple[typing.Type[ClusterObjects.Cluster]], - # Wildcard endpoint, Cluster + Attribute present - typing.Tuple[typing.Type[ClusterObjects.ClusterAttributeDescriptor]], - # Wildcard attribute id - typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], - # Concrete path - typing.Tuple[int, typing.Type[ClusterObjects.ClusterAttributeDescriptor]], - # Directly specified attribute path - ClusterAttribute.AttributePath - ]]] = None, + async def Read( + self, + nodeid: int, + attributes: typing.Optional[typing.List[typing.Union[ + None, # Empty tuple, all wildcard + typing.Tuple[int], # Endpoint + # Wildcard endpoint, Cluster id present + typing.Tuple[typing.Type[ClusterObjects.Cluster]], + # Wildcard endpoint, Cluster + Attribute present + typing.Tuple[typing.Type[ClusterObjects.ClusterAttributeDescriptor]], + # Wildcard attribute id + typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], + # Concrete path + typing.Tuple[int, typing.Type[ClusterObjects.ClusterAttributeDescriptor]], + # Directly specified attribute path + ClusterAttribute.AttributePath + ]]] = None, dataVersionFilters: typing.Optional[typing.List[typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int]]] = None, events: typing.Optional[typing.List[ typing.Union[ None, # Empty tuple, all wildcard @@ -1461,10 +1464,11 @@ async def Read(self, nodeid: int, attributes: typing.Optional[typing.List[typing # Concrete path typing.Tuple[int, typing.Type[ClusterObjects.ClusterEvent], int] ]]] = None, - eventNumberFilter: typing.Optional[int] = None, - returnClusterObject: bool = False, reportInterval: typing.Optional[typing.Tuple[int, int]] = None, - fabricFiltered: bool = True, keepSubscriptions: bool = False, autoResubscribe: bool = True, - payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD): + eventNumberFilter: typing.Optional[int] = None, + returnClusterObject: bool = False, reportInterval: typing.Optional[typing.Tuple[int, int]] = None, + fabricFiltered: bool = True, keepSubscriptions: bool = False, autoResubscribe: bool = True, + payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD + ): ''' Read a list of attributes and/or events from a target node @@ -1534,33 +1538,43 @@ async def Read(self, nodeid: int, attributes: typing.Optional[typing.List[typing eventPaths = [self._parseEventPathTuple( v) for v in events] if events else None - ClusterAttribute.Read(future=future, eventLoop=eventLoop, device=device.deviceProxy, devCtrl=self, + transaction = ClusterAttribute.AsyncReadTransaction(future, eventLoop, self, returnClusterObject) + ClusterAttribute.Read(transaction, device=device.deviceProxy, attributes=attributePaths, dataVersionFilters=clusterDataVersionFilters, events=eventPaths, - eventNumberFilter=eventNumberFilter, returnClusterObject=returnClusterObject, + eventNumberFilter=eventNumberFilter, subscriptionParameters=ClusterAttribute.SubscriptionParameters( reportInterval[0], reportInterval[1]) if reportInterval else None, fabricFiltered=fabricFiltered, keepSubscriptions=keepSubscriptions, autoResubscribe=autoResubscribe).raise_on_error() - return await future + await future - async def ReadAttribute(self, nodeid: int, attributes: typing.Optional[typing.List[typing.Union[ - None, # Empty tuple, all wildcard - typing.Tuple[int], # Endpoint - # Wildcard endpoint, Cluster id present - typing.Tuple[typing.Type[ClusterObjects.Cluster]], - # Wildcard endpoint, Cluster + Attribute present - typing.Tuple[typing.Type[ClusterObjects.ClusterAttributeDescriptor]], - # Wildcard attribute id - typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], - # Concrete path - typing.Tuple[int, typing.Type[ClusterObjects.ClusterAttributeDescriptor]], - # Directly specified attribute path - ClusterAttribute.AttributePath - ]]], dataVersionFilters: typing.Optional[typing.List[typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int]]] = None, - returnClusterObject: bool = False, - reportInterval: typing.Optional[typing.Tuple[int, int]] = None, - fabricFiltered: bool = True, keepSubscriptions: bool = False, autoResubscribe: bool = True, - payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD): + if result := transaction.GetSubscriptionHandler(): + return result + else: + return transaction.GetReadResponse() + + async def ReadAttribute( + self, + nodeid: int, + attributes: typing.Optional[typing.List[typing.Union[ + None, # Empty tuple, all wildcard + typing.Tuple[int], # Endpoint + # Wildcard endpoint, Cluster id present + typing.Tuple[typing.Type[ClusterObjects.Cluster]], + # Wildcard endpoint, Cluster + Attribute present + typing.Tuple[typing.Type[ClusterObjects.ClusterAttributeDescriptor]], + # Wildcard attribute id + typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], + # Concrete path + typing.Tuple[int, typing.Type[ClusterObjects.ClusterAttributeDescriptor]], + # Directly specified attribute path + ClusterAttribute.AttributePath + ]]], dataVersionFilters: typing.Optional[typing.List[typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int]]] = None, + returnClusterObject: bool = False, + reportInterval: typing.Optional[typing.Tuple[int, int]] = None, + fabricFiltered: bool = True, keepSubscriptions: bool = False, autoResubscribe: bool = True, + payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD + ): ''' Read a list of attributes from a target node, this is a wrapper of DeviceController.Read() @@ -1629,24 +1643,28 @@ async def ReadAttribute(self, nodeid: int, attributes: typing.Optional[typing.Li else: return res.attributes - async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[ - None, # Empty tuple, all wildcard - typing.Tuple[str, int], # all wildcard with urgency set - typing.Tuple[int, int], # Endpoint, - # Wildcard endpoint, Cluster id present - typing.Tuple[typing.Type[ClusterObjects.Cluster], int], - # Wildcard endpoint, Cluster + Event present - typing.Tuple[typing.Type[ClusterObjects.ClusterEvent], int], - # Wildcard event id - typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int], - # Concrete path - typing.Tuple[int, typing.Type[ClusterObjects.ClusterEvent], int] - ]], eventNumberFilter: typing.Optional[int] = None, - fabricFiltered: bool = True, - reportInterval: typing.Optional[typing.Tuple[int, int]] = None, - keepSubscriptions: bool = False, - autoResubscribe: bool = True, - payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD): + async def ReadEvent( + self, + nodeid: int, + events: typing.List[typing.Union[ + None, # Empty tuple, all wildcard + typing.Tuple[str, int], # all wildcard with urgency set + typing.Tuple[int, int], # Endpoint, + # Wildcard endpoint, Cluster id present + typing.Tuple[typing.Type[ClusterObjects.Cluster], int], + # Wildcard endpoint, Cluster + Event present + typing.Tuple[typing.Type[ClusterObjects.ClusterEvent], int], + # Wildcard event id + typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int], + # Concrete path + typing.Tuple[int, typing.Type[ClusterObjects.ClusterEvent], int] + ]], eventNumberFilter: typing.Optional[int] = None, + fabricFiltered: bool = True, + reportInterval: typing.Optional[typing.Tuple[int, int]] = None, + keepSubscriptions: bool = False, + autoResubscribe: bool = True, + payloadCapability: int = TransportPayloadCapability.MRP_PAYLOAD + ): ''' Read a list of events from a target node, this is a wrapper of DeviceController.Read() diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index 84124814238969..4d5bc1d17ae1cc 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -314,14 +314,17 @@ class AttributeCache: returnClusterObject: bool = False attributeTLVCache: Dict[int, Dict[int, Dict[int, bytes]]] = field( default_factory=lambda: {}) - attributeCache: Dict[int, List[Cluster]] = field( - default_factory=lambda: {}) versionList: Dict[int, Dict[int, Dict[int, int]]] = field( default_factory=lambda: {}) + _attributeCacheUpdateNeeded: set[AttributePath] = field( + default_factory=lambda: set()) + _attributeCache: Dict[int, List[Cluster]] = field( + default_factory=lambda: {}) + def UpdateTLV(self, path: AttributePath, dataVersion: int, data: Union[bytes, ValueDecodeFailure]): ''' Store data in TLV since that makes it easiest to eventually convert to either the - cluster or attribute view representations (see below in UpdateCachedData). + cluster or attribute view representations (see below in GetUpdatedAttributeCache()). ''' if (path.EndpointId not in self.attributeTLVCache): self.attributeTLVCache[path.EndpointId] = {} @@ -344,7 +347,10 @@ def UpdateTLV(self, path: AttributePath, dataVersion: int, data: Union[bytes, V clusterCache[path.AttributeId] = data - def UpdateCachedData(self, changedPathSet: set[AttributePath]): + # For this path the attribute cache still requires an update. + self._attributeCacheUpdateNeeded.add(path) + + def GetUpdatedAttributeCache(self) -> Dict[int, List[Cluster]]: ''' This converts the raw TLV data into a cluster object format. Two formats are available: @@ -381,12 +387,12 @@ def handle_attribute_view(endpointId, clusterId, attributeId, attributeType): except Exception as ex: return ValueDecodeFailure(value, ex) - for attributePath in changedPathSet: + for attributePath in self._attributeCacheUpdateNeeded: endpointId, clusterId, attributeId = attributePath.EndpointId, attributePath.ClusterId, attributePath.AttributeId - if endpointId not in self.attributeCache: - self.attributeCache[endpointId] = {} - endpointCache = self.attributeCache[endpointId] + if endpointId not in self._attributeCache: + self._attributeCache[endpointId] = {} + endpointCache = self._attributeCache[endpointId] if clusterId not in _ClusterIndex: # @@ -414,6 +420,8 @@ def handle_attribute_view(endpointId, clusterId, attributeId, attributeType): attributeType = _AttributeIndex[(clusterId, attributeId)][0] clusterCache[attributeType] = handle_attribute_view(endpointId, clusterId, attributeId, attributeType) + self._attributeCacheUpdateNeeded.clear() + return self._attributeCache class SubscriptionTransaction: @@ -434,12 +442,12 @@ def __init__(self, transaction: AsyncReadTransaction, subscriptionId, devCtrl): def GetAttributes(self): ''' Returns the attribute value cache tracking the latest state on the publisher. ''' - return self._readTransaction._cache.attributeCache + return self._readTransaction._cache.GetUpdatedAttributeCache() def GetAttribute(self, path: TypedAttributePath) -> Any: ''' Returns a specific attribute given a TypedAttributePath. ''' - data = self._readTransaction._cache.attributeCache + data = self._readTransaction._cache.GetUpdatedAttributeCache() if (self._readTransaction._cache.returnClusterObject): return eval(f'data[path.Path.EndpointId][path.ClusterType].{path.AttributeName}') @@ -650,6 +658,18 @@ def SetClientObjPointers(self, pReadClient, pReadCallback): def GetAllEventValues(self): return self._events + def GetReadResponse(self) -> AsyncReadTransaction.ReadResponse: + """Prepares and returns the ReadResponse object.""" + return self.ReadResponse( + attributes=self._cache.GetUpdatedAttributeCache(), + events=self._events, + tlvAttributes=self._cache.attributeTLVCache + ) + + def GetSubscriptionHandler(self) -> SubscriptionTransaction | None: + """Returns subscription transaction.""" + return self._subscription_handler + def handleAttributeData(self, path: AttributePath, dataVersion: int, status: int, data: bytes): try: imStatus = chip.interaction_model.Status(status) @@ -716,7 +736,7 @@ def _handleSubscriptionEstablished(self, subscriptionId): if not self._future.done(): self._subscription_handler = SubscriptionTransaction( self, subscriptionId, self._devCtrl) - self._future.set_result(self._subscription_handler) + self._future.set_result(self) else: self._subscription_handler._subscriptionId = subscriptionId if self._subscription_handler._onResubscriptionSucceededCb is not None: @@ -745,8 +765,6 @@ def _handleReportBegin(self): pass def _handleReportEnd(self): - self._cache.UpdateCachedData(self._changedPathSet) - if (self._subscription_handler is not None): for change in self._changedPathSet: try: @@ -772,8 +790,7 @@ def _handleDone(self): if self._resultError is not None: self._future.set_exception(self._resultError.to_exception()) else: - self._future.set_result(AsyncReadTransaction.ReadResponse( - attributes=self._cache.attributeCache, events=self._events, tlvAttributes=self._cache.attributeTLVCache)) + self._future.set_result(self) # # Decrement the ref on ourselves to match the increment that happened at allocation. @@ -1001,9 +1018,9 @@ def WriteGroupAttributes(groupId: int, devCtrl: c_void_p, attributes: List[Attri ) -def Read(future: Future, eventLoop, device, devCtrl, +def Read(transaction: AsyncReadTransaction, device, attributes: Optional[List[AttributePath]] = None, dataVersionFilters: Optional[List[DataVersionFilter]] = None, - events: Optional[List[EventPath]] = None, eventNumberFilter: Optional[int] = None, returnClusterObject: bool = True, + events: Optional[List[EventPath]] = None, eventNumberFilter: Optional[int] = None, subscriptionParameters: Optional[SubscriptionParameters] = None, fabricFiltered: bool = True, keepSubscriptions: bool = False, autoResubscribe: bool = True) -> PyChipError: if (not attributes) and dataVersionFilters: @@ -1011,8 +1028,6 @@ def Read(future: Future, eventLoop, device, devCtrl, "Must provide valid attribute list when data version filters is not null") handle = chip.native.GetLibraryHandle() - transaction = AsyncReadTransaction( - future, eventLoop, devCtrl, returnClusterObject) attributePathsForCffi = None if attributes is not None: @@ -1119,25 +1134,6 @@ def Read(future: Future, eventLoop, device, devCtrl, return res -def ReadAttributes(future: Future, eventLoop, device, devCtrl, - attributes: List[AttributePath], dataVersionFilters: Optional[List[DataVersionFilter]] = None, - returnClusterObject: bool = True, - subscriptionParameters: Optional[SubscriptionParameters] = None, fabricFiltered: bool = True) -> int: - return Read(future=future, eventLoop=eventLoop, device=device, - devCtrl=devCtrl, attributes=attributes, dataVersionFilters=dataVersionFilters, - events=None, returnClusterObject=returnClusterObject, - subscriptionParameters=subscriptionParameters, fabricFiltered=fabricFiltered) - - -def ReadEvents(future: Future, eventLoop, device, devCtrl, - events: List[EventPath], eventNumberFilter=None, returnClusterObject: bool = True, - subscriptionParameters: Optional[SubscriptionParameters] = None, fabricFiltered: bool = True) -> int: - return Read(future=future, eventLoop=eventLoop, device=device, devCtrl=devCtrl, attributes=None, - dataVersionFilters=None, events=events, eventNumberFilter=eventNumberFilter, - returnClusterObject=returnClusterObject, - subscriptionParameters=subscriptionParameters, fabricFiltered=fabricFiltered) - - def Init(): handle = chip.native.GetLibraryHandle() diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index 10c2ad2e268c30..e18d11905eb5d5 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -216,12 +216,12 @@ def subUpdate(path: TypedAttributePath, transaction: SubscriptionTransaction): sub.SetAttributeUpdateCallback(subUpdate) try: - data = sub.GetAttributes() req = Clusters.OnOff.Commands.On() await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) await asyncio.wait_for(event.wait(), timeout=11) + data = sub.GetAttributes() if (data[1][Clusters.OnOff][Clusters.OnOff.Attributes.OnOff] != 1): raise ValueError("Current On/Off state should be 1") @@ -232,6 +232,7 @@ def subUpdate(path: TypedAttributePath, transaction: SubscriptionTransaction): await asyncio.wait_for(event.wait(), timeout=11) + data = sub.GetAttributes() if (data[1][Clusters.OnOff][Clusters.OnOff.Attributes.OnOff] != 0): raise ValueError("Current On/Off state should be 0") @@ -254,13 +255,12 @@ def subUpdate(path: TypedAttributePath, transaction: SubscriptionTransaction): sub.SetAttributeUpdateCallback(subUpdate) try: - data = sub.GetAttributes() - req = Clusters.OnOff.Commands.On() await devCtrl.SendCommand(nodeid=NODE_ID, endpoint=1, payload=req) await asyncio.wait_for(event.wait(), timeout=11) + data = sub.GetAttributes() cluster: Clusters.OnOff = data[1][Clusters.OnOff] if (not cluster.onOff): raise ValueError("Current On/Off state should be True") @@ -272,6 +272,7 @@ def subUpdate(path: TypedAttributePath, transaction: SubscriptionTransaction): await asyncio.wait_for(event.wait(), timeout=11) + data = sub.GetAttributes() cluster: Clusters.OnOff = data[1][Clusters.OnOff] if (cluster.onOff): raise ValueError("Current On/Off state should be False") @@ -298,7 +299,6 @@ async def TestSubscribeZeroMinInterval(cls, devCtrl): logger.info("Test Subscription With MinInterval of 0") sub = await devCtrl.ReadAttribute(nodeid=NODE_ID, attributes=[Clusters.OnOff, Clusters.LevelControl], reportInterval=(0, 60)) - data = sub.GetAttributes() logger.info("Sending off command") @@ -315,6 +315,7 @@ async def TestSubscribeZeroMinInterval(cls, devCtrl): logger.info("Checking read back value is indeed 254") + data = sub.GetAttributes() if (data[1][Clusters.LevelControl][Clusters.LevelControl.Attributes.CurrentLevel] != 254): raise ValueError("Current Level should have been 254") From 32200d1ce5a3c2f2a64875b886ccfe529f71708d Mon Sep 17 00:00:00 2001 From: Tinna Liu <53031267+TinnaLiu@users.noreply.github.com> Date: Tue, 17 Sep 2024 06:53:18 -0700 Subject: [PATCH 38/42] Fix Parsing Response Data in Content App Command Delegate (#35605) * Fix Parsing Response Data in Content App Command Delegate Problem: FormatResponseData inside ContentAppCommandDelegate is missing the actual parsing of the reponse data. Solution: Add back the parsing logic that was accidentally removed in previous PR #34895 Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful. * Fix Parsing Response Data in Content App Command Delegate Problem: FormatResponseData inside ContentAppCommandDelegate is missing the actual parsing of the reponse data. Solution: Add back the parsing logic that was accidentally removed in previous PR #34895 Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful. --- examples/tv-app/android/java/ContentAppCommandDelegate.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp index caf2d665b8522e..c5c12212fea0fe 100644 --- a/examples/tv-app/android/java/ContentAppCommandDelegate.cpp +++ b/examples/tv-app/android/java/ContentAppCommandDelegate.cpp @@ -219,7 +219,12 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::HandlerContext & handlerContext, const char * response) { handlerContext.SetCommandHandled(); + Json::Reader reader; Json::Value value; + if (!reader.parse(response, value)) + { + return; + } // handle errors from platform-app if (!value[FAILURE_KEY].empty()) From 5a9e31466e68faa566afb87707a17e4ab4aa5487 Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:41:35 +0200 Subject: [PATCH 39/42] Fixing UBSan issues that showed up in all-clusters app (#35580) * Fix for unsigned integer overflow: Error Message: BufferWriter.cpp:76:16: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long') when size becomes 0 and we are in while (size-- > 0), then size will become less than 0, which should be avoided since it is an unsigned (although technically it wraps around, UBSAN complains about it). Fix: stop size from decrement past 0, by moving size-- inside the loop * Fix null pointer passed to non-null argument in CHIPMemString.h Error Message: CHIPMemString.h:88:22: runtime error: null pointer passed as argument 2, which is declared to never be null when PI= is in mDNS TXT record (its value is empty) , and Dnssd::Internal::GetPairingInstruction calls CopyString, source is an empty bytespan and source.data() will return a null pointer, that will be passed to memcpy Fix: avoid memcpy in that case. --- src/lib/support/BufferWriter.cpp | 6 ++++-- src/lib/support/CHIPMemString.h | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/lib/support/BufferWriter.cpp b/src/lib/support/BufferWriter.cpp index c606cba6e2b37d..2ba03e22d24e03 100644 --- a/src/lib/support/BufferWriter.cpp +++ b/src/lib/support/BufferWriter.cpp @@ -73,8 +73,9 @@ LittleEndian::BufferWriter & LittleEndian::BufferWriter::EndianPutSigned(int64_t BigEndian::BufferWriter & BigEndian::BufferWriter::EndianPut(uint64_t x, size_t size) { - while (size-- > 0) + while (size > 0) { + size--; Put(static_cast((x >> (size * 8)) & 0xff)); } return *this; @@ -82,8 +83,9 @@ BigEndian::BufferWriter & BigEndian::BufferWriter::EndianPut(uint64_t x, size_t BigEndian::BufferWriter & BigEndian::BufferWriter::EndianPutSigned(int64_t x, size_t size) { - while (size-- > 0) + while (size > 0) { + size--; Put(static_cast((x >> (size * 8)) & 0xff)); } return *this; diff --git a/src/lib/support/CHIPMemString.h b/src/lib/support/CHIPMemString.h index 51341192a76250..3b74acdbcaf195 100644 --- a/src/lib/support/CHIPMemString.h +++ b/src/lib/support/CHIPMemString.h @@ -82,12 +82,20 @@ inline void CopyString(char (&dest)[N], const char * source) */ inline void CopyString(char * dest, size_t destLength, ByteSpan source) { - if (dest && destLength) + if ((dest == nullptr) || (destLength == 0)) { - size_t maxChars = std::min(destLength - 1, source.size()); - memcpy(dest, source.data(), maxChars); - dest[maxChars] = '\0'; + return; // no space to copy anything, not even a null terminator } + + if (source.empty()) + { + *dest = '\0'; // just a null terminator, we are copying empty data + return; + } + + size_t maxChars = std::min(destLength - 1, source.size()); + memcpy(dest, source.data(), maxChars); + dest[maxChars] = '\0'; } /** From 5a7d6ed697d95df5a59498b5c6064661381d1f79 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 17 Sep 2024 11:46:37 -0400 Subject: [PATCH 40/42] Remove implementation bits for clusters that are being removed. (#35613) This was mostly done with a bunch of multiline regexp replaces (for all the attribute getters/setters/subscribes/command bits), and some hand-removal of code for the command payload structs. --- .../Framework/CHIP/MTRBackwardsCompatShims.mm | 6189 +++++------------ 1 file changed, 1616 insertions(+), 4573 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm index 81c535db6ddf75..693a0424a4cce3 100644 --- a/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm +++ b/src/darwin/Framework/CHIP/MTRBackwardsCompatShims.mm @@ -73,49 +73,32 @@ @implementation MTRBaseClusterOnOffSwitchConfiguration - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -124,232 +107,140 @@ - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completi } - (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } @end @@ -683,13 +574,9 @@ @implementation MTRBaseClusterBinaryInputBasic - (void)readAttributeActiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -698,63 +585,32 @@ - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value completion: } - (void)writeAttributeActiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActiveTextWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ActiveText::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -763,63 +619,32 @@ - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value completion } - (void)writeAttributeDescriptionWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Description::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInactiveTextWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -828,63 +653,32 @@ - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value completio } - (void)writeAttributeInactiveTextWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInactiveTextWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInactiveTextWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::InactiveText::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeOutOfServiceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -893,99 +687,55 @@ - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value completio } - (void)writeAttributeOutOfServiceWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeOutOfServiceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeOutOfServiceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::OutOfService::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePolarityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePolarityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePolarityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Polarity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePresentValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -994,63 +744,32 @@ - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value completio } - (void)writeAttributePresentValueWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePresentValueWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePresentValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::PresentValue::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReliabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -1059,304 +778,186 @@ - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value completion } - (void)writeAttributeReliabilityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReliabilityWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReliabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::Reliability::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeStatusFlagsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeStatusFlagsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeStatusFlagsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::StatusFlags::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeApplicationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeApplicationTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeApplicationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ApplicationType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BinaryInputBasic::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } @end @@ -2065,27 +1666,9 @@ @implementation MTRBaseClusterBarrierControl - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion { @@ -2093,146 +1676,85 @@ - (void)barrierControlStopWithCompletion:(MTRStatusCompletion)completion } - (void)barrierControlStopWithParams:(MTRBarrierControlClusterBarrierControlStopParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlStop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierMovingStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierMovingStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierMovingStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierMovingState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierSafetyStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierSafetyStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierSafetyStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierSafetyStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierCapabilitiesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierCapabilitiesWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierCapabilitiesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCapabilities::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2241,63 +1763,32 @@ - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value comp } - (void)writeAttributeBarrierOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierOpenEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2306,63 +1797,32 @@ - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value com } - (void)writeAttributeBarrierCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCloseEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierCommandOpenEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2371,63 +1831,32 @@ - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)val } - (void)writeAttributeBarrierCommandOpenEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierCommandOpenEventsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierCommandOpenEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCommandOpenEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierCommandCloseEventsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2436,63 +1865,32 @@ - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)va } - (void)writeAttributeBarrierCommandCloseEventsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierCommandCloseEventsWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierCommandCloseEventsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierCommandCloseEvents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierOpenPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2501,63 +1899,32 @@ - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value comp } - (void)writeAttributeBarrierOpenPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierOpenPeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierOpenPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierOpenPeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierClosePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -2566,268 +1933,163 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value com } - (void)writeAttributeBarrierClosePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierClosePeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierClosePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierClosePeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeBarrierPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeBarrierPositionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeBarrierPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::BarrierPosition::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BarrierControl::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } @end @@ -3435,29 +2697,9 @@ @implementation MTRClusterBarrierControl - (void)barrierControlGoToPercentWithParams:(MTRBarrierControlClusterBarrierControlGoToPercentParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlGoToPercent::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)barrierControlStopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -3466,29 +2708,9 @@ - (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRBarrierControlClusterBarrierControlStopParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = BarrierControl::Commands::BarrierControlStop::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (NSDictionary * _Nullable)readAttributeBarrierMovingStateWithParams:(MTRReadParams * _Nullable)params @@ -3704,27 +2926,7 @@ @implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (Interna - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + return CHIP_ERROR_NOT_IMPLEMENTED; } - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error @@ -3780,24 +2982,7 @@ @implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethod - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + return CHIP_ERROR_NOT_IMPLEMENTED; } - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error @@ -3831,2150 +3016,1356 @@ - (void)getProfileInfoCommandWithCompletion:(MTRStatusCompletion)completion } - (void)getProfileInfoCommandWithParams:(MTRElectricalMeasurementClusterGetProfileInfoCommandParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasurementType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcPowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcPowerMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcPowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcPowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcPowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcPowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcVoltageDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcCurrentDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeDcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeDcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeDcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::DcPowerDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequency::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcFrequencyMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcFrequencyMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcFrequencyMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcFrequencyMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcFrequencyMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcFrequencyMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeNeutralCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeNeutralCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeNeutralCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::NeutralCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeTotalActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeTotalActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeTotalActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalActivePower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeTotalReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeTotalReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeTotalReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalReactivePower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeTotalApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeTotalApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeTotalApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::TotalApparentPower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasured11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasured11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasured11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase1stHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase3rdHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase5thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase7thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase9thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeMeasuredPhase11thHarmonicCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcFrequencyMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcFrequencyMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcFrequencyMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcFrequencyDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcFrequencyDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcFrequencyDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcFrequencyDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePhaseHarmonicCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePhaseHarmonicCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInstantaneousVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInstantaneousVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInstantaneousVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInstantaneousLineCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInstantaneousLineCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInstantaneousLineCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousLineCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInstantaneousActiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInstantaneousActiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInstantaneousActiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInstantaneousReactiveCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInstantaneousReactiveCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInstantaneousReactiveCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeInstantaneousPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeInstantaneousPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeInstantaneousPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::InstantaneousPower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMinWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMin::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMaxWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMax::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReactivePowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReactivePowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReactivePowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeApparentPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeApparentPowerWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeApparentPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPower::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePowerFactorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePowerFactorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePowerFactorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -5983,63 +4374,32 @@ - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _N } - (void)writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsUnderVoltageCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6048,63 +4408,32 @@ - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnul } - (void)writeAttributeAverageRmsUnderVoltageCounterWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsUnderVoltageCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeOverVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6113,63 +4442,32 @@ - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull) } - (void)writeAttributeRmsExtremeOverVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeOverVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6178,63 +4476,32 @@ - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull } - (void)writeAttributeRmsExtremeUnderVoltagePeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeUnderVoltagePeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSagPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6243,63 +4510,32 @@ - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value co } - (void)writeAttributeRmsVoltageSagPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSagPeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSagPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSwellPeriodWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6308,279 +4544,170 @@ - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value } - (void)writeAttributeRmsVoltageSwellPeriodWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSwellPeriodWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSwellPeriodWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcVoltageMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcVoltageMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcVoltageMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcVoltageDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcVoltageDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcVoltageDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcCurrentMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcCurrentMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcCurrentMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcCurrentDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcCurrentDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcCurrentDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcPowerMultiplierWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcPowerMultiplierWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcPowerMultiplierWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerMultiplier::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcPowerDivisorWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcPowerDivisorWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcPowerDivisorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcPowerDivisor::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6589,135 +4716,78 @@ - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value com } - (void)writeAttributeOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::OverloadAlarmsMask::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::VoltageOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::CurrentOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcOverloadAlarmsMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion @@ -6726,2176 +4796,1382 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value c } - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcOverloadAlarmsMaskWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcOverloadAlarmsMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcVoltageOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcVoltageOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcVoltageOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcVoltageOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcCurrentOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcCurrentOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcCurrentOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcCurrentOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcActivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcActivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcActivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcActivePowerOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcReactivePowerOverloadWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcReactivePowerOverloadWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcReactivePowerOverloadWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcReactivePowerOverload::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeOverVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeOverVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeOverVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeUnderVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeUnderVoltageWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeUnderVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSagWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSagWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSagWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSag::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSwellWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSwellWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSwellWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwell::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeLineCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeLineCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeLineCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReactiveCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReactiveCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReactiveCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltagePhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltagePhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltagePhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMinPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMinPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMinPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMaxPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMaxPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMaxPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReactivePowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReactivePowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReactivePowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeApparentPowerPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeApparentPowerPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeApparentPowerPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePowerFactorPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePowerFactorPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePowerFactorPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSagPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSwellPeriodPhaseBWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeLineCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeLineCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeLineCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::LineCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReactiveCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReactiveCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReactiveCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltagePhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltagePhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltagePhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltagePhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsCurrentMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsCurrentMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsCurrentMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMinPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMinPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMinPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeActivePowerMaxPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeActivePowerMaxPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeActivePowerMaxPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeReactivePowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeReactivePowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeReactivePowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ReactivePowerPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeApparentPowerPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeApparentPowerPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeApparentPowerPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ApparentPowerPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributePowerFactorPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributePowerFactorPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributePowerFactorPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::PowerFactorPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + dispatch_async(self.callbackQueue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + dispatch_async(self.callbackQueue, ^{ + reportHandler(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ElectricalMeasurement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + dispatch_async(queue, ^{ + completion(nil, [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } @end @@ -13653,56 +10929,16 @@ - (void)getProfileInfoCommandWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetProfileInfoCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type; - [self.device _invokeKnownCommandWithEndpointID:self.endpointID - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + dispatch_async(self.callbackQueue, ^{ + completion([MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]); + }); } - (NSDictionary * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params @@ -14483,24 +11719,12 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG } @end -@interface MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct; - -@end - @interface MTRElectricalMeasurementClusterGetProfileInfoCommandParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct; - -@end - @interface MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -14546,80 +11770,14 @@ - (NSString *)description - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue error:(NSError * __autoreleasing *)error { - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]; } return nil; } @end -@implementation MTRElectricalMeasurementClusterGetProfileInfoResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType &)decodableStruct -{ - { - self.profileCount = [NSNumber numberWithUnsignedChar:decodableStruct.profileCount]; - } - { - self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; - } - { - self.maxNumberOfIntervals = [NSNumber numberWithUnsignedChar:decodableStruct.maxNumberOfIntervals]; - } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.listOfAttributes.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.listOfAttributes = array_0; - } - } - return CHIP_NO_ERROR; -} - -@end - @implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams - (instancetype)init { @@ -14652,24 +11810,7 @@ @implementation MTRElectricalMeasurementClusterGetProfileInfoCommandParams (Inte - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + return CHIP_ERROR_NOT_IMPLEMENTED; } - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error @@ -14738,86 +11879,14 @@ - (NSString *)description - (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue error:(NSError * __autoreleasing *)error { - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_NOT_IMPLEMENTED]; } return nil; } @end -@implementation MTRElectricalMeasurementClusterGetMeasurementProfileResponseCommandParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType &)decodableStruct -{ - { - self.startTime = [NSNumber numberWithUnsignedInt:decodableStruct.startTime]; - } - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.profileIntervalPeriod = [NSNumber numberWithUnsignedChar:decodableStruct.profileIntervalPeriod]; - } - { - self.numberOfIntervalsDelivered = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfIntervalsDelivered]; - } - { - self.attributeId = [NSNumber numberWithUnsignedShort:decodableStruct.attributeId]; - } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.intervals.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.intervals = array_0; - } - } - return CHIP_NO_ERROR; -} - -@end - @implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams - (instancetype)init { @@ -14859,33 +11928,7 @@ @implementation MTRElectricalMeasurementClusterGetMeasurementProfileCommandParam - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.attributeId = self.attributeId.unsignedShortValue; - } - { - encodableStruct.startTime = self.startTime.unsignedIntValue; - } - { - encodableStruct.numberOfIntervals = self.numberOfIntervals.unsignedCharValue; - } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); + return CHIP_ERROR_NOT_IMPLEMENTED; } - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error From c06a0bed825934a4b1e72b8bd15cf931904b3206 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Tue, 17 Sep 2024 11:53:13 -0400 Subject: [PATCH 41/42] Add a new build directory to .gitignore (#35604) * Add a new build directory to ,gitignore - `src/python_testing/matter_testing_infrastructure/build/` is recent and the result of bootstrap. It should not appear to dirty the tree. * Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 98dc6780fccc2a..b2dc9a60de778f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ out/ /examples/virtual-device-app/android/App/buildSrc/build/ /src/test_driver/nrfconnect/build/ /src/darwin/Framework/build/ +/src/python_testing/matter_testing_infrastructure/build/ # Pigweed Environment .environment*/ From cc5ea19fd566586ee81ee656123de639f494b812 Mon Sep 17 00:00:00 2001 From: Jeff Tung <100387939+jtung-apple@users.noreply.github.com> Date: Tue, 17 Sep 2024 08:54:31 -0700 Subject: [PATCH 42/42] [Darwin] Fix flaky subscription pool test (#35606) --- .../Framework/CHIP/MTRDevice_Concrete.mm | 13 +++++++--- .../CHIPTests/MTRPerControllerStorageTests.m | 25 ++++++++----------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index 62f6a5f1769208..bc0eaa92aa5099 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -1167,8 +1167,7 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: return; } - // Wait the required amount of time, then put it in the subscription pool to wait additionally for a spot, if needed - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, inNanoseconds), self.queue, ^{ + dispatch_block_t workBlockToQueue = ^{ // In the case where a resubscription triggering event happened and already established, running the work block should result in a no-op MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; [workItem setReadyHandler:^(id _Nonnull context, NSInteger retryCount, MTRAsyncWorkCompletionBlock _Nonnull completion) { @@ -1199,7 +1198,15 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: }]; [self->_deviceController.concurrentSubscriptionPool enqueueWorkItem:workItem description:description]; MTR_LOG("%@ - enqueued in the subscription pool", self); - }); + }; + + if (inNanoseconds > 0) { + // Wait the required amount of time, then put it in the subscription pool to wait additionally for a spot + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, inNanoseconds), self.queue, workBlockToQueue); + } else { + // Put in subscription pool directly if there is no wait time + workBlockToQueue(); + } } - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index a7b8ddeee1d034..096349c985b84f 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -2597,20 +2597,17 @@ - (void)doTestSubscriptionPoolWithSize:(NSInteger)subscriptionPoolSize deviceOnb // Create the base device to attempt to read from the 5th device __auto_type * baseDeviceReadExpectation = [self expectationWithDescription:@"BaseDevice read"]; - // Dispatch async to get around XCTest, so that this runs after the above devices queue their subscriptions - dispatch_async(queue, ^{ - __auto_type * baseDevice = [MTRBaseDevice deviceWithNodeID:@(105) controller:controller]; - __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice endpointID:@(1) queue:queue]; - [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { - XCTAssertNil(error); - // We expect the device to be off. - XCTAssertEqualObjects(value, @(0)); - [baseDeviceReadExpectation fulfill]; - os_unfair_lock_lock(&counterLock); - baseDeviceReadCompleted = YES; - os_unfair_lock_unlock(&counterLock); - }]; - }); + __auto_type * baseDevice = [MTRBaseDevice deviceWithNodeID:@(105) controller:controller]; + __auto_type * onOffCluster = [[MTRBaseClusterOnOff alloc] initWithDevice:baseDevice endpointID:@(1) queue:queue]; + [onOffCluster readAttributeOnOffWithCompletion:^(NSNumber * value, NSError * _Nullable error) { + XCTAssertNil(error); + // We expect the device to be off. + XCTAssertEqualObjects(value, @(0)); + [baseDeviceReadExpectation fulfill]; + os_unfair_lock_lock(&counterLock); + baseDeviceReadCompleted = YES; + os_unfair_lock_unlock(&counterLock); + }]; // Make the wait time depend on pool size and device count (can expand number of devices in the future) NSArray * expectationsToWait = [subscriptionExpectations.allValues arrayByAddingObject:baseDeviceReadExpectation];